Analyze Audio
Changed onFind the beats, bar starts and sections of a piece of audio, or describe it, with a Gemini model. The request waits for the answer and returns it. Every time is in seconds from the start of the uploaded WAV and is the model's own estimate, no finer than time_resolution_seconds. A capability the model could not answer is left out of the response. Each request is priced at the model's cost for the audio's length plus an allowance for the answer. A request the workspace's API credits cannot cover is refused with 402 insufficient_credit before the model runs. The credits are charged before the model runs, and failures are refunded before being recorded. Upload PCM WAV through the asset upload API and pass its asset_id. Send an Idempotency-Key header with every request: it is required. Repeating a request with the same key and body returns the original answer without charging again, a duplicate sent while the original is still running gets 409 request_in_progress, and the same key with a different body gets 409 conflict. Failed requests replay their stored error; use a new key for a new attempt. A pending job older than 30 minutes is refunded on replay, then failed. Recovery requires a later replay; it is not scheduled automatically.
Request
- Base URLhttps://api.heygen.com
- URLhttps://api.heygen.com/v3/audio/analysis
- AuthAPI key in header x-api-key
Headers
Required client-supplied key for safely retrying a request that charges. A retry within 24 hours that shares this key returns the original response instead of running again. The body must be the same: a different body under the same key returns 409 conflict. A retry that arrives while the original is still in flight gets a 409 request_in_progress. When the original could not be confirmed, repeating it with the same key settles that attempt instead of starting another. Scope is the space plus the request path, so the same key on another video is independent, and a key sent by another member of the space replays that member's response. A missing or blank value is rejected with 400. Keys must be 1–255 characters from [A-Za-z0-9_:.-]; a UUID is a safe default.
Request body
Response
What the model answered.
Changes
- info
endpoint added
- info