Download video

GET/v1/videos/{video_id}/content

Download the generated video content for a completed video generation task.

Use this endpoint after GET /v1/videos/{video_id} returns status: "completed". The default response is a redirect to a fresh signed URL. You can also request a JSON URL response or stream the video binary through the API.

Authentication

Authorization Bearer

API key as bearer token in Authorization header.

Path and Query Parameters

video_idstringrequired

The video task ID.

formatenum<string>default:redirect

Response format. Use redirect for a 302 redirect, url for JSON, or binary to stream the video file through the API.

Available options: redirect url binary

Response

redirect302

Default mode. Redirects to a signed video URL.

urlobject

Returned when format=url.

url.urlstring

Signed video URL.

url.video_idstring

Video task ID.

url.expires_ininteger

Signed URL lifetime in seconds.

binaryvideo/mp4

Returned when format=binary. Response includes Content-Disposition attachment filename.

If the task is not completed yet, the API returns an error object with the current status.

Request

Download Mode-1: Redirect download

Shell
1curl -L https://api.token360.ai/v1/videos/your-video-id/content \
2  -H "Authorization: Bearer sk-your-api-key" \
3  -o video.mp4

Download Mode-2: Return a signed URL

Shell
1curl "https://api.token360.ai/v1/videos/your-video-id/content?format=url" \
2  -H "Authorization: Bearer sk-your-api-key"

Download Mode-3: Stream binary content

Shell
1curl "https://api.token360.ai/v1/videos/your-video-id/content?format=binary" \
2  -H "Authorization: Bearer sk-your-api-key" \
3  -o video.mp4

Response

Signed URL response:

JSON
1{
2  "url": "your-signed-video-url",
3  "video_id": "your-video-id",
4  "expires_in": 3600
5}

Not ready:

JSON
1{
2  "error": {
3    "message": "Video is not ready yet. Current status: in_progress",
4    "type": "invalid_request_error"
5  }
6}
Was this page helpful?