Submit a video generation task
Creates an async video generation task and returns a task_id immediately (HTTP 202). Poll GET /api/v1/videos/generations/{task_id} until it succeeds. The request body can be provided either flattened ({model, prompt, ...}) or nested ({model, input: {prompt, ...}}); the input object takes precedence when present. callback fields (callBackUrl / callback_url / callbackUrl) are ignored.
Three mutually exclusive input modes:
- text-to-video: prompt only;
- image-to-video (first/last frame): first_frame_url (+ optional last_frame_url);
- omni-reference: reference_image_urls / reference_video_urls / reference_audio_urls. Mixing first/last-frame with any multimodal reference input returns 400 invalid_request_error.
- 类型: stringX
- Request - Id Optional caller request ID echoed back for diagnostics.
Video generation input. Either flattened ({model, prompt, ...}) or nested ({model, input: {...}}). input takes precedence. Exactly one input mode must be used; mixing first/last-frame with multimodal reference inputs is rejected.
- 类型: stringmodel必填
Felo-facing model name, e.g. seedance-2.0-mini.
- 类型: string 枚举aspect
_ratio 值- 16:9
- 9:16
- 1:1
- 4:3
- 3:4
- 21:9
- adaptive
- 类型: integerduration最小值:4最大值:15
Integer numbers.
- 类型: string 格式: urifirst
_frame _url - 类型: booleangenerate
_audio - 类型: objectinput
Optional nested input object; when present, its fields take precedence over sibling fields.
- aspect类型: string 枚举
_ratio Output aspect ratio; adaptive follows the input image ratio.
值- 16:9
- 9:16
- 1:1
- 4:3
- 3:4
- 21:9
- adaptive
- duration类型: integer最小值:4最大值:15
Output duration in seconds.
- first类型: string 格式: uri
_frame _url First frame image URL (image-to-video mode).
- generate类型: boolean
_audio Whether to generate a synchronized audio track.
- last类型: string 格式: uri
_frame _url Last frame image URL; must be used together with first_frame_url.
- prompt类型: string最大长度:2000
Prompt. Required for text-to-video and omni-reference modes.
- reference类型: array string[] …3格式: uri
_audio _urls Omni-reference audio clips.
- reference类型: array string[] …9格式: uri
_image _urls Omni-reference images. Mutually exclusive with first/last-frame.
- reference类型: array string[] …3格式: uri
_video _urls Omni-reference videos. Mutually exclusive with first/last-frame. Supplying video changes the billing unit price and adds input duration to the token count.
- resolution类型: string 枚举
Output resolution. Higher resolution consumes more tokens and costs more.
值- 480p
- 720p
- 1080p
- 4k
- 类型: string 格式: urilast
_frame _url - 类型: stringprompt最大长度:2000
- 类型: array string[] …3格式: urireference
_audio _urls - 类型: array string[] …9格式: urireference
_image _urls - 类型: array string[] …3格式: urireference
_video _urls - 类型: string 枚举resolution值
- 480p
- 720p
- 1080p
- 4k
- 类型: object · VideoGenerationAccepted202
Task accepted
- 枚举kind常量:video必填值
- video
- 类型: array string[]outputs必填
Empty until the task succeeds.
- 枚举status常量:queued必填值
- queued
- 类型: stringtask
_id 必填Task id to use for polling.
application/json - 类型: object · GenerationError400
Invalid request (unknown model, mixed input modes, invalid fields)
OpenAI-compatible error envelope.
- 类型: objecterror
- message类型: string必填
- type类型: string 枚举必填值
- invalid
_request _error - server
_error
- code类型: string
- param类型: string 可为 null
application/json - 类型: object · GenerationError401
Invalid or missing Felo API key
OpenAI-compatible error envelope.
- 类型: objecterror
- message类型: string必填
- type类型: string 枚举必填值
- invalid
_request _error - server
_error
- code类型: string
- param类型: string 可为 null
application/json - 类型: object · GenerationError402
Insufficient balance / billing requirement not met
OpenAI-compatible error envelope.
- 类型: objecterror
- message类型: string必填
- type类型: string 枚举必填值
- invalid
_request _error - server
_error
- code类型: string
- param类型: string 可为 null
application/json - 类型: object · GenerationError403
Account not permitted (subscription required or user banned). Disabled models are also rejected before upstream calls. Existing accepted requests and tasks continue.
OpenAI-compatible error envelope.
- 类型: objecterror
- message类型: string必填
- type类型: string 枚举必填值
- invalid
_request _error - server
_error
- code类型: string
- param类型: string 可为 null
application/json - 类型: object · GenerationError429
Request or spending limit reached
OpenAI-compatible error envelope.
- 类型: objecterror
- message类型: string必填
- type类型: string 枚举必填值
- invalid
_request _error - server
_error
- code类型: string
- param类型: string 可为 null
application/json - 类型: object · GenerationError502
Upstream provider failed
OpenAI-compatible error envelope.
- 类型: objecterror
- message类型: string必填
- type类型: string 枚举必填值
- invalid
_request _error - server
_error
- code类型: string
- param类型: string 可为 null
application/json - 类型: object · GenerationError503
Generation service or billing service temporarily unavailable
OpenAI-compatible error envelope.
- 类型: objecterror
- message类型: string必填
- type类型: string 枚举必填值
- invalid
_request _error - server
_error
- code类型: string
- param类型: string 可为 null
application/json
curl https://openapi.felo.ai/api/v1/videos/generations \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"model": "seedance-2.0-mini",
"prompt": "a cinematic trailer shot, 720p",
"resolution": "720p",
"duration": 5,
"generate_audio": true
}'
{
"task_id": "string",
"status": "queued",
"kind": "video",
"outputs": [
"string"
]
}