Download video content
GET
/videos/{id}/content
const url = 'https://api.saygm.com/v1/videos/example/content?variant=video';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.saygm.com/v1/videos/example/content?variant=video' \ --header 'Authorization: Bearer <token>'Download completed video content as MP4. Content is available until the job’s expires_at time; after expiry this endpoint returns HTTP 410 with error.code video_content_expired. A job response marks an expired artifact with status failed and error code expired.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Query Parameters
Section titled “Query Parameters”variant
string
The only accepted value is video; this is also the default when omitted.
Responses
Section titled “Responses”The MP4 video file.
Media typevideo/mp4
string format: binary
Headers
Section titled “Headers”Content-Disposition
string
Cache-Control
string
The API key is missing or invalid.
Media typeapplication/json
object
error
required
object
message
required
string
type
required
string
code
required
string
param
required
string | null
key
additional properties
any
charged
boolean
billing_status
string
potentially_charged
boolean
key
additional properties
any
Example
{ "billing_status": "settled"}The job was not found for this account.
Media typeapplication/json
object
error
required
object
message
required
string
type
required
string
code
required
string
param
required
string | null
key
additional properties
any
charged
boolean
billing_status
string
potentially_charged
boolean
key
additional properties
any
Example
{ "billing_status": "settled"}The video is not ready or generation failed.
Media typeapplication/json
object
error
required
object
message
required
string
type
required
string
code
required
string
param
required
string | null
key
additional properties
any
charged
boolean
billing_status
string
potentially_charged
boolean
key
additional properties
any
Example
{ "billing_status": "settled"}The video content has expired. error.code is video_content_expired.
Media typeapplication/json
object
error
required
object
message
required
string
type
required
string
code
required
string
param
required
string | null
key
additional properties
any
charged
boolean
billing_status
string
potentially_charged
boolean
key
additional properties
any
Example
{ "billing_status": "settled"}Byte range requests are not supported.
Media typeapplication/json
object
error
required
object
message
required
string
type
required
string
code
required
string
param
required
string | null
key
additional properties
any
charged
boolean
billing_status
string
potentially_charged
boolean
key
additional properties
any
Example
{ "billing_status": "settled"}The video content could not be delivered.
Media typeapplication/json
object
error
required
object
message
required
string
type
required
string
code
required
string
param
required
string | null
key
additional properties
any
charged
boolean
billing_status
string
potentially_charged
boolean
key
additional properties
any
Example
{ "billing_status": "settled"}The service cannot complete the request right now.
Media typeapplication/json
object
error
required
object
message
required
string
type
required
string
code
required
string
param
required
string | null
key
additional properties
any
charged
boolean
billing_status
string
potentially_charged
boolean
key
additional properties
any
Example
{ "billing_status": "settled"}