Skip to content

Get video captions

POST/v1/api/youtube/web-v2/video-captions

Get video caption list or caption content for a specific language Supports multiple caption format outputs

Request body

Call this sync operation at its vendor-qualified URL. The model identity is encoded in the path; only operation-specific input fields belong in the request body.

Optional<string>format

Caption format

Allowed values: srt, xml, json3, txt

Default: srt

Optional<string>language_code

Language code (e.g. en, zh-Hans, a.en), returns available caption list if empty

Optional<string>video_id

Video ID (recommended)

Optional<string>video_url

Full video URL (optional)

Response Schema

A synchronous completed response contains exactly one outputs item with only data. Failed and timeout responses contain error and never outputs.

stringidrequired

Opaque SandBase run identifier. Use it exactly as returned; no prefix is guaranteed.

stringstatusrequired

Current public run status.

Allowed values: pending, running, completed, failed, timeout

stringmodelrequired

Public SandBase model name used for this run.

Optional<array<object>>outputs

Present only for completed runs. Contains exactly one item whose only field is data.

Optional<object | array>outputs[0].data

Operation-specific business payload. This reference uses an empty object when no safe example can be confirmed.

Optional<object>error

Present only for failed or timeout runs. Contains a public error type and sanitized message.

Optional<string>error.type

Stable public error category.

Optional<string>error.message

Sanitized error message safe to show to clients.

Optional<object>usage

Usage details when available.

API capabilities

array<string>capability_tagsrequired

Capabilities declared by the API registry.

Default: api, youtube

stringexecution_moderequired

Execution mode declared by the API registry.

Default: sync

pending response

{"id":"f3d2e8a1-7c4b-4a12-9d2e-123456789abc","status":"pending","model":"youtube/web-v2/video-captions"}

running response

{"id":"f3d2e8a1-7c4b-4a12-9d2e-123456789abc","status":"running","model":"youtube/web-v2/video-captions"}

completed response

{"id":"f3d2e8a1-7c4b-4a12-9d2e-123456789abc","status":"completed","model":"youtube/web-v2/video-captions","outputs":[{"data":{}}]}

failed response

{"id":"f3d2e8a1-7c4b-4a12-9d2e-123456789abc","status":"failed","model":"youtube/web-v2/video-captions","error":{"type":"upstream_error","message":"upstream request failed"}}

timeout response

{"id":"f3d2e8a1-7c4b-4a12-9d2e-123456789abc","status":"timeout","model":"youtube/web-v2/video-captions","error":{"type":"upstream_error","message":"upstream request failed"}}