Image to videoAPI

Pass first_frame, an https image URL, plus a prompt. The sample URL is an existing Kerox file.

# 1. Submit a task (optional: add "webhook_url" with your own HTTPS endpoint)
TASK_ID=$(curl -sS --fail-with-body https://api.kerox.ai/v1/tasks \
  -H "Authorization: Bearer $KEROX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bytedance/seedance-2.5",
    "input": {
      "prompt": "A lighthouse beam sweeps slowly across the waves",
      "resolution": "480p",
      "duration": 5,
      "first_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp"
    }
  }' | jq -r .id)

# 2. Poll until status is "succeeded" or "failed" (up to 10 min)
for _ in $(seq 1 200); do
  TASK=$(curl -sS --fail-with-body "https://api.kerox.ai/v1/tasks/$TASK_ID" \
    -H "Authorization: Bearer $KEROX_API_KEY")
  STATUS=$(echo "$TASK" | jq -r .status)
  [ "$STATUS" != "processing" ] && break
  sleep 3
done
echo "$TASK"
[ "$STATUS" = "succeeded" ] || exit 1
# 3. The same object comes back when you poll, and in your webhook
{
  "id": "task_01JD8X9B4Q2M7T8N3K5P6R1S0V",
  "object": "task",
  "model": "bytedance/seedance-2.5",
  "status": "succeeded",
  "outputs": [ { "type": "video", "url": "https://cdn.kerox.ai/t/task_01JD8X9B…/0.mp4" } ],
  "cost": { "amount": "0.4883", "currency": "USD", "status": "settled" }
}

The sample sends first_frame, an image URL you host. The URL in the sample is an existing Kerox file.

Three steps to integrate.

  1. 01

    Get an API key

    Sign in to the console, create a key, and top up from $5.

    Quickstart
  2. 02

    Submit a task

    Send POST /v1/tasks with the model ID and unified input parameters.

    Tasks & polling
  3. 03

    Poll or wait for a webhook

    Poll GET /v1/tasks/{id} until it finishes, or pass webhook_url to receive the result.

    Webhooks

Output samples.

Stored samples for the models in the table. This page does not run a generation.

Models and API pricing.

Every live model is available through the same POST /v1/tasks endpoint.

Seedance 2.5
bytedance/seedance-2.5
≈ $0.1028≈ $0.0977 / s · 480p−5%API docs
Seedance 2.0
bytedance/seedance-2.0
≈ $0.0703≈ $0.0668 / s · 480p−5%API docs
bytedance/seedance-2.0-fast
≈ $0.0562≈ $0.0337 / s · 480p−40%API docs
bytedance/seedance-2.0-mini
≈ $0.0352≈ $0.0193 / s · 480p−45%API docs
alibaba/wan-2.7
$0.1000$0.0900 / s · 720p−10%API docs
alibaba/wan-3.0
$0.0500$0.0400 / s · 480p−20%API docs
alibaba/wan-3.0-prime
$0.0680$0.0612 / s · 480p−10%API docs
MiniMax H3
minimax/h3
$0.0800$0.0400 / s · 768p−50%API docs
minimax/h3-max
$0.0500$0.0450 / s · 480p−10%API docs
bytedance/seedance-2.5-flash
≈ $0.0673≈ $0.0639 / s · 480p−5%API docs
kuaishou/kling-4.0
$0.1570$0.1413 / s · 720p−10%API docs
kuaishou/kling-4.0-flash
$0.0940$0.0846 / s · 720p−10%API docs
sand-ai/magi-2
$0.1000 / s · 1080pAPI docs

A struck-through figure is the maker list rate stored on that model. The figure next to it is the current Kerox public rate. Both are read from the catalog as the page renders.

Related pages.

Questions

Not answered here?

What do I put in first_frame?

An https URL of an image your server can fetch. The URL in the sample is an existing Kerox file.

Which models accept a first frame?

The live video models on the models page. Open the model page and check that first_frame is listed before you rely on it.

Is the picture on this page newly generated?

No. It is a sample already stored on the model. Opening this page does not spend a generation.

What if the animation fails?

The hold is released in full. The rule is written in pricing and billing.

Can I omit the image?

Yes. The text to video API page shows the same call without first_frame.