GRGlobalRouter Docs
Console

Seedance compatible API

Compatible access

Call Doubao-compatible endpoints with the GlobalRouter domain and API key. Find an endpoint below to view its parameters, request examples, and response details.

Choose the Base URL for your site, then append the full endpoint path:

  • https://api.globalrouter.com
  • https://api.globalrouter.ai

The two sites do not share data. Use the Base URL for your site. The examples below use https://api.globalrouter.com by default.

ParameterType / locationRequiredDescription
AuthorizationHeaderYesBearer <GlobalRouter API Key>. Do not send the upstream X-Api-Key.
Content-TypeHeaderRequired for JSON requestsapplication/json.
Idempotency-KeyGlobalRouter extension headerAs required by the endpointPrevents duplicate submissions of the same business operation. See the scope and retry rules below.

Idempotency-Key behavior

This extension header is provided by GlobalRouter and is not a native Volcengine API parameter. It identifies a business operation to prevent duplicate tasks, training, or charges from repeated client submissions. It is not authentication, a task ID, or an upstream request ID.

ParameterType / locationRequiredDescription
Subtitle erasure and LAS repairPOST /doubao/api/v3/tools/…Yes1–128 characters.
Voice allocation, training, and upgradesPOST voices / voice_clone / upgrade_voiceYes1–256 characters.
Queries, TTS/ICL streaming synthesis, and other compatible endpointsAs specified by each endpointHeader not requiredAdding this header does not give every endpoint the same deduplication or automatic retry guarantees.

Generate and persist

Generate a UUID for each new business operation (for example, with JavaScript crypto.randomUUID()) and save it with the business record. Repeated requests must reuse the original key and parameters. Use a new key for a different operation. Do not reuse the example placeholder for every request or generate a new UUID for each HTTP attempt.

Idempotency-Key: 6bcdfdf8-b94c-41d2-bc03-d6c604d4e40d

How duplicate requests are handled

  • Same key and parameters: links to the original task or voice operation and returns its existing result or current state. An upstream operation already claimed is not resubmitted. An unresolved operation may return a pending error instead of success.
  • Same key with different parameters: returns a 409 conflict, MEDIA_IDEMPOTENCY_CONFLICT for subtitle/LAS or VOICE_OPERATION_CONFLICT for voice training/upgrades. Check business records; do not change the key to bypass the conflict.
  • New business operation: use a new key. Balance, permissions, and mutual exclusion for operations on the same voice still apply.

Handling timeouts and failures

If training times out, the upstream service may already have received the audio. Keep the original key and query the original voice operation or ask an administrator to verify it. Do not retrain with a new key. Repeating the same key does not force an operation with an unknown result to run again. Generate a new key only after confirming the original operation has ended and a new operation is needed.

If you have a media task_id, query the original task. Do not automatically replay streaming synthesis text, even after receiving partial audio; Idempotency-Key does not provide replay protection for streaming synthesis. No fixed key expiry or reuse period is guaranteed. Always generate a new key for a new business operation.

Records are isolated by tenant and business scope. The two Base URLs do not share data; using the same key on the other site will not find the original operation.

Replace model, task, asset, and voice identifiers and example.com URLs with real values. The platform manages media output destinations, task identifiers, and callbacks. Follow each endpoint's parameter requirements.

Overseas Dreamina · Laid integration

Use https://api.globalrouter.ai for the overseas site and laid (not lai) as the provider ID. Keep the public dreamina- model IDs; GlobalRouter translates them to the upstream IDs below. Availability depends on this site's model catalogue and enabled relations.

Public model IDLaid upstream model IDresolution
dreamina-seedance-2-0-260128doubao-seedance-2-0-260128720p / 1080p
dreamina-seedance-2-0-fast-260128doubao-seedance-2-0-fast-260128720p
dreamina-seedance-2-0-mini-260615doubao-seedance-2-0-mini-260615720p
dreamina-seedance-2-5-260628doubao-seedance-2-5-260628720p / 1080p
  • Every dreamina- generation request requires an explicit provider, including existing BytePlus routes. Missing, null or blank values return HTTP 400 / DREAMINA_PROVIDER_REQUIRED instead of selecting a default route.
  • Laid requires resolution: fast/mini support only 720p; standard 2.0/2.5 support 720p and 1080p. These restrictions do not change other providers. Existing model-level selling-price rules are reused.
  • Routing selects the provider before validating assets; referencing an asset never selects a route. Assets must belong to the current tenant, selected provider and account/line, and have Active status. Existing doubao/byteplus assets are not copied or converted to laid.

Create and query video

Laid · Create video
curl "https://api.globalrouter.ai/api/v1/videos" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "provider": {"provider_id": "laid"},
    "prompt": "A cinematic sunset over the ocean.",
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'

The unified endpoint accepts a provider string or {"provider_id": "laid"}. Save the returned platform id. Polling accepts no provider parameter; do not substitute the upstream generation_id for the platform job ID.

Laid · Query video
curl "https://api.globalrouter.ai/api/v1/videos/$JOB_ID" -H "Authorization: Bearer $GLOBALROUTER_API_KEY"

