TokenLab

Video & Materials

Get Task (Volc Compatible)

Get a Seedance compatibility task by its cgt task ID.

GET
/api/v3/contents/generations/tasks/{id}

Overview

Use the cgt-... ID returned by create. Poll every few seconds while the task is queued or running. Stop when the task is succeeded, failed, cancelled, or expired.

Do not reuse the unified v1 task enum or response struct here. /v1/tasks/{id} uses pending, processing, completed, and failed; this v3 endpoint uses the official enum above. In the v3 JSON object, duration is a string when present and error is optional and contains error details when available. A strict Go client should declare Duration as string with the JSON tag duration,omitempty, and stop on every v3 terminal status.

See also Seedance 2.0 Video Models and Video Generation.

Status Values

  • queued: accepted and waiting to run.
  • running: generation is in progress.
  • succeeded: result is ready and content.video_url is present.
  • failed: generation failed; inspect error.code and error.message.
  • cancelled: the task was cancelled before completion.
  • expired: the task expired before completion.

Response Fields

  • id: compatibility task ID, starting with cgt-.
  • model: model identifier echoed for compatibility.
  • status: one of the status values above.
  • content.video_url: final video URL on success.
  • content.last_frame_url: present only when requested and available.
  • usage: token usage when available.
  • created_at and updated_at: task timestamps.
  • error: Optional error details when available. Inspect error.code and error.message; do not infer field presence solely from status.

The response never adds TokenLab fields such as progress, return_last_frame, watermark, priority, or camera_fixed.

Example

curl https://api.tokenlab.sh/api/v3/contents/generations/tasks/cgt-20260102030405-a1b2c \
  -H "Authorization: Bearer $TOKENLAB_API_KEY"
{
  "id": "cgt-20260102030405-a1b2c",
  "model": "doubao-seedance-2.0",
  "status": "succeeded",
  "content": {
    "video_url": "https://example.com/result.mp4"
  },
  "usage": {
    "completion_tokens": 123456
  }
}
Go
type SeedanceTask struct {
    ID       string `json:"id"`
    Status   string `json:"status"`
    Duration string `json:"duration,omitempty"`
}

func isTerminal(status string) bool {
    switch status {
    case "succeeded", "failed", "cancelled", "expired":
        return true
    default:
        return false
    }
}
curl -X GET "https://example.com/api/v3/contents/generations/tasks/string"
{  "id": "string",  "model": "string",  "status": "queued",  "content": {    "video_url": "http://example.com",    "last_frame_url": "http://example.com"  },  "seed": 0,  "resolution": "string",  "ratio": "string",  "duration": "string",  "frames": 0,  "framespersecond": 0,  "generate_audio": true,  "tools": {    "type": "web_search"  },  "safety_identifier": "string",  "draft": true,  "draft_task_id": "string",  "service_tier": "string",  "execution_expires_after": 0,  "usage": {    "completion_tokens": 0,    "total_tokens": 0,    "tool_usage": {      "web_search": 0    }  },  "error": {    "code": "string",    "message": "string"  },  "created_at": 0,  "updated_at": 0}

Authorization

BearerAuth
AuthorizationBearer <token>

API Key authentication. Create or manage API keys in Dashboard > API > API Keys.

In: header

Path Parameters

id*string

Compatibility task ID returned by the create endpoint. IDs start with cgt-.

Response

application/json

application/json

application/json

application/json