Skip to documentation
On this page

Documentation

Build with the Seevio API

Add video generation to your product. Choose a model, submit a request and retrieve the result through polling or a webhook.

Choose a model

Each model reference includes its complete parameters, pricing and examples. You can finish an integration from a single model page.

Authentication

Create an API key in the dashboard. The complete key is shown only once. Keep it on your server and send it as a Bearer token on every request.

Base URL

https://api.seevio.ai
Authorization: Bearer sk_live_your_api_key
Content-Type: application/json

Set the SEEVIO_API_KEY environment variable before running these examples. JavaScript examples run on your server with Node.js; Python examples use the requests package.

Quickstart

This example generates a 5-second 720p video with Seedance 2.5. Open a model reference for all generation modes and parameter limits.

curl --fail-with-body https://api.seevio.ai/v1/videos/generations \
  -H "Authorization: Bearer $SEEVIO_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "model": "seedance-2-5",
  "input": {
    "prompt": "A cat surfing at sunset, cinematic lighting",
    "duration": 5,
    "resolution": "720p",
    "generation_type": "text-to-video",
    "aspect_ratio": "16:9",
    "generate_audio": true
  }
}'

Create task response example

After the request above is accepted, the API returns this JSON response. taskId is the task identifier used for subsequent status queries; credits is the number of credits reserved for this task. This response confirms task creation, not that the video is ready. You need to poll the task status or use a Webhook to receive the video results.

{
  "taskId": "3f2aK9mR7xQp4TnZ8bLc6YwH",
  "credits": 100
}

Query a task

GET https://api.seevio.ai/v1/tasks/{taskId}

Replace the example ID with the taskId returned by creation. Queries only return tasks owned by the API key's user; inaccessible or unknown IDs return HTTP 404.

Poll every 10–20 seconds as a starting point, back off on HTTP 429 and stop when the status is completed or failed. Prefer webhooks for production. Each code example below performs one query.

curl --fail-with-body https://api.seevio.ai/v1/tasks/3f2aK9mR7xQp4TnZ8bLc6YwH \
  -H "Authorization: Bearer $SEEVIO_API_KEY"
StatusDescription & constraints
queuedAccepted and waiting for submission.
generatingGeneration is in progress.
completedTerminal success. Download data.results before expiry.
failedTerminal failure. Inspect failed_reason and billing_status.
FieldTypeDescription & constraints
idstring
Task identifier. This is taskId from the create response.
created_atnumber
Task creation time as Unix seconds.
modelstring
The public model ID used for this task.
billing_statusstring
reserved, charged, refunded or refund_failed.
creditsnumber
Credits reserved for this task. This value is retained after a refund; inspect billing_status to determine the billing outcome.
failed_reasonstring | null
Failure reason on failed tasks; null otherwise. Failed query responses omit data.
dataobject
Present on non-failed task queries. Contains output and processing details.
data.resultsstring[]
Video URL array. Empty until completion or after the video's expiry.
data.video_expires_atstring | null
Video expiry as an ISO 8601 timestamp, or null before it is available. Save the result before this time.
data.last_frame_urlstring | null
Last-frame URL when requested and available, otherwise null.
data.processing_timenumber | null
Provider processing duration in seconds when available, otherwise null.

Completed task: query response with video results

When the query returns status=completed, video generation has finished. Read the video URLs from data.results and download them before data.video_expires_at. billing_status=charged indicates that the reserved credits have been charged.

{
  "id": "3f2aK9mR7xQp4TnZ8bLc6YwH",
  "created_at": 1788652800,
  "model": "seedance-2-5",
  "status": "completed",
  "billing_status": "charged",
  "credits": 100,
  "failed_reason": null,
  "data": {
    "results": [
      "https://cdn.seevio.ai/api/videos/example.mp4"
    ],
    "video_expires_at": "2026-09-07T00:00:00Z",
    "last_frame_url": null,
    "processing_time": 48
  }
}

Failed task: query response with failure and billing details

