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.
An active subscription, or your own provider key (BYOK). The free daily pool 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 need an active subscription (included
allowance first, then Usage Credits as overflow) or your own provider
key. Calls without one return a 403 with code free_tier_requires_subscription. Language models bill at
the prices shown in the app, with no separate API pricing;
bring-your-own-key calls bill to your provider account and draw no
idapt credits. Completions are limited to 60 requests per minute.
Watch your spend on the usage page (/app/usage), and read Plans, allowances, and credits 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?