How assets are assigned to Laid

The provider field is optional on REST asset creation. Omitting it uses existing provider selection. Import selects a provider before checking group ownership; a mismatch is rejected. The group, asset name and model prefix never determine the provider. The Laid examples below explicitly use provider=laid to ensure both group and asset belong to Laid.

1 · Create a Laid asset group
curl "https://api.globalrouter.ai/api/v1/assets/groups" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider":"laid","name":"Laid references","group_type":"AIGC"}'
2 · Import an asset
curl "https://api.globalrouter.ai/api/v1/assets" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider":"laid","group_id":"<GROUP_ID>","source_url":"https://example.com/authorized-reference.jpg","asset_type":"image","name":"Reference"}'

Creation returns an id field. Save the group id as GROUP_ID and the asset id as ASSET_ID. Replace source_url with a real publicly accessible asset you are authorized to use.

3 · Check moderation status
curl "https://api.globalrouter.ai/api/v1/assets/$ASSET_ID" -H "Authorization: Bearer $GLOBALROUTER_API_KEY"
4 · List assets in the group
curl "https://api.globalrouter.ai/api/v1/assets?group_id=$GROUP_ID&page=1&page_size=20" -H "Authorization: Bearer $GLOBALROUTER_API_KEY"

Once the response status is Active, reference asset://gr/{ASSET_ID}, for example as input_references[].image_url.url in the unified video endpoint. Detail queries need no provider parameter. Cross-provider ID collisions require platform verification; do not guess a raw upstream asset:// ID.

The /doubao/ Action asset endpoints also support explicit provider=laid; omitting provider retains their existing default selection and does not default to Laid. Changing accounts, lines or credentials can invalidate the scope of old tasks/assets. Verify the configuration rather than blindly recreating paid jobs.

Laid official Seedance and asset documentation

Media capabilities

Configure original account credentials, model permissions, and platform prices before calling. LAS also requires managed TOS in the same account and region.

Subtitle erasure

POST /doubao/api/v3/tools/erase-video-subtitle-pro

Erase subtitles within selected regions and time segments, returning a platform async task.

Official documentation

Parameters

ParameterType / locationRequiredDescription
video_urlstringYesReadable HTTP/HTTPS video URL.
model_versionstringNov4, v5, or v5.6; defaults to v4. v5.6 supports multilingual subtitles with processing time close to v4.
modestringNoSubtitle or Text; defaults to Subtitle.
output_encode_modestringNoQuality or Size; defaults to Quality.
erase_ratio_locationobject[]No1–20 rectangles. top_left_x/y and bottom_right_x/y range from 0 to 1; bottom-right coordinates must exceed top-left coordinates.
time_segment_filterobjectNomode is selected or skip. In segments, start_time/end_time are seconds; end must exceed start.
subtitle_filterobjectNomin_text_height_ratio, max_text_height_ratio, and center_offset_ratio control filtering. If max is omitted, the upper limit is 0.2 for v4 and 0.1 for v5/v5.6.

The request must include the GlobalRouter extension header Idempotency-Key. Reuse the original key for the same operation; see idempotency and timeout handling.

Billing

ScenarioChina siteInternational siteBilling calculation
Fine subtitle erasure1 CNY/minute0.1389 USD/minuteTotal effective erased seconds ÷ 60

Without time_segment_filter, billing uses output video duration. With selected, overlapping selected intervals are merged. With skip, skipped intervals are subtracted from output duration. Durations use millisecond precision and are rounded after aggregation.

Example: a 90-second output with no intervals costs 90 ÷ 60 × 1 = 1.5 CNY. Intervals [0,20], [15,30], and [60,75] merge to 45 seconds, costing 45 ÷ 60 × 1 = 0.75 CNY.

Prices, discounts, and exchange rates are locked at submission. The final amount depends on valid terminal-state usage evidence and your site's actual configuration.

Request examples

curl -X POST "https://api.globalrouter.com/doubao/api/v3/tools/erase-video-subtitle-pro" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-stable-operation-key' \
  -H 'Content-Type: application/json' \
  --data '{
  "video_url": "https://vod-ai-test.tos-cn-beijing.volces.com/demo/demo_video_drama_hard_subs.mp4"
}'

Response

The example uses the short-drama video with embedded subtitles from the Volcengine AI MediaKit subtitle erasure guide and can be used directly as input. Billing uses total erased duration, or output duration if no segments are specified. client_token, callback_url, callback_args, queue_id, and output destinations are platform-managed and cannot be supplied by the client.

{
  "task_id": "37e3aecf-7aba-5c01-86da-440c9aac7907",
  "request_id": "37e3aecf-7aba-5c01-86da-440c9aac7907",
  "status": "pending",
  "output": [],
  "settlement": "pending",
  "error": null
}

Watermark removal and video repair

POST /doubao/api/v3/tools/video-inpaint

Use LAS to detect and repair watermarks or subtitles in a video.

Official documentation

Parameters