When the query returns status=failed, generation has ended unsuccessfully. Read failed_reason for the cause and billing_status for the refund outcome. In this example, refunded means the credits were returned. credits retains the original reserved amount, and the response does not include data.

{
  "id": "3f2aK9mR7xQp4TnZ8bLc6YwH",
  "created_at": 1788652800,
  "model": "seedance-2-5",
  "status": "failed",
  "billing_status": "refunded",
  "credits": 100,
  "failed_reason": "provider_failed"
}

Webhooks

For production integrations, provide callback_url when creating a task. Every model reference includes callback payloads and a receiver example.

Set callback_url in the create request to receive a JSON POST when the task completes or fails. Return a 2xx response within 15 seconds. Failed deliveries are retried; process repeated deliveries idempotently by task ID.

Your callback endpoint must accept POST requests with a JSON request body (Content-Type: application/json).

Create a task with a callback

curl --fail-with-body https://api.seevio.ai/v1/videos/generations \
  -H "Authorization: Bearer $SEEVIO_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "model": "seedance-2-5",
  "input": {
    "prompt": "A cat surfing at sunset, cinematic lighting",
    "duration": 5,
    "resolution": "720p",
    "generation_type": "text-to-video",
    "aspect_ratio": "16:9",
    "generate_audio": true
  },
  "callback_url": "https://example.com/webhooks/seevio"
}'

Webhook payloads differ from task query responses: they omit billing_status and credits; failure details are inside data.failed_reason and data.credits_refunded. Webhook created_at is the event creation time in Unix seconds.

Task completed: successful callback payload

When generation succeeds, the callback contains status=completed. Use id to identify the task and data.results to retrieve the video URLs. Download and save the results before data.video_expires_at.

{
  "id": "3f2aK9mR7xQp4TnZ8bLc6YwH",
  "created_at": 1788652800,
  "model": "seedance-2-5",
  "status": "completed",
  "data": {
    "results": [
      "https://cdn.seevio.ai/api/videos/example.mp4"
    ],
    "video_expires_at": "2026-09-07T00:00:00Z",
    "last_frame_url": null,
    "processing_time": 48
  }
}

Task failed: failure callback payload

When generation fails, the callback contains status=failed. Use id to identify the task, data.failed_reason for the failure reason and data.credits_refunded for the number of credits refunded.

{
  "id": "3f2aK9mR7xQp4TnZ8bLc6YwH",
  "created_at": 1788652800,
  "model": "seedance-2-5",
  "status": "failed",
  "data": {
    "failed_reason": "provider_failed",
    "credits_refunded": 100
  }
}

Receiver example

export async function POST(request: Request) {
  const callbackData = await request.json();

  if (callbackData.status === "completed") {
    const videoUrls = callbackData.data.results;
    // Save the video URLs and mark this task as completed in your application.
    console.log(callbackData.id, videoUrls);
  }

  if (callbackData.status === "failed") {
    const { failed_reason, credits_refunded } = callbackData.data;
    // Record the failure reason and refunded credits for this task.
    console.error(callbackData.id, failed_reason, credits_refunded);
  }

  return new Response(null, { status: 200 });
}

This Next.js example reads the JSON callback body and handles completed and failed tasks directly. Add persistence and task-ID deduplication for your application; queue slow work before acknowledging the callback.

Errors

HTTP errors have an error object with code and message. A successfully accepted task can still fail later; query the task or handle its failure callback.

{
  "error": {
    "code": "invalid_request",
    "message": "input.prompt is required."
  }
}
HTTPFieldWhat to do
400invalid_request
Fix the JSON, missing prompt, parameter range or media URL before retrying.
401invalid_api_key
Check the Bearer token and whether the API key is active.
402insufficient_credits
Add credits or reduce the task cost. The response may include required and available amounts.
403forbidden
Check the account-level restriction described in the error message.
404not_found
Check the task ID and that the key belongs to the task's user.
429rate_limited
Wait for the Retry-After interval before retrying.
500internal_error
Inspect the error message and API logs. Retry cautiously; resubmitting a create request can create another billable task.