model: "seedance-2.5" with POST https://api.creatok.ai/v1/videos/generation. Choose a scenario below, then submit its request body and poll the returned job.
Supported scenarios
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 examplefile_... 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, supplymodel 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
You can combine up to 30 images and 10 videos, with at most 40 reference items in total.
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 asrequest.json. Set your key and generate an idempotency key once for that request:
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.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.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.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.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.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.Adaptive video editing
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.generationMode: "edit" explicitly. Upload a source video of 4–30 seconds. Its duration and aspect ratio determine the output, so omit seconds and orientation. autoMatchVideoDuration defaults to true; setting it to false is rejected.
referenceImageKeys for visual guidance. If you supply several reference videos, the first determines the output duration and aspect ratio. All reference videos contribute to the total duration limit and token pricing. Output duration is not guaranteed to be frame-exact.
Read the result
HTTP202 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:
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.

