Skip to main content
Before starting, please register for APIYI and obtain an API key at https://api.apiyi.com/token (copy token)

Generate Video in Three Steps

1

Submit Video Generation Task

Use your API key to call the submit endpoint
curl -X POST "https://api.apiyi.com/veo/v1/api/video/submit" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{
    "prompt": "A small orange cat slowly walking in a sunny garden",
    "model": "veo3"
  }'
2

Record the Returned Task ID

The system will return task information
{
  "success": true,
  "data": {
    "taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
    "pollingUrl": "https://asyncdata.net/source/veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
    "status": "processing",
    "message": "Task submitted successfully"
  }
}
3

Query Generation Result

Use the task ID to query status
curl -X GET "https://api.apiyi.com/veo/v1/api/video/status/veo3:b873872e-7358-4c2f-8d55-bd23f000e14e" \
  -H "Authorization: Bearer your-api-key"

Authentication

All API requests must include a valid Bearer Token in the request header:
Authorization: Bearer your-api-key
Security Reminder: Do not expose your API key in client-side code. It’s recommended to store it in server-side environment variables.

Basic Request Examples

Simple Text Generation

curl -X POST "https://api.apiyi.com/veo/v1/api/video/submit" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{
    "prompt": "A cat walking on a rainy night"
  }'

Generation with Reference Images

curl -X POST "https://api.apiyi.com/veo/v1/api/video/submit" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{
    "prompt": "A cat walking on a rainy night, preparing to catch a mouse",
    "model": "veo3",
    "images": ["https://example.com/cat.png"],
    "enhance_prompt": true
  }'

Handling Responses

Task Submitted Successfully

{
  "success": true,
  "data": {
    "taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
    "pollingUrl": "https://asyncdata.net/source/veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
    "status": "processing",
    "message": "Task submitted successfully"
  }
}

Video Generation Complete

{
  "success": true,
  "data": {
    "taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
    "status": "completed",
    "result": {
      "video_url": "https://filesystem.site/cdn/20250705/BFvep0SngrqIrN3yDSFChIXAz2mU0M.mp4",
      "video_media_id": "CAUSJGRlNzE5MzRhLTljMDgtNDE1Mi05NWVlLThjOTlhMTZlODUyYxokY2U4ZjNiYmUtNGFmZS00NTExLWI4ZDEtMGM1MTFkM2ZlNGIxIgNDQUUqJDJlNTY3OWUyLWQ2YmQtNGVlZS05ZTUwLWMyMWE0MWU3ZDYzNw"
    }
  }
}

Polling Recommendations

Recommended polling strategy:
  • Polling interval: 10-15 seconds
  • Maximum wait time: 30 minutes
  • Implement exponential backoff strategy

Next Steps