Developer platform / v1
Make the generation engine part of your product.
One API for images, videos, and motion. Upload references, create a job, then poll until the output is ready.
Manage API keys- 01Upload references
- 02Create generation
- 03Poll status
- 04Download result
Send your key as a Bearer token. Keys belong to your account and never appear in URLs.
Every generation uses 2 credits from the same account balance as the workspace.
Poll every 3 seconds until status is succeeded or failed. This API does not send webhooks.
Each API key allows up to 60 requests per minute.
Create requests require an Idempotency-Key of 8–128 URL-safe characters. Replaying the same request is safe.
export API_KEY="your_api_key"
curl https://your-domain.example/api/v1/models \
-H "Authorization: Bearer $API_KEY"02 / API reference
Endpoint
/api/v1/modelsList capabilities · returns { models }
/api/v1/uploadsUpload one reference file · returns { upload }
/api/v1/generationsCreate a generation · returns { generation }
/api/v1/generations?page=1&pageSize=20Returns { items, total, page, pageSize }
/api/v1/generations/{id}Poll one job · returns { generation }
/api/v1/media/{id}?download=1Download owner-only media; omit the query to view inline
Supported inputs
- Images: JPEG, PNG, WebP · up to 10 MiB
- Videos: MP4, MOV · up to 10 MiB
- Motion: exactly 1 image + 1 video; Wan video up to 10 MiB
Available models
- Image
- nano-banana-2 · gpt-image-2
- Video
- veo-3.1-fast · 8s · 720p · 16:9 or 9:16
- Motion
- kling-2.6-motion-control (prompt required) · wan-2.2-animate-replace / wan-2.2-animate-move (omit prompt)
Generation request fields
- kind
- Required
- image, video, or motion
- model
- Required
- A compatible model ID from GET /models
- prompt
- Model-specific
- Required, non-empty, and up to 4,000 characters for text-supporting image/video models and Kling. Omit for Wan; Wan rejects a provided non-empty prompt.
- aspectRatio
- Required
- An aspect ratio supported by the model
- referenceUploadIds
- Optional
- Array of IDs returned by POST /uploads
- generationType
- Optional
- Video jobs only; omit for image and motion jobs
Common responses
- 401
- Missing, invalid, or expired API key
- 402
- Not enough credits to create the generation
- 403
- Account is not allowed in the current test environment
- 409
- Idempotency key conflicts with a different request
- 413
- JSON payload or uploaded file is too large
- 429
- Key exceeded 60 requests per minute
curl -X POST https://your-domain.example/api/v1/uploads \
-H "Authorization: Bearer $API_KEY" \
-F "file=@character.png"curl -X POST https://your-domain.example/api/v1/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: reel-2026-11-06-001" \
-d '{
"kind": "video",
"model": "veo-3.1-fast",
"prompt": "A quiet cinematic orbit around the subject",
"aspectRatio": "9:16",
"referenceUploadIds": ["upload_id"],
"generationType": "REFERENCE_2_VIDEO"
}'curl https://your-domain.example/api/v1/generations/generation_id \
-H "Authorization: Bearer $API_KEY"{
"generation": {
"id": "generation_id",
"status": "succeeded",
"progress": 100,
"error": null,
"output": {
"mediaId": "media_id",
"viewUrl": "/api/v1/media/media_id",
"downloadUrl": "/api/v1/media/media_id?download=1"
}
}
}curl -L "https://your-domain.example/api/v1/media/media_id?download=1" -H "Authorization: Bearer $API_KEY" -o output.mp403 / API keys
Keys for your integrations
Create separate keys for development, automation, and production. You can reveal a saved key after signing in.