API reference / Clips
Get the URLs to watch and download a clip
Only available once the job is READY. Returns short-lived signed URLs for the clip, its
poster and its download as JSON, not as a redirect: a <video> element and a download link
send no Authorization header, so they use these URLs as they are. Every call returns fresh
URLs. Call it before playing, and again once they expire (expiresAt), for example when a
seek fails.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The clip job’s id.
The clip’s number within the job, from 1.
Query Parameters
Section titled “Query Parameters”ORIGINAL: the clip as the clip service made itEDITED: the newest finished edit of the clip
Which version of the clip. Leaving it out means ORIGINAL. With EDITED, the URLs are
those of the newest finished edit of the clip in the web app’s editor, and the clip’s
editedAt is brought up to date; a clip without a finished edit is a 404
(NOT_FOUND).
Responses
Section titled “Responses”OK
Signed URLs for one clip. They need no credentials: the URL is the credential, so don’t log or share it.
object
The clip as MP4, for the src of a <video> element. It supports range requests, so the video can seek.
A still of the clip, for the video’s poster. Absent when the clip has none. Posters are
made on a best-effort basis, so even a given one can fail to load; show the video without
it then.
The same clip served as a file download (Content-Disposition: attachment), for a download link.
When the URLs stop working. Each request is checked, so a playback that started earlier can fail after this, at its next seek: get new URLs and continue from the same position.
Example
{ "episodeUrl": "https://storage.googleapis.com/clips/0b9e4d2c/episode_001.mp4?X-Goog-Signature=3f9a", "posterUrl": "https://storage.googleapis.com/clips/0b9e4d2c/episode_001.webp?X-Goog-Signature=7c2e", "downloadUrl": "https://storage.googleapis.com/clips/0b9e4d2c/episode_001.mp4?response-content-disposition=attachment&X-Goog-Signature=9d41"}The request is malformed or fails validation (VALIDATION).
object
Stable machine-readable code. Clients branch on this, never on message.
Human-readable, safe to show to the user. For VALIDATION with a single detail, it states
that detail’s reason, naming the field where the reason needs it; with several, it is
generic and details lists them.
Optional field-level or limit-level detail.
object
The request field the detail refers to, if any; for QUOTA_EXCEEDED, the limit that was
hit.
Example
{ "code": "VALIDATION", "message": "The file is larger than the limit of 2147483648 bytes.", "details": [ { "field": "sizeBytes", "message": "must be at most 2147483648" } ]}Missing, invalid or expired credentials (UNAUTHENTICATED).
object
Stable machine-readable code. Clients branch on this, never on message.
Human-readable, safe to show to the user. For VALIDATION with a single detail, it states
that detail’s reason, naming the field where the reason needs it; with several, it is
generic and details lists them.
Optional field-level or limit-level detail.
object
The request field the detail refers to, if any; for QUOTA_EXCEEDED, the limit that was
hit.
Example
{ "code": "VALIDATION", "message": "The file is larger than the limit of 2147483648 bytes.", "details": [ { "field": "sizeBytes", "message": "must be at most 2147483648" } ]}No such clip job, or the job has no clip with this number (NOT_FOUND).
object
Stable machine-readable code. Clients branch on this, never on message.
Human-readable, safe to show to the user. For VALIDATION with a single detail, it states
that detail’s reason, naming the field where the reason needs it; with several, it is
generic and details lists them.
Optional field-level or limit-level detail.
object
The request field the detail refers to, if any; for QUOTA_EXCEEDED, the limit that was
hit.
Example
{ "code": "VALIDATION", "message": "The file is larger than the limit of 2147483648 bytes.", "details": [ { "field": "sizeBytes", "message": "must be at most 2147483648" } ]}The resource is in a state that does not allow this operation (INVALID_STATE).
object
Stable machine-readable code. Clients branch on this, never on message.
Human-readable, safe to show to the user. For VALIDATION with a single detail, it states
that detail’s reason, naming the field where the reason needs it; with several, it is
generic and details lists them.
Optional field-level or limit-level detail.
object
The request field the detail refers to, if any; for QUOTA_EXCEEDED, the limit that was
hit.
Example
{ "code": "VALIDATION", "message": "The file is larger than the limit of 2147483648 bytes.", "details": [ { "field": "sizeBytes", "message": "must be at most 2147483648" } ]}This environment offers no clips (CLIPS_NOT_CONFIGURED): its backend has no access to the
clip service. Trying again does not help.
object
Stable machine-readable code. Clients branch on this, never on message.
Human-readable, safe to show to the user. For VALIDATION with a single detail, it states
that detail’s reason, naming the field where the reason needs it; with several, it is
generic and details lists them.
Optional field-level or limit-level detail.
object
The request field the detail refers to, if any; for QUOTA_EXCEEDED, the limit that was
hit.
Example
{ "code": "VALIDATION", "message": "The file is larger than the limit of 2147483648 bytes.", "details": [ { "field": "sizeBytes", "message": "must be at most 2147483648" } ]}default
Section titled “default”Unexpected error
object
Stable machine-readable code. Clients branch on this, never on message.
Human-readable, safe to show to the user. For VALIDATION with a single detail, it states
that detail’s reason, naming the field where the reason needs it; with several, it is
generic and details lists them.
Optional field-level or limit-level detail.
object
The request field the detail refers to, if any; for QUOTA_EXCEEDED, the limit that was
hit.
Example
{ "code": "VALIDATION", "message": "The file is larger than the limit of 2147483648 bytes.", "details": [ { "field": "sizeBytes", "message": "must be at most 2147483648" } ]}