ParameterType / locationRequiredDescription
video_urlstringYesReadable HTTP/HTTPS video URL.
targetsstring[]Nowatermark, subtitle, or scrolling_subtitle; defaults to watermark only.
detection_precise_modebooleanNoPrecise detection, true by default. Affects the price tier.
inpainting_backendstringNopixel_replace is the default repair mode; the official moving-watermark example uses pixel_generate. The mode affects price and processing time. Automatic detection is not guaranteed to remove every target.
return_subtitle_bboxbooleanNoDefaults to true.
max_process_framesintegerNoDefaults to -1 to process all frames. A positive integer limits the frame count; 300 frames at 30fps is about 10 seconds.
subtitle_mask_precisebooleanNoDefaults to false. Primarily provides fine masks for white or yellow subtitles; may work less well on transparent or scrolling subtitles. This is not the watermark detection switch.
fixed_bboxesnumber[][]NoFormat: [[x1,y1,x2,y2]], with top-left as origin and coordinates normalized to 0–1000, not pixels. Only the specified regions are repaired when supplied.

The request must include the GlobalRouter extension header Idempotency-Key. Reuse the original key for the same operation; see idempotency and timeout handling.

Billing

ScenarioChina siteInternational siteBilling calculation
Standard detection / pixel_replace1.2 CNY/minute0.1667 USD/minuteOutput minutes × frame-rate multiplier
Standard detection / pixel_generate1.6 CNY/minute0.2222 USD/minuteOutput minutes × frame-rate multiplier
Precise detection / pixel_replace2.8 CNY/minute0.3889 USD/minuteOutput minutes × frame-rate multiplier
Precise detection / pixel_generate3.2 CNY/minute0.4444 USD/minuteOutput minutes × frame-rate multiplier

The frame-rate multiplier is max(1, ceil(output fps ÷ 30)). Outputs from 31–60fps have a multiplier of 2. It is not estimated from input video or request parameters.

Example: 60 seconds at 30fps with standard detection + pixel_generate costs 1 × 1 × 1.6 = 1.6 CNY. At 60fps the same video costs 1 × 2 × 1.6 = 3.2 CNY.

Prices, discounts, and exchange rates are locked at submission. The final amount depends on valid terminal-state usage evidence and your site's actual configuration.

Request examples

curl -X POST "https://api.globalrouter.com/doubao/api/v3/tools/video-inpaint" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-stable-operation-key' \
  -H 'Content-Type: application/json' \
  --data '{
  "video_url": "https://p9-arcosite.byteimg.com/tos-cn-i-goo7wpa0wc/db283820bd07450abca6bff691acfef6~tplv-goo7wpa0wc-image.image",
  "targets": [
    "watermark"
  ],
  "detection_precise_mode": true,
  "inpainting_backend": "pixel_replace"
}'

Response

The example uses the original landscape video with a watermark and subtitles from the Volcengine LAS repair documentation. targets currently removes only watermarks; add subtitle to remove both. Although the URL ends in .image, it returns video/quicktime; preserve the full URL. The platform generates output_tos_path; arbitrary buckets or directories cannot be specified. Usage is output minutes × max(1, ceil(fps/30)); the price tier depends on detection and repair modes. succeeded means processing and platform post-processing completed, not that every visible watermark was removed. If automatic detection leaves a fixed watermark, specify its region. Use a new Idempotency-Key for a new experiment with changed parameters, and reuse the original key only to retry the same request. Updating an example does not reprocess an existing task.

{
  "task_id": "37e3aecf-7aba-5c01-86da-440c9aac7907",
  "request_id": "37e3aecf-7aba-5c01-86da-440c9aac7907",
  "status": "pending",
  "output": [],
  "settlement": "pending",
  "error": null
}

Get media task

GET /doubao/api/v3/tools/tasks/{task_id}

Query subtitle or LAS platform task status, settlement status, and archived outputs.

Parameters

ParameterType / locationRequiredDescription
task_idstring · pathYesPlatform task_id from the submission response, not an upstream task ID.

Request examples

Get media task request examples
curl -X GET "https://api.globalrouter.com/doubao/api/v3/tools/tasks/{task_id}" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY"

Response

status is processing state; settlement is settlement state. output contains available artifacts and error describes failure. Download URLs expire. Preserve the original ID when submission results are unknown; do not POST again.

{
  "task_id": "37e3aecf-7aba-5c01-86da-440c9aac7907",
  "request_id": "37e3aecf-7aba-5c01-86da-440c9aac7907",
  "status": "pending",
  "output": [],
  "settlement": "pending",
  "error": null
}

TTS and cloned voice synthesis

POST /doubao/api/v3/tts/unidirectional

Synthesize text and return Base64 audio chunks and terminal usage as line-delimited JSON.

Parameters

ParameterType / locationRequiredDescription
X-Api-Resource-Idstring · headerYesUse seed-tts-2.0 for public voices and seed-icl-2.0 for cloned voices.
req_params.textstringYesNonempty text to synthesize, up to 1 MiB in UTF-8.
req_params.speakerstringYesPublic voice catalog ID or the actual cloned voice identifier for the current tenant.
req_params.audio_paramsobjectNoformat: mp3/pcm/ogg_opus/wav, default mp3. Supports sample_rate, bit_rate, speech_rate, loudness_rate, and enable_subtitle.
req_params.additionsstringNoA JSON-object-encoded string. Extensions depend on the TTS/ICL resource.

