Skip to main content
Use the Seedance 2 family with POST https://api.creatok.ai/v1/videos/generation. Choose a model variant, select a scenario below, then submit its request body and poll the returned job.

Choose a model

All three variants share the input fields, media modes, and media limits on this page. The examples use seedance-2 at 480p. To use Fast or Mini, replace only the root model value with the corresponding ID. Keep definition at 480p or 720p for those variants. Seedance 2.5 has its own limits and supports adaptive editing.

Supported scenarios

For adaptive editing, use Seedance 2.5. These three variants do not accept generationMode: "edit".

Before you start

Create an organization API key and fund your API wallet. For images or videos, complete the signed upload flow first. Replace each example file_... value with the returned file_id. You can also use the returned upload_fields.key.
These examples use the CreatOK request format. Put generation parameters inside input. Media fields accept uploaded file identifiers, not public URLs, base64 strings, or asset:// identifiers. A prompt is required in every mode.

Parameters

At the request root, supply model and input. You can also set metadata to a JSON object and max_cost_usd to a nonnegative decimal string with up to six decimal places. The cost cap is a spending limit, not a quoted price. Use these fields inside input: Unknown fields are rejected with 400 invalid_parameter. The API does not accept duration, resolution, size, image_urls, video_urls, audio_urls, generate_audio, or return_last_frame. Use the fields documented above.

Media requirements

The server checks uploaded media before charging. A successful upload does not guarantee that a file meets the model’s requirements. Frame images follow the same image restrictions as reference images.

Submit a request

Save one complete JSON example below as request.json. Set your key and generate an idempotency key once for that request:
Submit the file:
Keep the same key and body when retrying a network failure or server error. Generate a new key when you switch examples or change any request field. See Idempotency.

Text to video

Describe the scene, subject movement, and camera movement. No upload is required.

Single reference image

Upload each reference file first: request a grant with POST /files, complete the multipart upload, then replace the sample IDs below with the returned file_id values. upload_fields.key is also accepted.
Use one image as visual guidance. To specify the opening frame instead, use the first-frame example.

Multiple reference images

Upload each reference file first: request a grant with POST /files, complete the multipart upload, then replace the sample IDs below with the returned file_id values. upload_fields.key is also accepted.
Upload every image separately. Describe how the subjects or visual details should appear together. Reference array order does not turn images into first and last frames.

Reference video

Upload each reference file first: request a grant with POST /files, complete the multipart upload, then replace the sample IDs below with the returned file_id values. upload_fields.key is also accepted.
Use a video as guidance for a new generation. Set the output duration explicitly; reference mode does not automatically match the source duration. Reference-video duration also contributes to the charge.

Images and video together

Upload each reference file first: request a grant with POST /files, complete the multipart upload, then replace the sample IDs below with the returned file_id values. upload_fields.key is also accepted.
Combine visual references with video guidance. Do not add first/end-frame fields to this request.

First frame

Upload each reference file first: request a grant with POST /files, complete the multipart upload, then replace the sample IDs below with the returned file_id values. upload_fields.key is also accepted.
Use an uploaded image as the opening frame. Omit both reference arrays. The mode can be inferred, but this example sets it explicitly.

First and last frames

Upload each reference file first: request a grant with POST /files, complete the multipart upload, then replace the sample IDs below with the returned file_id values. upload_fields.key is also accepted.
Upload both images. The first image starts the video and the second supplies the ending frame. An end frame alone is not accepted. Do not include reference arrays.

Read the result

HTTP 202 returns a job directly. Read its id and status; there is no data wrapper. A submission can already have status: "failed", so do not treat 202 as generation success. While the job is queued or running, wait the number of seconds in Retry-After, then retrieve it:
Replace JOB_ID with the returned id. Continue until the status is succeeded, failed, or canceled. On success, download the video URL in output.files. URLs last about one hour; retrieve the job again for a fresh URL. Copy the output to your storage before expires_at, 48 hours after completion. For a complete polling and download script, see Quickstart. See Jobs and polling for response fields and refunds.

Common errors

See Errors for all error codes. See the pricing page for current rates and token pricing for how media affects usage.