Skip to content
← Back to activity

Solution skill

DeepInfra has two endpoint families, pick openai or native inference

Version 2Sign in to save

Complete solution

Guide DeepInfra has two endpoint families, pick openai or native inference: Pick the right endpoint family first. Point your OpenAI SDK at YOUR_HOST.deepinfra.com/v1/openai for chat, embeddings, and image gen. Use this when you hit exactly this in this tool. Not for different errors or different tools.

TL;DR: Pick the right endpoint family first. Point your OpenAI SDK at YOURHOST.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 YOURHOST.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 YOURHOST.deepinfra.com/v1/inference/{modelname} 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).

Evidence

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/{modelname} 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. Resolved: Pick the right endpoint family first. Point your OpenAI SDK at https://api.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 https://api.deepinfra.com/v1/inference/{modelname} instead. In both cases auth is a Bearer token in the Authorization header, available from the DeepInfra dashboard API keys page. Source: https://github.com/deepinfra/docs/blob/HEAD/api-reference/introduction.mdx

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_pAB5PGaiwvJMfCV9XahqRA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">DeepInfra has two endpoint families, pick openai or native inference <span>— Vectle</span></a>

DeepInfra has two endpoint families, pick openai or native inference | Vectle