Billing

ScenarioChina siteInternational siteBilling calculation
Public TTS voice0.0003 CNY/character0.00004167 USD/characterTerminal usage.text_words × character price
First production synthesis with a cloned voice138 CNY/voice + 0.0003 CNY/character19.1667 USD/voice + 0.00004167 USD/characterSettled after both the first slot event and production character usage are available
Subsequent production synthesis with a cloned voice0.0003 CNY/character0.00004167 USD/characterTerminal usage.text_words × character price

Public voices use seed-tts-2.0 with no slot fee; cloned voices use seed-icl-2.0. Each postpaid cloned voice is charged a slot fee once. Valid evidence of an external slot payment prevents a duplicate charge.

The sample payload text contains 12 Unicode characters. A public voice or cloned voice with a paid slot costs 0.0036 CNY; first production use of a cloned voice costs 138.0036 CNY. Upstream terminal usage.text_words determines the final count.

Prices, discounts, and exchange rates are locked at submission. The final amount depends on valid terminal-state usage evidence and your site's actual configuration.

Request examples

TTS and cloned voice synthesis request examples
curl -X POST "https://api.globalrouter.com/doubao/api/v3/tts/unidirectional" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'X-Api-Resource-Id: seed-tts-2.0' \
  -H 'Content-Type: application/json' \
  --data '{
  "req_params": {
    "text": "你好,这是语音合成示例。",
    "speaker": "zh_female_vv_uranus_bigtts",
    "audio_params": {
      "format": "mp3"
    }
  }
}'

Response

This is a line-delimited JSON stream, not a direct MP3 response. Read the terminal state and check code and usage.text_words. Do not replay text if usage is missing. The first postpaid ICL synthesis settles only after both slot and character evidence are available.

{"code":0,"data":"<Base64 音频块>"}
{"code":20000000,"usage":{"text_words":12}}

List voices

GET /doubao/api/v3/tts/voices?model=seed-tts-2.0&limit=50&offset=0

List managed public voices or cloned voices available to the current tenant.

Parameters

ParameterType / locationRequiredDescription
modelstring · queryYesseed-tts-2.0 or seed-icl-2.0.
limitinteger · queryNo1–100; defaults to 50.
offsetinteger · queryNoZero-based; defaults to 0.

Request examples

List voices request examples
curl -X GET "https://api.globalrouter.com/doubao/api/v3/tts/voices?model=seed-tts-2.0&limit=50&offset=0" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY"

Response

data contains voice catalog entries. The cloned catalog returns only available voices in the current tenant and original account with no pending operations.

{
  "data": [],
  "limit": 50,
  "offset": 0
}

Train a voice and custom preview

POST /doubao/api/v3/tts/voice_clone

For a first voice clone, upload one audio clip. The platform allocates a voice identifier and trains it; speaker_id and custom_speaker_id are not needed. Training also appears in async tasks. Preview text is optional.

Parameters

ParameterType / locationRequiredDescription
audio.datastringYesBase64 audio; decoded content must be nonempty and no larger than 10 MiB.
audio.formatstringRecommendedwav/mp3/ogg/m4a/aac/pcm. Required for PCM, M4A, or unrecognized headers.
textstringNoReference audio transcript, up to 65536 characters.
languageintegerNoSupports 0, 1, 2, 3, 4, 5, and 8.
extra_params.demo_textstringNo4–300 characters. Postpaid previews are billed separately by actual character count.

The request must include the GlobalRouter extension header Idempotency-Key. Reuse the original key for the same operation; see idempotency and timeout handling.

Billing

ScenarioChina siteInternational siteBilling calculation
Upload training audio onlyFreeFreeNo custom preview characters generated
Training with demo_text0.0003 CNY/character0.00004167 USD/characterUnicode character count of demo_text × character price
Play an existing preview URLFreeFreeNo new synthesis usage

Training does not incur the first slot fee. A postpaid voice incurs this fee once when first used for production synthesis with seed-icl-2.0, according to that endpoint's billing rules.

Preview character charges settle after upstream explicitly accepts training with demo_text. Explicit rejection releases the reservation. If the result is unknown, preserve the original operation for recovery and do not resubmit training.

Prices, discounts, and exchange rates are locked at submission. The final amount depends on valid terminal-state usage evidence and your site's actual configuration.

Request examples

curl -X POST "https://api.globalrouter.com/doubao/api/v3/tts/voice_clone" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-stable-operation-key' \
  -H 'Content-Type: application/json' \
  --data '{
  "audio": {
    "data": "<替换为真实 WAV 文件的 Base64>",
    "format": "wav"
  },
  "extra_params": {
    "demo_text": "你好,这是自定义试听。"
  }
}'

Response

