AnalyzeMedia docs
The AnalyzeMedia API analyzes a video, an audio file, or an image once and returns a .analyzemedia file: a small JSON document that lists every fact about the file with its time. A model reads that file in under a second instead of processing the media. The file is an open format, so any program can read it, and any program that has the original can write one.
Quick start
You need an API key. Create one on the platform. New accounts start with $5 of credit. The base URL is https://api.analyzemedia.ai.
-
Declare the file and get a URL to upload it to:
curl -X POST https://api.analyzemedia.ai/v1/uploads \ -H "Authorization: Bearer sm_live_…" -H "Content-Type: application/json" \ -d '{"filename":"IMG_1731.MOV","bytes":61230411}'The response contains
upload_idandupload.url. -
Put the file's bytes to that URL. This request needs no API key:
curl -X PUT "$UPLOAD_URL" -H "Content-Type: video/quicktime" --data-binary @IMG_1731.MOV -
Start the analysis and declare the file's type:
curl -X POST https://api.analyzemedia.ai/v1/analyses \ -H "Authorization: Bearer sm_live_…" -H "Content-Type: application/json" \ -d '{"upload_id":"up_…","type":"video/footage"}'The response contains the job's
id. PollGET /v1/analyses/:iduntilstatusisdone, or pass awebhook_urland wait for the event. -
Download the sidecar and save it next to the original:
curl "https://api.analyzemedia.ai/v1/analyses/an_…/result?format=analyzemedia" \ -H "Authorization: Bearer sm_live_…" -o IMG_1731.MOV.analyzemedia
The API holds the job's estimated price when it accepts the job and charges the actual cost when the job ends. A failed job costs nothing.
Where to go next
- Route reference Every route, with request and response bodies, error codes, rate limits, and webhooks.
- Pricing One price per file type, per minute of video or audio and per image.
- What a sidecar is The file the API returns, and the rules that every reader can rely on.
- The six types Which type to declare for a file, and what each type includes.