A simple TypeScript API for Pollo, using Zod for type validation.
No packaging for now—just copy ./src/api.ts
into your project.
To manually test the API, use the provided script as follows:
pnpm install
pnpm start generate requests/wanx-example.json
# Task created: cmbj385hx02uxvh97vvn3hpaj
# Initial status: waiting
# Status: waiting
# Status: processing
# Status: succeed
# Result URL: https://videocdn.pollo.ai/web-cdn/pollo/production/cm7x30lpz02lb8go1gngy90b6/original/1749110619391-0f18c943-3f91-4e52-b323-1d1f6cfd5560.mp4
# I haven't tested ./requests/veo3-example.json since it's expensive...
pnpm start status cmbj28fj3021xb5s7h8jpuepi
# Task status: {
# "taskId": "cmbj385hx02uxvh97vvn3hpaj",
# "generations": [
# {
# "id": "cmbj385id02uyvh978mse21cg",
# "status": "succeed",
# "failMsg": "",
# "url": "https://videocdn.pollo.ai/web-cdn/pollo/production/cm7x30lpz02lb8go1gngy90b6/original/1749110619391-0f18c943-3f91-4e52-b323-1d1f6cfd5560.mp4",
# "mediaType": "video",
# "createdDate": "2025-06-05T08:01:32.000Z",
# "updatedDate": "2025-06-05T08:01:32.000Z"
# }
# ]
# }