No voice ID is needed for the first clone. Save the platform-assigned custom_speaker_id from the response for later queries and synthesis. Omit extra_params if only training is needed; supply extra_params.demo_text for a custom preview. After upstream acceptance, preview charges settle immediately by the Unicode character count of demo_text. Replaying an existing preview URL is free. Find training and upgrades by voice ID in console async tasks. Retries must reuse the same idempotency key and body to avoid allocating a new voice. Operations on the same voice are mutually exclusive; do not retrain with a new key after a timeout.

{
  "custom_speaker_id": "gr0123456789abcdef0123456789abcdef",
  "speaker_id": "gr0123456789abcdef0123456789abcdef",
  "status": 2,
  "speaker_status": [
    {
      "model_type": 4
    }
  ]
}

Get voice status

POST /doubao/api/v3/tts/get_voice

Query training status and preview details for a voice in the original account.

Parameters

ParameterType / locationRequiredDescription
speaker_idstringYesFor postpaid voices use the custom_speaker_id placeholder; for prepaid voices use the registered voice ID.
custom_speaker_idstringRequired for postpaid voicesActual platform-assigned voice identifier. Must be supplied together with the speaker_id placeholder.

Request examples

Get voice status request examples
curl -X POST "https://api.globalrouter.com/doubao/api/v3/tts/get_voice" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "speaker_id": "custom_speaker_id",
  "custom_speaker_id": "gr0123456789abcdef0123456789abcdef"
}'

Response

status 0/1/2/3/4 means untrained/training/success/failed/activated. Synthesis also requires ICL model effect status 4 or 5. A currently usable voice does not release a lock for training or upgrades with unknown results.

{
  "speaker_id": "gr0123456789abcdef0123456789abcdef",
  "status": 2,
  "speaker_status": [
    {
      "model_type": 4
    }
  ]
}

Upgrade a voice

POST /doubao/api/v3/tts/upgrade_voice

Perform a separate, optional upgrade for a voice owned by the current tenant.

Parameters

ParameterType / locationRequiredDescription
speaker_idstringYesFor postpaid voices use the custom_speaker_id placeholder; for prepaid voices use the registered voice ID.
custom_speaker_idstringRequired for postpaid voicesActual platform-assigned voice identifier. Must be supplied together with the speaker_id placeholder.

The request must include the GlobalRouter extension header Idempotency-Key. Reuse the original key for the same operation; see idempotency and timeout handling.

Request examples

Upgrade a voice request examples
curl -X POST "https://api.globalrouter.com/doubao/api/v3/tts/upgrade_voice" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Idempotency-Key: replace-with-a-stable-operation-key' \
  -H 'Content-Type: application/json' \
  --data '{
  "speaker_id": "custom_speaker_id",
  "custom_speaker_id": "gr0123456789abcdef0123456789abcdef"
}'

Response

Voices already meeting ICL 2.0 availability requirements do not need an upgrade. Use a separate stable idempotency key; an administrator must verify the original operation if its result is unknown.

{
  "speaker_id": "gr0123456789abcdef0123456789abcdef",
  "status": 2,
  "speaker_status": [
    {
      "model_type": 4
    }
  ]
}

Generation endpoints

Create video generation task

POST /doubao/api/v3/contents/generations/tasks

Create a task using an enabled Seedance video model.

Official documentation

Parameters

ParameterType / locationRequiredDescription
modelstringYesAn enabled video model ID from the model catalog. Every dreamina- model requires an explicit provider.
contentobject[]YesInput content, for example {type:"text",text:"prompt"}. Image/video inputs and roles depend on the selected model.
providerstringRequired for dreaminaDreamina requires an explicit provider such as laid or byteplus; other models keep their existing routing behavior.
resolutionstringRequired for LaidLaid requires resolution: fast/mini only 720p; standard 2.0/2.5 support 720p/1080p. Other providers keep their existing capabilities.

Request examples

curl -X POST "https://api.globalrouter.com/doubao/api/v3/contents/generations/tasks" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "model": "<已开通的 Seedance 模型 ID>",
  "content": [
    {
      "type": "text",
      "text": "日落时分,镜头缓慢掠过海面。"
    }
  ]
}'

Response

Save the returned id and use the video task query endpoint to retrieve results. Other parameters and limits depend on the selected model. Do not blindly resubmit after a submission timeout.

{
  "id": "<视频任务 ID>"
}

GlobalRouter unified video API examples

POST /api/v1/videos

These examples use the GlobalRouter unified video API, whose request format differs from the Doubao-compatible API above.

Unified video API reference
curl "https://api.globalrouter.com/api/v1/videos" \
  -H "Authorization: Bearer $GR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "doubao-seedance-2.5",
  "prompt": "电影感写实短片,清晨山间石阶,薄雾中一束柔和光线,镜头缓慢推进。",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "generate_audio": true,
  "provider": "doubao"
}'

Get video generation task

GET /doubao/api/v3/contents/generations/tasks/{task_id}

Query the original video generation task.

Official documentation

Parameters

ParameterType / locationRequiredDescription
task_idstring · pathYesThe id returned when creating the video task.

Request examples

Get video generation task request examples
curl -X GET "https://api.globalrouter.com/doubao/api/v3/contents/generations/tasks/{task_id}" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY"

Response

