Skip to navigation

Video Editing

Creates an asynchronous video editing task (multi-video stitching) using an OpenAI-compatible request. The editing endpoint is routed to the video editing model pool (models that support both video generation and video editing); Doubao-Seedance-2.5 is in that pool.

Unlike the generation endpoint, at least one media input is required: input_reference / first_frame / last_frame / input_video. input_video is only available on this endpoint and references public video URLs for stitching, as a single string or an array; it can be freely combined with prompt and image inputs. All other fields (model / prompt / size / duration / parameters) are identical to the generation endpoint.

The response and the polling / download endpoints are shared with generation tasks.

Authentication

AuthorizationBearer

Use Authorization: Bearer $JOY_TOKEN_API_KEY.

Request

This endpoint expects an object.
modelstringOptional

Model name, e.g. Doubao-Seedance-2.5. Omit to use auto and let the gateway route within the video generation model pool.

promptstringOptional

Text description. Required for text-to-video; may be omitted when any image input (input_reference / first_frame / last_frame) is present.

sizestringOptional

Resolution/aspect. Accepts 480p / 720p / 1080p or WIDTHxHEIGHT (e.g. 1280x720, converted to the aspect ratio and resolution). Aspect ratios support 16:9 and 9:16; use parameters.aspect_ratio for other ratios.

durationintegerOptional

Video length in seconds. Continuous 2~30 range (Seedance 2.5), default 8. Out-of-range values are clamped (<2 becomes 2, >30 becomes 30). Stitch longer videos through POST /openai/v1/videos/edits.

input_referencestring or list of stringsOptional

Reference image URL(s). A single string is one image; an array is multiple images for multi-subject reference (each sent with the reference_image role). Up to 30 images per request (input_reference + first_frame + last_frame combined), otherwise 400.

first_framestringOptionalformat: "uri"

First-frame image URL (first_frame role).

last_framestringOptionalformat: "uri"

Last-frame image URL (last_frame role).

userstringOptional

Optional end-user identifier for abuse tracking.

parametersobjectOptional

Native upstream parameter passthrough; snake_case field names are preferred (camelCase accepted). Supports aspect_ratio, resolution, duration_seconds, generate_audio, seed, negative_prompt, compression_quality, and person_generation. fps, sample_count, and 4K resolutions are not supported (rejected or ignored). Top-level duration / size explicitly provided take precedence.

input_videostring or list of stringsOptional

Public URL(s) of the video(s) to stitch, only available on the editing endpoint. A single string is one video; an array is multiple videos. Freely combinable with prompt and image inputs. Must be a directly accessible public URL.

Response

Task accepted. Fees are settled on task completion based on actual usage.
task_idstring
Task id used for polling and download.
statusenum
Always processing on creation.
Allowed values:
progressinteger
Progress percentage, always 0 on creation.
modelstring

The actually selected model name (the real model after auto routing).

createdlong

Unix timestamp (seconds) of task creation.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
502
Bad Gateway Error
503
Service Unavailable Error