Skip to content
Guides/Models and Routing

Native Inference

Call models that use the model-specific native inference protocol.

When to Use Native Inference

Use /v1/inference for catalog models whose supported protocol is inference. It covers supported model-specific generation and processing tasks, including music, sound effects, voice conversion, image classification, and visual questions.

This is a distinct protocol with its own input and output contract. For models using the dedicated image or video APIs, follow Images or Video. Select the endpoint from the model’s capabilities rather than from its provider name.

Before You Begin

Complete the quickstart. You need an enabled native inference model, inference.write, and available workspace credits. Confirm the exact model and supported task in Models and Providers.

Prepare the fields required by that task. Generation uses a prompt; classification needs an inline image and labels; supported audio-processing models require the documented audio format. Arbitrary remote URLs and provider options are not accepted.

Submit a Model-specific Request

This example uses a native inference image model to illustrate the protocol. Replace it only with a model that supports the same fields, or adapt the body to the selected task’s contract:

curl --fail --show-error --request POST \
  --url "$AUDIOLAB_API_URL/v1/inference" \
  --header "Authorization: Bearer $AUDIOLAB_API_KEY" \
  --header 'Idempotency-Key: YOUR_UNIQUE_REQUEST_ID' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "deepinfra/black-forest-labs/FLUX-1-schnell",
  "prompt": "A mountain lake at sunrise."
}'

Read the Native Inference reference for required fields, input limits, supported audio formats, and model-specific controls. A field accepted for one task is not automatically meaningful for another.

Consume the Result

The response shape depends on the task: generated media is base64-encoded with a MIME type, text uses text, and classification uses results. Retain the AudioLab request ID and consume the documented output for your chosen model.

Use Get Inference Status to inspect an uncertain request without running inference again. Reusing an idempotency key never repeats generation. Follow Errors and Debugging before starting a replacement request.