Tài liệu

Seedance Video Generation API Reference

Walkthrough using bytedance/seedance-2.0 (Seedance 2.0): submit, poll, and download.

FieldValue
Base URLhttps://token.easyapi.com
AuthenticationAuthorization: Bearer `API_KEY`
Example modelbytedance/seedance-2.0
FormatREST JSON (async jobs)
BillingPay as you go
Note: Seedance 2.0 supports multiple durations and 480p / 720p / 1080p. Flow: submit → poll job_id → download via download_url from the status response.

Example model

Examples below use bytedance/seedance-2.0 (Seedance 2.0). Replace model and adjust size, quality, etc. per console docs when switching models.

Submit video generation job

POSThttps://token.easyapi.com/v1/videos

Submit an async video generation job. On success, returns 202 with a job_id for polling. Prefer Idempotency-Key to avoid duplicate jobs.

Request parameters

NameInTypeRequiredDescription
AuthorizationheaderstringYesEasyAPI API Key. Format: Bearer `API_KEY`
Content-TypeheaderstringYesRequest body format
Idempotency-KeyheaderstringNoIdempotency key; duplicate submits with the same key return the first job without creating a new one

Request body

NameTypeRequiredDescription
modelstringYesModel ID; currently bytedance/seedance-2.0
promptstringYesVideo prompt: subject, motion, scene, camera, and style. Limits vary by model (Sora 500 chars, Hailuo 2000, Wan T2V 1500 / I2V 800). EasyAPI does not enforce a hard limit; upstream may reject with 502 / 503 when exceeded.
durationintegerNoVideo duration in seconds; supported range depends on the model
resolutionstringNoOutput resolution: 480p, 720p, or 1080p
aspect_ratiostringNoAspect ratio: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, or adaptive
generate_audiobooleanNoWhether to generate audio
seedintegerNoRandom seed, -1 to 4294967295; same seed does not guarantee identical output
sizestringNoExact output size, e.g. 1280x720
input_referencesarrayNoOptional reference assets for image-to-video, first/last frame control, style transfer, or audio-driven generation
input_references[].typestringYesReference type: image, video, or audio; must match role
input_references[].urlstringYesHTTPS URL of the reference asset
input_references[].rolestringYesReference role: first_frame, last_frame, reference (appearance guide only), reference_video, or reference_audio
metadataobjectNoOpaque metadata for audit or source tagging
webhook_urlstringNoCallback URL on completion or failure

Example

{
  "model": "bytedance/seedance-2.0",
  "prompt": "A golden retriever running on a sunny beach, cinematic camera movement",
  "duration": 6,
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "generate_audio": false,
  "seed": -1,
  "input_references": [
    {
      "type": "image",
      "url": "https://cdn.example.com/portrait.jpg",
      "role": "first_frame"
    }
  ],
  "metadata": {
    "source": "playground"
  },
  "webhook_url": "https://example.com/webhooks/easyapi-video"
}

Response fields

NameTypeDescription
job_idstringUnique job ID
statusstringJob status: pending / in_progress / completed / failed
modelstringModel used for the job
status_urlstringFull URL for polling job status
messagestringServer message
current_balancestringCurrent account balance (USD)
estimated_coststringEstimated cost
pre_deduct_amountstringDisplayed pre-deduct amount
balance_after_estimatestringBalance after estimated cost
currencystringCurrency code; currently USD
billing_noticestringBilling notice

Response example

{
  "code": 200,
  "msg": "",
  "data": {
    "job_id": "video_abc123",
    "status": "in_progress",
    "model": "bytedance/seedance-2.0",
    "status_url": "https://token.easyapi.com/v1/videos/video_abc123",
    "message": "视频任务已提交,请调用 status_url 查询生成进度。",
    "current_balance": "100.0000000000",
    "estimated_cost": "1.0800000000",
    "pre_deduct_amount": "1.0800000000",
    "balance_after_estimate": "98.9200000000",
    "currency": "USDT",
    "billing_notice": "视频生成完成后按实际任务结果扣款,提交后请保持余额充足。"
  }
}

Status codes

Status codeMeaningDescriptionData model
202AcceptedJob accepted and queued; response includes job_id for polling.VideoSubmitResponse
400Bad RequestInvalid parametersErrorResponse
401UnauthorizedNot authenticated or token invalidErrorResponse
402Payment RequiredInsufficient balance; response includes estimated cost and current balance.ErrorResponse
429Too Many RequestsRate limited; slow down requests.ErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Query job status

GEThttps://token.easyapi.com/v1/videos/{job_id}

Example request: https://token.easyapi.com/v1/videos/video_abc123

Poll job status, progress, and billing. When completed, the response includes download_url.

Request parameters

NameInTypeRequiredDescription
job_idpathstringYesVideo job ID
AuthorizationheaderstringYesEasyAPI API Key. Format: Bearer `API_KEY`

Response fields

NameTypeDescription
job_idstringUnique job ID
statusstringJob status: pending / in_progress / completed / failed
modelstringModel used for the job
status_urlstringFull URL for polling job status
download_urlstringVideo download URL (present when status is completed)
durationintegerVideo duration in seconds
resolutionstringOutput resolution
aspect_ratiostringAspect ratio
generate_audiobooleanWhether audio is included
estimated_coststringEstimated cost
billed_coststringActual billed amount
billing_statusstringBilling status: pre_deducted or settled
expires_atstring(ISO 8601)Video file expiration time
created_atstring(ISO 8601)Job creation time
completed_atstring(ISO 8601)Job completion time

Response example

{
  "code": 200,
  "msg": "",
  "data": {
    "job_id": "video_abc123",
    "status": "completed",
    "model": "bytedance/seedance-2.0",
    "status_url": "https://token.easyapi.com/v1/videos/video_abc123",
    "download_url": "https://cdn.example.com/videos/video_abc123.mp4",
    "duration": 6,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "generate_audio": false,
    "estimated_cost": "1.0800000000",
    "billed_cost": "1.0800000000",
    "billing_status": "settled",
    "expires_at": "2026-06-26T05:00:00Z",
    "created_at": "2026-05-27T05:00:00Z",
    "completed_at": "2026-05-27T05:03:00Z"
  }
}

Status codes

Status codeMeaningDescriptionData model
200OKSuccessVideoStatusResponse
401UnauthorizedNot authenticated or token invalidErrorResponse
404Not FoundJob not found, or it does not belong to the current API Key.ErrorResponse
500Internal Server ErrorInternal server errorErrorResponse