status is the task state. On success read content.video_url; on failure inspect error. This endpoint is for Seedance generation tasks, not subtitle/LAS platform tasks.

{
  "id": "<视频任务 ID>",
  "status": "succeeded",
  "content": {
    "video_url": "https://example.com/result.mp4"
  }
}

Image generation

POST /doubao/api/v3/images/generations

Generate images using an enabled Seedream model.

Official documentation

Parameters

ParameterType / locationRequiredDescription
modelstringYesAn enabled Seedream model ID from the model catalog.
promptstringYesImage description.
sizestringNoImage size; supported values depend on the selected model.
response_formatstringNourl or b64_json, as supported by the model.

Request examples

curl -X POST "https://api.globalrouter.com/doubao/api/v3/images/generations" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "model": "<已开通的 Seedream 模型 ID>",
  "prompt": "清晨的海边小屋,写实摄影",
  "response_format": "url"
}'

Response

Read image URLs or Base64 content from data. Save temporary URLs promptly.

{
  "data": [
    {
      "url": "https://example.com/result.png"
    }
  ]
}

Multimodal embeddings

POST /doubao/api/v3/embeddings/multimodal

Generate multimodal embeddings from text, image, or video input.

Official documentation

Parameters

ParameterType / locationRequiredDescription
modelstringYesAn enabled multimodal embedding model.
inputobject[]YesSupply text, image_url, or video input according to type. The model defines the structure.
encoding_formatstringNoThe example uses float.
dimensionsintegerNoOutput dimensions supported by the selected model.
sparse_embeddingobjectNoSparse embedding configuration, for example {type:"disabled"}.

Request examples

Multimodal embeddings request examples
curl -X POST "https://api.globalrouter.com/doubao/api/v3/embeddings/multimodal" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "model": "doubao-embedding-vision-251215",
  "input": [
    {
      "type": "text",
      "text": "图片中的建筑是什么?"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/tower.png"
      }
    }
  ],
  "encoding_format": "float",
  "dimensions": 1024,
  "sparse_embedding": {
    "type": "disabled"
  }
}'

Response

Returns native model embeddings. The OpenAI-compatible embeddings endpoint accepts only text; use this endpoint for mixed inputs.

SeedAudio 1.0 audio generation

POST /doubao/api/v3/tts/create

Generate audio from text and reference resources.

API conventions

The request body follows Volcengine SeedAudio 1.0. Replace the domain with GlobalRouter and authenticate with Authorization: Bearer <GlobalRouter API Key> authentication. The GlobalRouter server selects the dedicated doubao_audio Provider and its upstream credentials by default.

MethodPOST
Path/doubao/api/v3/tts/create
Modeldoubao-seed-audio-1-0
Upstream model mappingseed-audio-1.0
ProviderThe GlobalRouter server selects the dedicated doubao_audio Provider by default. Do not include provider in the request body.
Authentication boundarySend only the GlobalRouter Bearer key, not the upstream X-Api-Key.
Usage price1 CNY/minute
Billable durationBilled by original_duration; playback speed does not affect billable duration.

Parameters

FieldRequiredDescription
modelYesUse doubao-seed-audio-1-0; the official seed-audio-1.0 alias is also supported.
text_promptYesText to synthesize or a generation prompt, up to 3000 characters. Reference audio sequentially with @音频N.
referencesNoReference resources. For audio use speaker, audio_data, or audio_url; for images use image_data or image_url.
audio_configNoSupports format, sample_rate, speech_rate, loudness_rate, pitch_rate, and enable_subtitle.
watermarkNoWatermark object supporting aigc_watermark and aigc_metadata.
Reference resource limits
  • Up to 3 reference audio clips, each up to 30 seconds and 10 MB. Supports wav, mp3, pcm, and ogg_opus.
  • One reference image, up to 10 MB. Supports jpeg, png, and webp.
  • Audio and image references cannot be combined. Choose one of speaker, audio_data, or audio_url, or one of image_data or image_url.

Response

FieldDescription
code / messageUpstream business status. Nonzero code values map to stable SeedAudio Provider errors.
audioBase64-encoded audio content.
urlTemporary upstream download URL, valid for 2 hours.
durationAudio duration in seconds after speed adjustment or post-processing.
original_durationOriginal model audio duration, up to 120 seconds. This field determines billing.
subtitleReturned when enable_subtitle is enabled, with text, sentences, and words using millisecond timestamps.
X-Tt-LogidVolcengine request trace ID in the response headers.

Request examples

curl -X POST "https://api.globalrouter.com/doubao/api/v3/tts/create" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seed-audio-1-0",
    "text_prompt": "生成一段舒缓的钢琴曲,氛围柔和、放松。",
    "audio_config": {
      "format": "mp3",
      "enable_subtitle": true
    }
  }'
Response example
{
  "code": 0,
  "message": "success",
  "audio": "<base64-audio>",
  "duration": 12.4,
  "original_duration": 12.4,
  "url": "https://example.com/generated.mp3",
  "subtitle": {
    "text": "清晨,海边吹来温柔的风。",
    "sentences": [{
      "start_time": 0,
      "end_time": 12400,
      "text": "清晨,海边吹来温柔的风。",
      "words": [{"start_time": 0, "end_time": 600, "text": "清晨"}]
    }]
  }
}

