Skip to main content
POST

Authorizations

string
default:"Bearer ${YOUR_API_KEY}"
required
Neural4D API key using the Bearer scheme.

Body application/json

With no references, the request uses text-to-video. With only frame_images, it uses first-frame or first-and-last-frame generation. Adding input_references selects reference-to-video. The model must support the selected mode. Omitted optional parameters use the selected model’s current defaults. Each first frame, last frame, and reference image must be at most 10 MiB, whether supplied by file_id or url.
enum<string>
required
Seedance 2.0 model.Available options: bytedance/seedance-2.0.
string
required
Required text instruction describing the video to generate.Required string length: 1 - 1000.
boolean
default:true
Whether to generate native audio with the video.
enum<string>
default:"720p"
Available options: 480p, 720p, 1080p, 4K.
enum<string>
default:"16:9"
Available options: 1:1, 16:9, 9:16, 4:3, 3:4.
enum<integer>
default:5
Duration in seconds.Available options: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15.
boolean
default:false
Return an image of the generated video’s final frame.When enabled, get the image URL from output.videos[].last_frame_url in Retrieve a task.
boolean
default:false
Enable person references for frame_images and input_references. Generated videos are private by default when enabled. Processing time may increase; enable it only when person references are needed.Provide at least one non-empty array: frame_images or input_references. Does not support copyrighted faces that require verification.
integer
default:1
Number of video generation tasks to create.Required range: 1 <= x <= 4.
object[]
First-frame and last-frame images supplied by file_id or url. Supported formats are JPG, JPEG, PNG, and WEBP, with a maximum of 10 MiB per image. Images must pass content moderation. Each frame_type may appear at most once; last_frame requires first_frame.Allowed array length: 1 - 2 elements when provided. Provide exactly one of file_id or url per item.
object[]
Image, video, and audio references supplied by file_id or url. Provide exactly one source per item; you can mix sources across items. Audio must be accompanied by at least one image or video, including a frame image.Allowed array length: 1 - 12 elements when provided, subject to the per-type limits.
  • Images: up to 6 per request, including frame_images; JPG/JPEG, PNG, or WEBP; up to 10 MiB per file. Images must pass content moderation.
  • Videos: up to 4 per request; MP4 or MOV; up to 100 MiB per file by default.
  • Audio: up to 2 per request; MP3 or WAV; up to 15 MiB per file by default.
List reference materials in the order you want to use them.

Response

Identify errors by error.code, not by matching message text.
Generation tasks accepted
string
required
Batch task ID returned by the generation request.Example: "normal-video-c50fe63e-699d-4d61-93f5-2099ab159d6d".
object[]
required
Generated child items created by the request.Allowed array length: 1 - unbounded elements.
enum<string>
required
Current status shared by the submitted video tasks.Available options: queued, processing, succeeded, failed.
integer<int64>
required
Unix timestamp in seconds when the batch task was created.
enum<string>
required
Video generation mode shared by the submitted tasks.Available options: text_to_video, first_frame_image_to_video, first_last_frame_image_to_video, reference_to_video.
enum<string>
required
Video generation model used by the submitted tasks.Available options: bytedance/seedance-2.0, bytedance/seedance-2.0-fast, google/veo-3.1, xai/grok-imagine, kuaishou/kling-3.0.
object
Total credits charged for the submitted tasks when available.