Logo SVG copied to clipboard
Custom development The team behind Manifest can help you develop what your company needs around your LLM gateway. Talk to us

Use OpenAI SDK with Manifest

119M tokens / 30 days
App AI SDK

The OpenAI Python and TypeScript SDKs talk to any OpenAI-compatible endpoint. Point them at Manifest by setting OPENAI_BASE_URL and every chat completion, response, tool call, or Agents SDK loop routes through the right model.

24 models routed through Manifest over the last 30 days.

Why use the OpenAI SDK with Manifest

Chatty workloads (Agents SDK loops, tool retries, chain-of-thought reasoning) burn tokens fast. Manifest intercepts each call, picks the right model, and keeps your code identical. Same SDK, same shapes, lower bill.

  • One env var change: OPENAI_BASE_URL
  • Slash token spend by 50–70% on chatty agent loops
  • Works for the OpenAI SDK and the OpenAI Agents SDK
  • Tool calling, structured outputs, and streaming all pass through
  • Per-app spend caps and audit logs in the dashboard
  • Open source: inspect and self-host the router

Setup in 60 seconds

Set two environment variables and the OpenAI SDK picks them up on the next run, no code changes required.

Point the SDK at Manifest by setting these env vars in your shell or .env file:

export OPENAI_BASE_URL="https://api.manifest.build/v1"
export OPENAI_API_KEY="mnfst_YOUR_KEY"

Then use the SDK exactly as you would normally. Just point at "auto" to let Manifest pick the model:

from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello"}],
)
OPENAI_BASE_URL https://api.manifest.build/v1
OPENAI_API_KEY mnfst_YOUR_KEY
model auto

OpenAI SDK tokens processed on Manifest

Models in use

# Model
Auth type Tokens / last 30 days
1.Gpt 6 Luna
Subscription94 M
2.Claude Opus 5 5
Subscription9 M
3.Gpt 5.6 Terra
API Key6 M
4.Gpt 6 Astra
Subscription2 M
5.Hy3
API Key1 M
6.Claude Sonnet 5
Subscription1 M
7.Gpt 6 Luna
API Key824 K
8.Gpt 6.1 Sol
Subscription816 K
9.Gemini 3.8 Flash
API Key764 K
10.Gemma4:31b
Subscription718 K
11.Gpt 5.6 Luna
Subscription603 K
12.Openrouter Free
API Key380 K
13.Nemotron 3 Nano Omni 30b A3b Reasoning
API Key300 K
14.Gemini 3.1 Flash Lite
API Key265 K
15.MiniMax M3
Subscription208 K
16.Laguna S 2.1
API Key186 K
17.Gemini 3.5 Flash Lite
API Key111 K
18.Gemma 4 31b It
API Key69 K
19.Gpt 4o
Subscription7 K
20.Gpt 5.4 Nano
API Key7 K
21.Gpt Oss:120b
Subscription2 K
22.Gpt 5 Mini
Subscription2 K
23.Minimax M3
API Key190
24.Kilo Auto Free
API Key140