Inference APIs

Inference APIs gives you access to popular AI models through one HTTPS endpoint and one API key. Chat models use the familiar chat completions request and response format, so existing code needs few changes.

Base URL

https://api.inferenceapis.com/v1

The API follows the OpenAI wire format, so official OpenAI SDKs work by setting this as base_url. /openai/v1 is accepted as well, so Groq-style base URLs work with only the host changed. The model field selects which model handles the request.

EndpointPurposeModels
POST /v1/chat/completionsChat and reasoning (streaming, tools, JSON mode)Chat models
POST /v1/audio/speechText to speech → mp3 / wavSpeech models
POST /v1/audio/transcriptionsSpeech to text (multipart upload)Transcription models
GET /v1/modelsList model ids and aliases
GET /v1/voices?model=…List voices for a speech model

Authentication

Authenticate by sending your secret key in the Authorization header as a Bearer token. Create an account to get a key, then find it on the API Keys page.

Authorization: Bearer $INFERENCE_API_KEY
Treat your key like a password. Don't use it in browser or mobile code, and don't commit it to source control. Load it from an environment variable or a secrets manager.

Make a request

Send a list of messages and receive the model's reply. This example uses Llama 3.3 70B Instruct:

curl https://api.inferenceapis.com/v1/chat/completions \
  -H "Authorization: Bearer $INFERENCE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "meta-llama/Llama-3.3-70B-Instruct-Turbo",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello! What can you do?"}
    ]
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.inferenceapis.com/v1",
    api_key=os.environ["INFERENCE_API_KEY"],
)
response = client.chat.completions.create(
    model="meta-llama/Llama-3.3-70B-Instruct-Turbo",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello! What can you do?"},
    ],
)
print(response.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.inferenceapis.com/v1",
  apiKey: process.env.INFERENCE_API_KEY,
});
const response = await client.chat.completions.create({
  model: "meta-llama/Llama-3.3-70B-Instruct-Turbo",
  messages: [
    { role: "system", content: "You are a helpful assistant." },
    { role: "user", content: "Hello! What can you do?" },
  ],
});
console.log(response.choices[0].message.content);

The reply text is in choices[0].message.content, and usage reports prompt and completion token counts. Each model page lists all supported parameters.

Models

ModelModel IDTypeStatus
GPT-OSS 120B openai/gpt-oss-120b Chat Available
DeepSeek V4 Flash deepseek-ai/DeepSeek-V4-Flash Chat Available
DeepSeek V4.1 Flash deepseek-ai/DeepSeek-V4.1-Flash Chat Available
GLM 5.3 Flash zai-org/GLM-5.3-Flash Chat Available
Llama 3.3 70B Instruct meta-llama/Llama-3.3-70B-Instruct-Turbo Chat Available
GPT-OSS 20B openai/gpt-oss-20b Chat Coming soon
Qwen3-VL 8B Qwen/Qwen3-VL-8B-Instruct Chat Coming soon
Kokoro 82M hexgrad/Kokoro-82M Speech Available
Orpheus 3B canopylabs/orpheus-3b-0.1-ft Speech Available
Whisper Large v3 openai/whisper-large-v3 Transcription Available
Parakeet TDT 0.6B v3 nvidia/parakeet-tdt-0.6b-v3 Transcription Available
OmniParser V2 omniparser2 Vision Unavailable

Streaming

Set "stream": true on a chat request to receive the response as server-sent events. Each event is a data: line containing a JSON chunk with the next piece of text in choices[0].delta.content.

Errors

When a request can't be completed, the response body contains an error object with a human-readable message. Always check for it before reading choices.

Error response
{
  "error": {
    "message": "Invalid JSON payload",
    "type": "invalid_request_error"
  }
}
CauseWhat to do
Invalid JSONCheck the request body is valid JSON and Content-Type is application/json.
Unknown modelUse a model ID from the models list.
Service unavailableThe model is temporarily unavailable. Retry with exponential backoff or switch models.
Insufficient creditsAdd credits to your account.

Billing

Usage is paid from prepaid credits. New accounts start with free credit, and you can top up at any time from the Billing page.