Skip to content

Run Native Media Inference

POST/v1/inference

Overview

Run a direct native image, video, music, audio processing, image classification or visual question-answering model.

Routing and provider details

Requires inference.write, funded credits, Idempotency-Key and NATIVE_INFERENCE_ENABLED. Also accepts /api/v1/inference. Use the model catalog to select an inference-protocol model.

Image inputs must be an inline 1024×1024 PNG, JPEG or WebP, up to 4 MiB. Image generation returns one square 1024 image. Video generation returns one fixed five-second clip. Music duration is model-specific. Classification accepts 2–32 unique labels. ElevenLabs supports music, sound effects, voice conversion, isolation and dialogue. Conversion and isolation accept a mono 16 kHz PCM16 WAV data URL up to 60 seconds; conversion also requires a voice ID. Dialogue accepts up to 2,000 characters across ten voices. Music accepts 3–60 seconds; sound effects accept 0.5–30 seconds. Output media is returned as base64. No arbitrary URLs, callbacks or native options are accepted. Published model-specific units determine billing; provider cost estimates are not billing receipts. Ambiguous outcomes retain their hold. Reusing the idempotency key never repeats generation.

Authorization

Authorizationstring · headerRequired

AudioLab API key sent as Bearer <token>. Authentication guide

Parameters

Idempotency-Keyheader · stringRequired

Request Body

application/json
providerobject

Provider preferences for a single-endpoint product.

Show nested fields
data_regionstring | string[]

Route only to endpoints documented as processing in this region: us, eu (which includes EU member states), or a country code such as nl, sg, in or cn. A list matches any of its regions. Endpoints whose region is global or unknown never match; global on its own means no requirement. The request's region narrows the workspace's Data Region and a named router's region policy, and never widens them. Fallbacks keep to it. When no endpoint qualifies, the request is refused with 400 data_region_unavailable, param provider.data_region.

Show nested fields
Option 1: string

string

Option 2: string[]

See the OpenAPI schema for this nested object.

modelstringRequired

Model ID from the catalog.

promptstring

Required for generation and visual questions; limited to 1024 UTF-8 bytes.

imagestring

Inline base64 raster; required for image editing, classification and visual questions.

labelsstring[]
Show nested fields

string

audiostring

Inline mono 16 kHz PCM16 WAV data URL for voice conversion or isolation.

voicestring

Provider voice ID for conversion.

duration_msinteger

Output duration for ElevenLabs music or sound effects.

Minimum 500 · Maximum 60000

instrumentalboolean

ElevenLabs music only.

loopboolean

ElevenLabs sound effects only.

dialogueobject[]
Show nested fields
textstringRequired
voicestringRequired
lyricsstring

Optional for supported non-ElevenLabs music models.

seedinteger

Minimum 0 · Maximum 2147483647

Responses

200A model-specific media, text or classification response, with an AudioLab request ID.
application/json
idstringRequired
modelstringRequired
dataobject

Media encoded as b64_json with mime_type.

textstring
resultsobject[]
Show nested fields

object

durationnumber
409This idempotency key already owns a request; generation is not repeated.
422Invalid input or unsupported model controls.
503Provider access, funding, or reconciliation prevents completion.