Notes

Send only GlobalRouter authentication

Do not include provider in the request body. Do not send the upstream X-Api-Key or include api_key, ApiKey, or Authorization in the body. The GlobalRouter server uses the dedicated doubao_audio Provider and platform-configured server credentials to access the upstream service, and recursively removes authentication fields from the request body.

For official parameters and limits, see Volcengine API documentation. For pricing and billing rules, see Volcengine billing documentation.

Asset endpoints

Asset Actions use /doubao/ with Version=2024-01-01. The provider field is optional: omitting it follows the existing default route; specify a provider to select a particular route. On asset creation the selected provider must match the group; list assets by GroupIds in the same provider. This rule does not apply to dreamina- video generation, which requires provider. Virtual and real-person assets share these Actions; complete real-person verification first.

Check asset review status and project ownership before use

Assets must pass review (Active) before use. Video generation must use an inference endpoint in the same project as the asset.

Asset API reference attachment

Create asset group

POST /doubao/?Action=CreateAssetGroup&Version=2024-01-01

Virtual and real-person portraits share this Action. The platform validates resource ownership by tenant.

Official documentation

Parameters

ParameterType / locationRequiredDescription
providerstringNoOptional; omitting it follows existing provider selection. Specify a provider to select a particular route.
NamestringYesGroup name.
GroupTypestringYesUse AIGC for virtual portraits. Real-person portrait groups are created from verification results.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

Create asset group request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=CreateAssetGroup&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "Name": "演示分组",
  "GroupType": "AIGC"
}'

Response

Returns the group identifier. Use GroupId when uploading assets. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

Upload asset

POST /doubao/?Action=CreateAsset&Version=2024-01-01

Virtual and real-person portraits share this Action. The platform validates resource ownership by tenant.

Official documentation

Parameters

ParameterType / locationRequiredDescription
providerstringNoOptional; omitting it follows existing provider selection. Specify a provider to select a particular route.
GroupIdstringNo当前租户拥有、且属于所选 provider 的分组 ID;XJU 素材必填,真人人像使用认证得到的分组。
URLstringYesReadable public asset URL.
AssetTypestringYesUse Image for images.
Namestring条件素材名称;使用 XJU 时必填。
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

Upload asset request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=CreateAsset&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "GroupId": "<素材分组 ID>",
  "URL": "https://example.com/portrait.png",
  "AssetType": "Image",
  "Name": "portrait.png"
}'

Response

Returns the asset identifier. Query review status before use; only Active assets can be used for generation. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

List asset groups

POST /doubao/?Action=ListAssetGroups&Version=2024-01-01

Virtual and real-person portraits share this Action. The platform validates resource ownership by tenant.

Official documentation

Parameters

ParameterType / locationRequiredDescription
providerstringNoOptional; omitting it follows existing provider selection. Specify a provider to select a particular route.
GroupTypestringNoAIGC or LivenessFace, according to asset type.
PageNumber / PageSizeintegerNoPagination; the example uses page 1 with 10 items per page.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

List asset groups request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=ListAssetGroups&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "GroupType": "AIGC",
  "PageNumber": 1,
  "PageSize": 10
}'

Response

Returns groups owned by this tenant and pagination details. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

List assets

POST /doubao/?Action=ListAssets&Version=2024-01-01

Virtual and real-person portraits share this Action. The platform validates resource ownership by tenant.

Official documentation

Parameters

ParameterType / locationRequiredDescription
providerstringNoOptional; omitting it follows existing provider selection. Specify a provider to select a particular route.
GroupIdsstring[]NoFilter by tenant-owned groups. To list a group’s assets, pass its ID in GroupIds and match its provider.
Statusesstring[]NoFilter by review status.
NamestringNoFilter by name.
PageNumber / PageSizeintegerNoPagination parameters.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

List assets request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=ListAssets&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "GroupIds": [
    "<素材分组 ID>"
  ],
  "PageNumber": 1,
  "PageSize": 10
}'

Response

Returns assets owned by the current tenant and pagination details. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

Get asset

POST /doubao/?Action=GetAsset&Version=2024-01-01

Virtual and real-person portraits share this Action. The platform validates resource ownership by tenant.

Official documentation

Parameters

ParameterType / locationRequiredDescription
providerstringNoOptional; omission uses the existing default route. Specify the provider when accessing its resources; a route that does not match resource ownership is rejected.
IdstringYesAsset ID owned by the current tenant.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

Get asset request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=GetAsset&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "Id": "<素材 ID>"
}'

Response

Returns original asset details and review status. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

Update asset

POST /doubao/?Action=UpdateAsset&Version=2024-01-01

Virtual and real-person portraits share this Action. The platform validates resource ownership by tenant.

Official documentation

Parameters

ParameterType / locationRequiredDescription
providerstringNoOptional; omission uses the existing default route. Specify the provider when accessing its resources; a route that does not match resource ownership is rejected.
IdstringYesAsset ID owned by the current tenant.
NamestringNoNew asset name.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

