Use OpenAI SDK with the LLM gateway
The OpenAI Python and TypeScript SDKs talk to any OpenAI-compatible endpoint. Point
them at the gateway by setting OPENAI_BASE_URL
and every chat completion, response, tool call, or Agents SDK loop routes through
the right model.
187 models routed through the gateway over the last 30 days.
Why use the OpenAI SDK with the gateway
Chatty workloads (Agents SDK loops, tool retries, chain-of-thought reasoning) burn tokens fast. The gateway 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 gateway
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 the gateway 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 the gateway pick the model:
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="auto",
messages=[{"role": "user", "content": "Hello"}],
)
import OpenAI from "openai";
const client = new OpenAI();
const response = await client.chat.completions.create({
model: "auto",
messages: [{ role: "user", content: "Hello" }],
});
https://api.manifest.build/v1
mnfst_YOUR_KEY
auto
OpenAI SDK tokens processed by the gateway
Models in use
# Model |
Auth type | Tokens / last 30 days |
|---|---|---|
1.Gpt 5.6 Luna Pro | API Key | 184 M |
2.Gpt 5.6 Sol | Subscription | 49 M |
3.Gpt 5.6 Luna | Subscription | 21 M |
4.Gpt 5.3 Codex Spark | Subscription | 13 M |
5.Claude Sonnet 5 | Subscription | 12 M |
6.Deepseek V4 Flash | Subscription | 10 M |
7.Gpt 5.4 Mini | Subscription | 9 M |
8.Gpt 5.6 Terra | API Key | 8 M |
9.Grok 4.5 | Subscription | 7 M |
10.Nemotron 3 Nano Omni 30b A3b Reasoning | API Key | 6 M |
11.Hy3 | API Key | 5 M |
12.Gemini 3.1 Flash Lite | API Key | 4 M |
13.Gpt 6 Astra | Subscription | 2 M |
14.Openrouter Free | API Key | 1 M |
15.Gpt 5.5 | Subscription | 938 K |
16.Kilo Auto Free | API Key | 855 K |
17.Grok 4.6 | Subscription | 733 K |
18.Gpt 5.6 Luna | API Key | 641 K |
19.Gpt 5.6 Terra | Subscription | 606 K |
20.Gpt 5.4 | Subscription | 593 K |
21.Ox Alpha | API Key | 554 K |
22.Claude Opus 5 | Subscription | 522 K |
23.Deepseek V4 Flash Vision Exp | Subscription | 510 K |
24.Gpt 5.4 Mini | API Key | 473 K |
25.Gpt 4o Mini | API Key | 419 K |
26.Gpt 5.6 Luna | Subscription | 394 K |
27.Claude Fable 5 1 | Subscription | 388 K |
28.Gpt 5.6 Luna | API Key | 291 K |
29.Glm 5.3 Flash | Subscription | 252 K |
30.Gemma4:31b | Subscription | 197 K |
31.Minimax M3 | API Key | 170 K |
32.Nex N2.5 Pro | API Key | 156 K |
33.Laguna S 2.1 | Subscription | 120 K |
34.Deepseek Flash | Subscription | 111 K |
35.Big Pickle | API Key | 101 K |
36.Claude Fable 5 | Subscription | 59 K |
37.Gpt 5 Mini | Subscription | 43 K |
38.Deepseek V4.1 Flash | Subscription | 37 K |
39.Gpt Oss 120b | API Key | 37 K |
40.Glm 5.3 | Subscription | 33 K |
41.Gpt 4o | Subscription | 31 K |
42.Gpt 5.6 Luna | Subscription | 26 K |
43.Minimax M3 | Subscription | 24 K |
44.Glm 5.3 Flash | Subscription | 23 K |
45.Kimi K3 | API Key | 22 K |
46.Gpt 5 Nano | API Key | 17 K |
47.Nemotron 3 Nano Omni 30b A3b Reasoning | API Key | 16 K |
48.Qwen3.8 Flash | Subscription | 14 K |
49.Kimi K3 | Subscription | 14 K |
50.Grok 4.3 | Subscription | 14 K |
51.Nemotron 3.5 Lightning | API Key | 10 K |
52.Glm 4.6 | Subscription | 9 K |
53.Claude Haiku 4 5 | Subscription | 9 K |
54.Claude Opus 4 8 | Subscription | 6 K |
55.MiniMax M2.5 Highspeed | Subscription | 6 K |
56.Gpt 5.6 Sol Pro | Subscription | 5 K |
57.Gpt 5.6 Terra Pro | Subscription | 5 K |
58.Gpt 5.6 Luna Pro | Subscription | 5 K |
59.Gpt 5.4 Nano | API Key | 3 K |
60.Mistral Medium 2604 | API Key | 3 K |
61.Step 3.7 Flash | API Key | 2 K |
62.Kimi K2.7 Code | API Key | 2 K |
63.Grok Build 0.1 | Subscription | 514 |
64.Lfm 2.5 2.6b | API Key | 421 |
65.Laguna S 2.1 | API Key | 352 |
66.Qwen3.6 Max Preview | Subscription | 304 |
67.Deepseek V4 Flash | Subscription | 296 |
68.Mimo V2.5 Pro | Subscription | 267 |
69.Mimo V2.5 | Subscription | 263 |
70.Glm 4.6 | Subscription | 235 |
71.Glm 4.5 | Subscription | 214 |
72.Deepseek V4 Pro | Subscription | 198 |
73.Mistral Medium Latest | API Key | 194 |
74.Glm 4.5 Air | Subscription | 183 |
75.Qwen3.8 Max 0902 | Subscription | 154 |
76.Claude Opus 4.7 | Subscription | 133 |
77.Claude Opus 5 | Subscription | 120 |
78.Qwen3.8 Max | Subscription | 101 |
79.Claude Opus 4.8 | Subscription | 100 |
80.Deepseek V4 Pro 0813 | Subscription | 99 |
81.Nemotron 3 Ultra 550b A55b | Subscription | 96 |
82.Gpt 5.2 | Subscription | 85 |
83.Gpt 5.4 Pro | Subscription | 84 |
84.Claude Fable 5 | API Key | 78 |
85.Ling 3.0 Flash Fin | API Key | 78 |
86.Solar Pro 3 | Subscription | 78 |
87.Gpt 5.5 | Subscription | 73 |
88.Gpt 5.1 | Subscription | 69 |
89.Longcat 2.0 Free | API Key | 64 |
90.Claude Sonnet 5 | Subscription | 62 |
91.Laguna Xs 2.1 | Subscription | 61 |
92.Claude Fable 5 | Subscription | 60 |
93.Gpt 4o | Subscription | 60 |
94.Solar Pro4 | Subscription | 60 |
95.Claude Haiku 4.5 | Subscription | 54 |
96.Claude Opus 4.1 | Subscription | 54 |
97.Claude Opus 4.5 | Subscription | 54 |
98.Claude Opus 4.6 | Subscription | 54 |
99.Claude Sonnet 4.5 | Subscription | 54 |
100.Claude Sonnet 4.6 | Subscription | 54 |
101.Gpt 5.2 Pro | Subscription | 51 |
102.Gpt 5.4 Mini | Subscription | 51 |
103.Gpt 4.1 | Subscription | 48 |
104.Gpt 4.1 Mini | Subscription | 48 |
105.Gpt 4.1 Nano | Subscription | 47 |
106.Deepseek V4 Flash 0731 | Subscription | 46 |
107.Deepseek V4 Flash Latest | Subscription | 46 |
108.Gpt 4o Mini | Subscription | 45 |
109.Glm 5.2 | Subscription | 45 |
110.Gpt 4 Turbo | Subscription | 43 |
111.Gpt 3.5 Turbo | Subscription | 42 |
112.Gemini 3.1 Pro Preview | Subscription | 39 |
113.Gemini 3.6 Flash | Subscription | 39 |
114.Gemini 2.5 Pro | Subscription | 37 |
115.Gemini 3.5 Flash | Subscription | 37 |
116.Gemini 3.7 Flash | Subscription | 36 |
117.Gpt 5 | Subscription | 36 |
118.Gpt 5.4 | Subscription | 36 |
119.Gpt 5 Mini | Subscription | 36 |
120.Gpt 5 Nano | Subscription | 36 |
121.Gpt 5 Pro | Subscription | 36 |
122.O3 Pro | Subscription | 36 |
123.Gpt 5 Codex | Subscription | 35 |
124.Gpt 5.4 Nano | Subscription | 34 |
125.Nemotron 3 Nano 30b A3b | Subscription | 32 |
126.Nemotron 3 Super 120b A12b | Subscription | 32 |
127.Gemma 4 31b It | API Key | 30 |
128.Mistral Medium 2312 | API Key | 29 |
129.Gpt 5.2 Codex | Subscription | 28 |
130.Gpt 5.5 Pro | Subscription | 28 |
131.Glm 5 | Subscription | 28 |
132.Glm 5.3 | Subscription | 28 |
133.Glm Latest | Subscription | 28 |
134.Gpt 5.1 Codex Mini | Subscription | 27 |
135.Aion 2.0 | Subscription | 26 |
136.Aion 3.0 Mini | Subscription | 26 |
137.Qwen3.7 Max | Subscription | 26 |
138.Gemma 3 27b It | Subscription | 25 |
139.Nemotron 3.5 Lightning | Subscription | 25 |
140.Aion 3.0 | Subscription | 24 |
141.Gemini 3.1 Flash Lite | Subscription | 24 |
142.Gemini 3.5 Flash Lite | Subscription | 24 |
143.Gemini 3 Flash Preview | Subscription | 24 |
144.Claude Fable Latest | Subscription | 22 |
145.Gemini 2.5 Flash | Subscription | 22 |
146.Gemini 2.5 Flash Lite | Subscription | 22 |
147.Glm 4.6v | Subscription | 22 |
148.Gemma 4 26b A4b It | Subscription | 21 |
149.Gemma 4 31b It | Subscription | 21 |
150.Glm 4.5v | Subscription | 21 |
151.Glm 4.7 | Subscription | 21 |
152.Glm 4.7 Flash | Subscription | 21 |
153.Glm 5.1 | Subscription | 21 |
154.Glm 5 Turbo | Subscription | 21 |
155.Glm 5v Turbo | Subscription | 21 |
156.Llama 3.3 70b Instruct | Subscription | 20 |
157.Claude Opus Latest | Subscription | 20 |
158.Claude Sonnet Latest | Subscription | 20 |
159.Claude 3 Haiku | Subscription | 18 |
160.Claude Haiku Latest | Subscription | 18 |
161.Claude Opus 4 | Subscription | 18 |
162.Claude Sonnet 4 | Subscription | 18 |
163.Gemma 3 12b It | Subscription | 18 |
164.Gpt 5.3 Codex | Subscription | 18 |
165.Gemini 3.5 Flash Lite | API Key | 18 |
166.Qwen3 Max | Subscription | 16 |
167.Qwen3 Max Thinking | Subscription | 16 |
168.Gpt 3.5 Turbo 16k | Subscription | 15 |
169.Gpt 4o 2024 05 13 | Subscription | 15 |
170.Gpt 4o 2024 08 06 | Subscription | 15 |
171.Gpt 4o 2024 11 20 | Subscription | 15 |
172.Gpt 4o Mini 2024 07 18 | Subscription | 15 |
173.Glm 5.2:US | Subscription | 15 |
174.Gemini 3.1 Pro Preview Customtools | Subscription | 14 |
175.Gpt 4 | Subscription | 14 |
176.Gemini 2.5 Flash | API Key | 14 |
177.Gemini 2.5 Pro Preview 05 06 | Subscription | 13 |
178.Gemini Flash Latest | Subscription | 13 |
179.Gemini Pro Latest | Subscription | 13 |
180.Gemini 2.5 Pro Preview | Subscription | 12 |
181.Codestral 2508 | Subscription | 12 |
182.Gpt 5.1 Codex | Subscription | 12 |
183.Gpt 5.1 Codex Max | Subscription | 12 |
184.Nova Pro V1 | Subscription | 9 |
185.Gemini 3.1 Flash Lite Preview | Subscription | 9 |
186.Command R 08 2024 | Subscription | 8 |
187.Command R Plus 08 2024 | Subscription | 8 |