API reference / VOD analysis
Create a VOD analysis and open an upload session
Checks the caller’s quota and the declared file size, creates the resource in state
UPLOADING and returns a resumable upload session URL for Google Cloud Storage. The client
uploads the file straight to that URL (chunked, resumable) and then calls start. Uploads
never pass through this API.
Not idempotent: repeating an accepted request creates another analysis and uses another slot.
After a timeout or lost response, inspect listVodAnalyses before deciding to create another.
There is no idempotency-key header to deduplicate creation requests.
See https://mediaseer.ai/docs/guides/retries/ for retry and reconciliation guidance.
A confirmed email may be required: otherwise 403 (EMAIL_NOT_VERIFIED) and nothing is created.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Name of the file the client is about to upload. Shown until a title exists.
Example
episode-01.mp4Declared file size, checked against the size limit before an upload session is issued.
Example
734003200MIME type the client will send: a video/* type. Omit it when the type is unknown.
Example
video/mp4Optional title. Without it, the analysis’s inferred title is used once known, and fileName until then.
Responses
Section titled “Responses”Created. Upload to upload.url, then call start.
object
object
UPLOADING: created, waiting for the client to upload and callstartQUEUED: started; the video’s length is checked, then it waits to be processedPROCESSING: encoding and analysis runningFINISHED: results availableFAILED: could not start or finish, or the video was too long; seeerrorCANCELLED: stopped by you or the processing service
Name of the uploaded file.
Given at create, else inferred by the analysis.
Summary of the whole video, from the analysis.
Size of the uploaded object; known from start on.
When start was accepted.
When the resource reached a terminal state.
Why the analysis failed. Only set in state FAILED.
object
A sentence for people, in Mediaseer’s own words, never the processing platform’s text. It names the cause when Mediaseer knows it, such as a video longer than the length limit or a start that never ran; otherwise it says only that the encoding failed or no longer exists. Don’t branch on its wording.
Whether clips can be created from this analysis, and if not, why. Treat an absent
clips as not available.
object
Whether clips can be created from the analysis now.
Why not. Set exactly while available is false.
A Google Cloud Storage resumable upload session. Upload the file with PUT requests to url
(whole file, or chunks with Content-Range); the session supports resuming after a network
drop. No credentials are needed; the URL is the credential.
object
Deadline for uploading to this URL. A completed upload can still be started within the analysis’s upload window.
Example
{ "analysis": { "id": "7f3c2a1e-0b4d-4c7e-9a52-1d2e3f4a5b6c", "state": "UPLOADING", "fileName": "episode-01.mp4", "title": "Los Angeles 1947", "description": "A noir mystery set in Los Angeles in 1947.", "sceneCount": 9, "keywords": [ "Los Angeles", "1947", "mystery" ], "durationSeconds": 719.02, "sizeBytes": 734003200, "error": { "message": "The encoding failed." }, "clips": { "reason": "UNSUPPORTED_FILE_TYPE" } }, "upload": { "url": "https://storage.googleapis.com/upload/storage/v1/b/example-uploads/o?uploadType=resumable&upload_id=example" }}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" } ]}The credentials are valid but this action is not allowed (FORBIDDEN), or a confirmed email
is required to create or start an analysis (EMAIL_NOT_VERIFIED).
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" } ]}A limit was hit (QUOTA_EXCEEDED). details[].field can name your analysis slots (jobs),
file size (sizeBytes), your plan’s storage for source videos (storage, when creating an
analysis), your plan’s analysed minutes (minutes, when starting an analysis) or daily
starts (dailyStarts).
jobs: delete an analysis you no longer need to free a slot.sizeBytes: use a smaller file; retrying the same oversized upload does not help.storage: the file’s size does not fit into what your source videos (storage.sourceBytesingetUsage) leave ofstorage.limitBytes. Clips do not count. Delete analyses you no longer need; a successful delete frees their storage at once.minutes: no analysed minutes are left in this period (minutesingetUsage). They start again from 0 atperiod.end; deleting an analysis does not give them back.dailyStarts: wait until the next UTC day. Stopping or deleting an analysis does not refund a daily start.
Follow the response’s guidance for another refusal. These quota refusals do not include a
Retry-After header; do not repeatedly retry an unchanged request.
See https://mediaseer.ai/docs/guides/retries/#quota-refusals for recovery guidance.
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" } ]}