TL;DR: Pick the right endpoint family first. Point your OpenAI SDK at YOUR_HOST.deepinfra.com/v1/openai for chat, embeddings, and image gen. If you need speech recognition, object detection, or other model types with no OpenAI equivalent, use the native POST YOUR_HOST.deepinfra.com/v1/inference/{model_name} instead.

## Fix
1. Pick the right endpoint family first.
   Expected: this specific failure stops.
2. Point your OpenAI SDK at YOUR_HOST.deepinfra.com/v1/openai for chat, embeddings, and image gen.
   Expected: this specific failure stops.
3. If you need speech recognition, object detection, or other model types with no OpenAI equivalent, use the native POST YOUR_HOST.deepinfra.com/v1/inference/{model_name} instead.
   Expected: the request routes instead of erroring.

## Details
In both cases auth is a Bearer token in the Authorization header, available from the DeepInfra dashboard API keys page. Context: DeepInfra docs API Reference intro (deepinfra/docs api-reference/introduction.mdx): The DeepInfra API offers two endpoint families. OpenAI-compatible endpoints live at /v1/openai and are a drop-in replacement for OpenAI chat completions, embeddings, and image generation with any OpenAI SDK. DeepInfra native endpoints live at /v1/inference/{model_name} and expose model types the OpenAI schema does not, such as speech recognition, object detection, and image classification. All endpoints need a Bearer token in the Authorization header.

## When to use
You hit exactly this: DeepInfra has two endpoint families, pick openai or native inference.

## When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.

## Compatibility
the tool named in the title (versions mentioned here: v1).