curl --request POST \
--url https://api.aiid.edu.kg/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size": "1280x720",
"images": [
"https://example.png"
],
"model": "sora-2",
"prompt": "this is an example",
"duration": 12,
"fps": "24",
"seed": "20231024",
"mode": "i2v"
}
'{
"id": "video_abc123",
"object": "video",
"model": "sora-2",
"status": "queued",
"progress": 0,
"created_at": 1764347090922,
"seconds": "8"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}Create video
OpenAI Sora video generation API in a compatible format. Supports text-to-video and image/video reference generation modes.
POST /v1/videos: Create video taskGET /v1/videos/{video_id}: Query task statusGET /v1/videos/{video_id}/content: Retrieve the video binary content
Currently not available externally:
GET /v1/videosPOST /v1/videos/{video_id}/remix
Standard authentication headers:
Content-Type: application/json
- Use
POST /v1/videosto create a task and obtainid - Poll
GET /v1/videos/{id}untilcompletedorfailed - After completion, prefer using
video_urlreturned in the response - For unified download, call
GET /v1/videos/{id}/content
Core parameters:
model: string: Required, public model nameprompt: string: Recommended, video generation descriptionseconds: number|string: Optional, target durationduration: number|string: Optional, duration aliassize: string: Optional, output resolutionmode: string: Optional, common values:t2vi2vi2v_first_lastreference_material
Common compatibility parameters:
aspect_ratioratioqualityresolutionfpsimageimage_urlimage_urlsimagesreference_imagesinput_referenceend_image_urllast_image_urlvideo_urlsaudio_urlsfunction_modecontentcallback_urlexternal_task_id
Kling common extended parameters:
model_namenegative_promptcfg_scalesoundcamera_controlimage_listvideo_idtask_idwatermark_info
4.1 Veo series
Note: stable, official, and similar labels indicate different groups, not external model suffixes; when calling, keep model as the base model name, and let the account or token group determine which group is actually used.
Veo 3.x main model
veo3veo3-fastveo3-fast-framesveo3-framesveo3-proveo3-pro-framesveo3.1veo3.1-fastveo3.1-proveo3.1-componentsveo3.1-4kveo3.1-pro-4k
Recommendations:
- For text-to-video only, prefer the
veo3*/veo3.1*base models - For image-to-video or reference-to-video scenarios, it is recommended to explicitly pass
mode + image_url/reference_images
4.2 Sora series
Base models:
sora-2sora-2-pro
Recommendations:
sora-2*is suitable for general-purpose use- To use groups such as
stable/official, keepmodelas the base model name and do not append any suffix to the model name.
Request example:
{
"size": "1280x720",
"images": [
"https://example.png"
],
"model": "sora-2",
"prompt": "this is an example",
"duration": 12,
"fps": "24",
"seed": "20231024",
"mode": "i2v"
}
4.3 HappyHorse series
Public model:
happyhorse-1.0
Recommendations:
happyhorse-1.0are distinguished bymodeintot2v,i2v,r2v, andvideo_edit.- In Sora-compatible format, it is recommended to pass media items in the
contentarray for reference images. - Use
type=textfor text items andtype=image_urlfor media items, and optionally useroleandnameto indicate the asset’s purpose.
Request example:
{
"size": "720x1280",
"model": "happyhorse-1.0",
"mode": "r2v",
"prompt": "this is an example",
"duration": 15,
"content": [
{
"type": "text",
"text": "this is an example"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.png"
},
"role": "reference_image",
"name": "image1"
}
],
"parameters": {
"resolution": "720P",
"ratio": "9:16",
"duration": 15,
"seed": 1
}
}
4.4 Seedance Series
Public model:
doubao-seedance-1-0-lite-t2v-250428doubao-seedance-1-0-lite-i2v-250428doubao-seedance-1-0-pro-250528doubao-seedance-1-0-pro-fast-251015doubao-seedance-1-5-pro-251215doubao-seedance-2-0-260128doubao-seedance-2-0-fast-260128
Recommendations:
- For text-to-video, prefer
*-t2v-*orpro / fast - For image-to-video, prefer
*-i2v-* - For scenarios with complex reference materials, prefer
content
Request example:
{
"size": "1280x720",
"model": "doubao-seedance-2-0-fast-260128",
"prompt": "this is an example",
"duration": 15,
"fps": "24",
"seed": "20231024",
"mode": "reference_material",
"content": [
{
"type": "text",
"text": "this is an example"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.png"
},
"role": "reference_image",
"name": "image1"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.mp3"
},
"role": "reference_audio",
"name": "audio1"
}
]
}
4.5 Grok Video Series
Public model:
grok-imagine-1.0-videogrok-imagine-video-1.5-previewgrok-video-3
Common parameters:
promptratio/aspect_ratioresolution/sizeseconds/durationimage/image_url/input_referencereference_images
Example:
{
"model": "grok-imagine-1.0-video",
"prompt": "雨夜霓虹街道上的电影感推镜,光影丰富,运动自然",
"reference_images": [
"https://example.com/ref-1.jpg"
],
"seconds": 10,
"aspect_ratio": "16:9",
"resolution": "720P"
}
4.6 Kling Video Main Model
Public base model:
kling-video
Required:
modelmodel_name
Supported model_name:
kling-v1kling-v1-5kling-v1-6kling-v2-masterkling-v2-1kling-v2-1-masterkling-v2-5-turbokling-v2-6kling-v3
Common mode:
t2vi2vmulti_i2vextend
Minimum input parameters:
- Text-to-video:
model + model_name + prompt + mode=t2v - Image-to-video:
model + model_name + prompt + mode=i2v + image - Multi-image reference:
model + model_name + prompt + mode=multi_i2v + image_list - Video extension:
model + model_name + mode=extend + video_id
Example:
{
"model": "kling-video",
"model_name": "kling-v2-6",
"mode": "t2v",
"prompt": "海边日落镜头,电影感,风吹长发",
"duration": 5,
"aspect_ratio": "16:9"
}
4.7 MiniMax / Hailuo Video Series
Public model:
minimax-h3hailuo-2.3
Recommendations:
minimax-h3supports text-to-video, image references, and audio references. We recommend mixing text and assets viacontent; you can also use compatible fields such asimage_urlsandaudio_urls.hailuo-2.3requires a first-frame image. We recommend passing theimage_urlfield ofrole=first_frameincontent, or usingimage_urlsto pass the first-frame image.minimax-h3commonly usesduration=5~15andresolution=1440p;hailuo-2.3commonly usesduration=6or10andresolution=768p.
minimax-h3 Example:
{
"model": "minimax-h3",
"prompt": "A cinematic product video with smooth camera motion",
"content": [
{
"type": "text",
"text": "Use the product image as reference and match the rhythm of the audio."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/product.jpg"
},
"role": "reference_image",
"name": "product"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/music.mp3"
},
"role": "reference_audio",
"name": "music"
}
],
"duration": 8,
"resolution": "1440p",
"aspect_ratio": "16:9",
"generate_audio": true
}
hailuo-2.3 Example:
{
"model": "hailuo-2.3",
"prompt": "The camera slowly pushes in, natural motion and cinematic lighting.",
"content": [
{
"type": "text",
"text": "The camera slowly pushes in, natural motion and cinematic lighting."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.jpg"
},
"role": "first_frame",
"name": "first"
}
],
"duration": 10,
"resolution": "768p",
"aspect_ratio": "16:9"
}
-
mode=t2v -
Minimum input:
model + prompt -
mode=i2v -
Minimum input:
model + prompt + image_url -
mode=i2v_first_last -
Minimum input:
model + prompt + image_url + end_image_url -
mode=reference_images -
Minimum input:
model + prompt + reference_images -
mode=reference_material -
Minimum input:
model + prompt + (image_urls/video_urls/audio_urls 至少一种)
Gemini Omni usage instructions
gemini-omniis the publicly exposed video model name of new-api, and can be called directly viaPOST /v1/videos.mode=t2v: text-to-video, with the minimum input parameter beingmodel + prompt.mode=r2v: reference image/reference material generation; images can be placed inimage,image_url,images,image_urls,reference_images,input_reference, orcontent.mode=edit: video editing; videos can be placed invideo,video_url,videos, orcontent, and reference images can also be provided at the same time.- The duration field can use
secondsorduration, and will be automatically mapped to the 4 / 6 / 8 / 10 second options.
Kling 4.0
Public models: kling-4.0 (720p) and kling-4.0-1080p. The native format supports POST /text-to-video/kling-4.0, POST /image-to-video/kling-4.0, and POST /omni-video/kling-4.0, with queries made through GET /tasks?task_ids=任务ID. Native requests do not require model; resolution is selected by settings.resolution, with 1080p as the default. Native reference image/video types are refer_image and feature_video; creation returns a data object, while queries return a data array. Requests can be submitted through POST /api/v3/contents/generations/tasks or POST /v1/videos and queried through GET /{task_id} on the corresponding path. OpenAI/Sora directly use prompt, seconds, size, and input_reference; Seedance directly uses content and top-level duration/resolution/ratio/mode. Neither requires additional contents/settings/options. The legacy envelope remains supported: in contents, type=prompt is text; type=reference_image and reference_video are reference materials; and first_frame and last_frame are the first and last frames. kling-4.0 corresponds to 720p, and kling-4.0-1080p corresponds to 1080p; ensure that settings.resolution matches the model name. In settings, use duration (4–30 seconds), resolution (720p/1080p), and aspect_ratio (21:9, 16:9, 9:16, 1:1). audio is available only for all-purpose mode with standard reference materials; omit the audio switch for text-to-video and first/last-frame modes. The current API supports up to 10 reference images and 5 reference videos, and does not support reference audio. The legacy kling-video and model_name modes remain available as backward-compatible interfaces.
{
"model": "kling-4.0",
"prompt": "A cinematic product shot",
"seconds": "4",
"size": "1280x720",
"input_reference": "https://example.com/product.jpg"
}
Kling 4.0 can directly use the Seedance format with content/duration/resolution/ratio/mode, or the OpenAI video format with prompt/seconds/size/input_reference; neither requires additional contents/settings/options. The legacy contents/settings/options envelope is retained for compatibility only. Available mode values are t2v (text only), i2v (a single first frame), i2v_first_last (first and last frames), reference_images (standard reference images), and reference_material (image or video references). If mode is omitted and no tool is explicitly specified, reference_material is used by default when reference materials are provided; otherwise, t2v is used by default. Reference modes use standard reference-image roles and do not silently convert explicitly specified first and last frames into reference images. For first and last frames, explicitly select i2v or i2v_first_last and omit the aspect-ratio parameter. Reference audio is not currently supported. settings.audio is available only in all-purpose mode for reference images/reference materials; omit the audio switch for t2v, i2v, and i2v_first_last.
Vidu Q4
Vidu Q4: vidu-q4 is fixed at 720p, and vidu-q4-540p is fixed at 540p. Supports generating videos from 3 to 16 seconds. At least 1 image is required, with up to 15 reference images supported. Reference generation can include up to 3 MP3 audio clips, each 3 to 12 seconds long and up to 50 MB. Pure text-to-video, specified first and last frames, and reference videos are not supported. Multiple images are used as joint references and do not indicate first or last frame positions. Tasks can be created via POST /v1/videos, POST /api/v3/contents/generations/tasks, or the Vidu formats POST /ent/v2/img2video and POST /ent/v2/reference2video. For the unified endpoint, mode=reference_images is recommended; use mode=reference_material when including audio. Reference audio can use audio_urls. The Seedance format can also use the audio_url field of the standard content; the audio Boolean field controls audio generation and is used separately from the reference audio URL list. The resolution must match the model name.
curl --request POST \
--url https://api.aiid.edu.kg/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size": "1280x720",
"images": [
"https://example.png"
],
"model": "sora-2",
"prompt": "this is an example",
"duration": 12,
"fps": "24",
"seed": "20231024",
"mode": "i2v"
}
'{
"id": "video_abc123",
"object": "video",
"model": "sora-2",
"status": "queued",
"progress": 0,
"created_at": 1764347090922,
"seconds": "8"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}Authorizations
Use Bearer Token authentication.
Format: Authorization: Bearer sk-xxxxxx
Body
- Option 1
- Kling 4.0
Required, external model name. gemini-omni Can be called via /v1/videos.
sora-2, sora-2-pro, gemini-omni, happyhorse-1.0, happyhorse-1.0-i2v, happyhorse-1.0-t2v, happyhorse-1.0-r2v, happyhorse-1.0-video-edit, doubao-seedance-1-0-lite-i2v-250428, doubao-seedance-1-0-lite-t2v-250428, doubao-seedance-1-0-pro-250528, doubao-seedance-1-0-pro-fast-251015, doubao-seedance-1-5-pro-251215, doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, sd-2-5, veo3, veo3-fast, veo3-fast-frames, veo3-frames, veo3-pro, veo3-pro-frames, veo3.1, veo3.1-4k, veo3.1-components, veo3.1-fast, veo3.1-pro, veo3.1-pro-4k, grok-imagine-1.0-video, grok-imagine-video-1.5-preview, grok-video-3, minimax-h3, hailuo-2.3, viduq3-turbo, vidu-q4, vidu-q4-540p "sora-2"
Unified prompt entry point. Required for most models.
Single image entry point; will be mapped to images in certain compatibility modes.
Unified duration parameter. Some models also accept seconds.
Video width
512
Video height
512
Video frame rate
30
Random seed
20231234
Number of videos to generate
1
Response format
"url"
User identifier
"user-1234"
Dynamic extension field container. Numerous model-specific fields are deserialized from here.
Optional, video generation mode. gemini-omni Supports t2v, r2v, and edit.
Unified multi-image entry point. Used by Vidu, Seedance, Veo, etc.
Unified size input, which maps to resolution/aspect_ratio and related fields.
Sora compatibility entry point; at runtime, it falls back to duration.
Sora/Veo compatible reference image input, can be a multipart file or a compatible object.
Vidu Q4 reference audio: up to 3 MP3 clips, each 3–12 seconds and no larger than 50 MB; separate from the audio boolean switch.
Output resolution, common values 540p, 720p, and 1080p.
Response
Video task created successfully
Should use VideoStatus constants: VideoStatusQueued, VideoStatusInProgress, VideoStatusCompleted, VideoStatusFailed
queued, in_progress, completed, failed, video_url, url, completed_at Legacy compatibility; to be deprecated