Update asset request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=UpdateAsset&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "Id": "<素材 ID>",
  "Name": "更新后的素材名称"
}'

Response

Returns the upstream update result after validating tenant ownership. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

Delete asset

POST /doubao/?Action=DeleteAsset&Version=2024-01-01

Virtual and real-person portraits share this Action. The platform validates resource ownership by tenant.

Official documentation

Parameters

ParameterType / locationRequiredDescription
providerstringNoOptional; omission uses the existing default route. Specify the provider when accessing its resources; a route that does not match resource ownership is rejected.
IdstringYesAsset ID owned by the current tenant.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

Delete asset request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=DeleteAsset&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "Id": "<素材 ID>"
}'

Response

Returns the deletion result and removes platform asset ownership on success. Confirm no active references remain before deleting. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

Get asset group

POST /doubao/?Action=GetAssetGroup&Version=2024-01-01

Virtual and real-person portraits share this Action. The platform validates resource ownership by tenant.

Official documentation

Parameters

ParameterType / locationRequiredDescription
providerstringNoOptional; omission uses the existing default route. Specify the provider when accessing its resources; a route that does not match resource ownership is rejected.
IdstringYesGroup ID owned by the current tenant.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

Get asset group request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=GetAssetGroup&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "Id": "<素材分组 ID>"
}'

Response

Returns group details after validating tenant ownership. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

Update asset group

POST /doubao/?Action=UpdateAssetGroup&Version=2024-01-01

Virtual and real-person portraits share this Action. The platform validates resource ownership by tenant.

Official documentation

Parameters

ParameterType / locationRequiredDescription
providerstringNoOptional; omission uses the existing default route. Specify the provider when accessing its resources; a route that does not match resource ownership is rejected.
IdstringYesGroup ID owned by the current tenant.
NamestringNoNew group name.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

Update asset group request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=UpdateAssetGroup&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "Id": "<素材分组 ID>",
  "Name": "更新后的分组名称"
}'

Response

Returns the upstream update result after validating tenant ownership. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

Delete asset group

POST /doubao/?Action=DeleteAssetGroup&Version=2024-01-01

Virtual and real-person portraits share this Action. The platform validates resource ownership by tenant.

Official documentation

Parameters

ParameterType / locationRequiredDescription
providerstringNoOptional; omission uses the existing default route. Specify the provider when accessing its resources; a route that does not match resource ownership is rejected.
IdstringYesGroup ID owned by the current tenant.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

Delete asset group request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=DeleteAssetGroup&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "Id": "<素材分组 ID>"
}'

Response

Returns the deletion result and removes platform group ownership on success. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

Create real-person portrait verification session

POST /doubao/?Action=CreateVisualValidateSession&Version=2024-01-01

Used for real-person portrait authorization and asset group binding.

Official documentation

Parameters

ParameterType / locationRequiredDescription
CallbackURLstringAs configured for your workflowHTTPS callback URL for verification results.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

Create real-person portrait verification session request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=CreateVisualValidateSession&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "CallbackURL": "https://example.com/verification/callback"
}'

Response

Read BytedToken and the verification link from Result to complete real-person authorization. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

Get real-person portrait verification result

POST /doubao/?Action=GetVisualValidateResult&Version=2024-01-01

Used for real-person portrait authorization and asset group binding.

Official documentation

Parameters

ParameterType / locationRequiredDescription
BytedTokenstringYesBytedToken returned by the verification session.
ProjectNamestringNoProject containing the asset. Defaults to the configured project. Video generation must use an endpoint in the same project.

Request examples

Get real-person portrait verification result request examples
curl -X POST "https://api.globalrouter.com/doubao/?Action=GetVisualValidateResult&Version=2024-01-01" \
  -H "Authorization: Bearer $GLOBALROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "BytedToken": "<认证会话 Token>"
}'

Response

Successful verification returns a group identifier and binds it to the current tenant. A missing group does not mean verification is complete. Asset Actions return native upstream responses. Business fields vary by Action; do not parse them as standard media tasks.

Voice and media billing

ScenarioBilling unitReference price (CNY)Approximate price (USD)
Fine subtitle erasureminute10.1389
LAS standard detection / pixel_replaceminute1.20.1667
LAS standard detection / pixel_generateminute1.60.2222
LAS precise detection / pixel_replaceminute2.80.3889
LAS precise detection / pixel_generateminute3.20.4444
TTS production characterscharacter0.00030.00004167
ICL production characterscharacter0.00030.00004167
Postpaid training preview characterscharacter0.00030.00004167
First postpaid voice slotvoice_slot13819.1667

Converted at 1 USD ≈ 7.2 CNY for reference only. Actual charges depend on platform configuration.

Video charges use actual billable usage; characters use actual consumption. The first postpaid slot is charged only when its first charge is triggered.

File endpoints

Upload file

POST /doubao/api/v3/files

Upload a file or file URL with a GlobalRouter API key. Form parameters are forwarded to Ark with no platform charge.

Official documentation

Get file

GET /doubao/api/v3/files/{file_id}

Query Ark file status by file ID and return the original Ark result.

Official documentation