Skip to main content
This guide submits a 4-second 480p video with seedance-2-mini, polls the job, and downloads the result. Check the pricing page for the current rate.

Prerequisites

  • A CreatOK workspace with the API wallet enabled and a positive balance. Contact support@creatok.ai to enable the wallet and top up.
  • An organization API key that starts with cok_.
1

Create an API key

Open API Platform → API Keys in the API console and create a key. The full key is shown only once, so store it in your secret manager.
2

Check your balance

3

Submit a generation job

Generate a new Idempotency-Key for each new job. Reuse it only when you retry the same request.
The API responds with 202 Accepted and a job:
4

Poll the job

While the job is queued or running, the response includes a Retry-After header. Wait that many seconds before the next request.
5

Download the video

When status is succeeded, download each URL in output.files.
Output URLs expire after about one hour. Fetch the job again for a fresh URL. Outputs are deleted 48 hours after the job completes, so copy them to your own storage.

Complete example

Node.js

Next steps

Models

Choose a model, resolution, and duration.

Errors

Handle HTTP errors and failed jobs.