OpenAI-compatible API
Found this helpful? Share it:
Found this helpful? Share it:
idapt exposes an OpenAI-compatible gateway, so you can reach 200+ models from any app, script, or SDK that speaks the OpenAI format. Point your code at idapt instead of OpenAI and keep the rest 🔗
Pro and upAn API key with the completions scope. See API keys and scopes.
The base URL https://idapt.app/api/openai/v1.
A Credit balance, or your own provider key. The daily free usage that runs cheap models in the app does not apply on this gateway.
from openai import OpenAI
client = OpenAI(
base_url="https://idapt.app/api/openai/v1",
api_key="uk_your_key_here",
)
response = client.chat.completions.create(
model="openai/gpt-5.4-pro",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://idapt.app/api/openai/v1",
apiKey: "uk_your_key_here",
});
const response = await client.chat.completions.create({
model: "anthropic/claude-sonnet-4.6",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);curl https://idapt.app/api/openai/v1/chat/completions \
-H "Authorization: Bearer uk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash",
"messages": [{"role": "user", "content": "Hello!"}]
}'Switch models by changing the model parameter. Use the
full id with its provider prefix, like openai/gpt-5.4-pro.
POST /chat/completions: streaming and non-streaming
chat.
POST /responses: a non-streaming bridge. Sending stream: true returns 501, so use chat/completions for streaming.
POST /embeddings: text embeddings.
POST /images/generations: image generation.
POST /audio/speech and POST /audio/transcriptions: text to speech and speech
to text.
POST /videos: the async video family (submit, then
poll).
GET /models and GET /models/{id}: the model catalog.
A few OpenAI parameters have no idapt equivalent, and idapt fails them
loudly rather than pretending. A request with n > 1,
or with the special auto model, is rejected with a clear
error so your app cannot drift without you noticing.
Set stream: true on chat/completions to
receive server-sent events, which every OpenAI SDK understands. Add stream_options: { include_usage: true }to get
token counts in the final chunk.
Completions on this gateway bill your Credit balance at the prices
shown in the app, with no separate API pricing, or run on your own
provider key (BYOK draws no idapt credits). A key with no credits and
no BYOK gets a 403 with code insufficient_credits. Daily free
usage stays available in the idapt app. Completions are limited to 60
requests per minute.
Watch your spend on the usage page (/app/usage), and read Plans, credits, and daily free usage for how the meters fit together.
Related articles
Switch from the OpenAI API
Point your OpenAI SDK at idapt's base URL and keep your code: chat, embeddings, images, audio, and video across 200+ models.
Anthropic-compatible API
Use idapt's 200+ models from Claude Code or any app that speaks the Anthropic Messages API.
API keys and scopes
Create a key, choose its scopes, pin it to an API version, rotate it, and cap what it can spend.
Was this helpful?