Skip to Content
OpenInfer Docs
Inference APIsOpenAI Compatibility

Overview

Use OpenAI SDKs and tools against OpenInfer.

OpenInfer implements the OpenAI inference APIs. Use an OpenAI SDK with a different base URL and key and your code keeps working.

from openai import OpenAI

client = OpenAI(base_url="https://api.openinfer.ai/v1", api_key="pk_...")

Supported endpoints

EndpointAPI family
POST /v1/chat/completionsChat Completions
POST /v1/responsesResponses
GET /v1/modelsModels your key can call
POST /v1/embeddingsEmbeddings
POST /v1/images/generationsImage generation
POST /v1/messagesAnthropic Messages, for Claude Code

Authentication

Send your API key as Authorization: Bearer pk_…. Create keys on the console's API keys page.

Models

model takes a slug from GET /v1/models, such as @oi/Qwen3.5-9B, or an organization alias like @alias/name.

Differences from OpenAI

  • Message content accepts text parts only; image inputs are rejected with 400.
  • n must be 1.
  • top_p must be in (0, 1].
  • Streaming (stream: true) answers text/event-stream. A stream that fails after its 200 ends with one error frame.
  • A request body may be at most 20 MB.
  • Capacity is enforced per model; a request no node can take is answered 429 model_at_capacity.
  • Every authenticated response carries an x-request-id.

On this page