Generating with the API
The sidecar that the API returns is exactly the analyzemedia 0.1 document that these pages describe. This page explains how the API's response maps to the format.
Two other places cover the API itself. The overview shows the four calls, and pricing lists the prices and the limits. The route reference documents every route with its request and response bodies, the error codes, the rate limits, and the webhook format.
What you declare and what you get
- The type You set
typeonPOST /v1/analysesto one of the six types. The document that you get back is that type's page, filled in: video/footage, video/edit, audio/speech, audio/music, image/scene, or image/graphic. The API never guesses the type from the content. - The envelope
generated.generatorisanalyzemedia-api.generated.modelsnames the models that analyzed the file, by role.sourceholds the facts of the original as the format defines them. - Every section the type carries The API runs one level of analysis, so every section that the type page lists is present. An empty section means that the API analyzed it and found nothing.
- The checks Before the API returns a document, it checks the envelope, that ids start at 1 in time order, that every list is in time order, and that scenes are contiguous. These are the checks that writing one asks of a writer.
Three result formats
format= | what it is |
|---|---|
analyzemedia | The sidecar. This is the default. Save it as <name>.analyzemedia next to the original. |
text | The same document rendered as plain text for a model, as reading one describes. |
json | The API's full internal analysis. It is larger than the format, and it can change between releases. Use it to debug a result, and keep the sidecar. |
The original and the proxy
The analysis only needs a 720p-class copy of a video. A client can upload a proxy and describe the original in source on the analysis request: name, bytes, sha256, quick_hash, capture time with the camera's time zone, location, camera, and the video and audio track facts. The API then writes the document about the original. The document's source block holds what the client declared, and generated.proxy records what the API analyzed. The API reads nothing from the proxy's own metadata for this. Pricing lists the limits and the proxy recipe.