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.

  1. 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_id and upload.url.

  2. 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
    
  3. 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. Poll GET /v1/analyses/:id until status is done, or pass a webhook_url and wait for the event.

  4. 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