AI
Pass
Docs>REST API>OpenAI Compatible

OpenAI-Compatible Proxy

AI Pass exposes an OpenAI-compatible endpoint. Point any OpenAI SDK, agent framework, or tool at https://aipass.one/apikey/v1 and it just works — no code changes needed beyond swapping the base URL and API key.

Base URL

https://aipass.one/apikey/v1

Use your AI Pass API key (starts with sk-aikey-) as the Bearer token. Get one from the Developer Dashboard.

Quick start

Send a chat completion with curl:

curl https://aipass.one/apikey/v1/chat/completions \
  -H "Authorization: Bearer sk-aikey-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

The response is identical to the OpenAI response format — your existing parsing code works as-is.

Authentication

Pass your AI Pass API key in the Authorization header as a Bearer token:

Authorization: Bearer sk-aikey-YOUR_KEY

Your key is validated against your account balance. Requests are rejected with 403 if the key is invalid, revoked, or your balance is exhausted.

Create and manage keys in the Developer Dashboard. Each key maps to a LiteLLM virtual key internally — the model provider never sees your AI Pass key.

Supported endpoints

The proxy allowlists these paths. Requests to any other path return 403 Endpoint not allowed.

MethodPathDescription
GET/v1/modelsList available models
POST/v1/chat/completionsChat completions (streaming supported)
POST/v1/completionsText completions (legacy)
POST/v1/embeddingsText embeddings
POST/v1/images/generationsImage generation (DALL-E, Fal)
POST/v1/images/editsImage editing
POST/v1/audio/transcriptionsSpeech to text (Whisper)
POST/v1/audio/speechText to speech
POST/v1/responsesResponses API
POST/v1/videosVideo generation
GET/v1/videos/{id}Poll video generation status

Available models

Fetch the live model list from the proxy — this reflects exactly what your key can access:

curl https://aipass.one/apikey/v1/models \
  -H "Authorization: Bearer sk-aikey-YOUR_KEY"

// Response:
{
  "object": "list",
  "data": [
    { "id": "gpt-4o",      "object": "model", "owned_by": "openai" },
    { "id": "gpt-4o-mini", "object": "model", "owned_by": "openai" },
    { "id": "claude-sonnet-4-6", "object": "model", "owned_by": "openai" },
    ...
  ]
}

Models are routed through LiteLLM. Claude, Gemini, and other providers are listed using their LiteLLM model IDs.

Streaming

Set "stream": true in the request body. The proxy detects this automatically and returns a standard SSE stream:

curl https://aipass.one/apikey/v1/chat/completions \
  -H "Authorization: Bearer sk-aikey-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "stream": true,
    "messages": [{"role": "user", "content": "Count to 5"}]
  }'

// Response (SSE):
data: {"choices":[{"delta":{"content":"1"},...}]}
data: {"choices":[{"delta":{"content":","},...}]}
...
data: [DONE]

Integration examples

Python (openai SDK)

from openai import OpenAI

client = OpenAI(
    base_url="https://aipass.one/apikey/v1",
    api_key="sk-aikey-YOUR_KEY",
)

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

JavaScript / TypeScript (openai SDK)

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://aipass.one/apikey/v1',
  apiKey: 'sk-aikey-YOUR_KEY',
})

const response = await client.chat.completions.create({
  model: 'gpt-4o-mini',
  messages: [{ role: 'user', content: 'Hello!' }],
})
console.log(response.choices[0].message.content)

LangChain (Python)

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="gpt-4o-mini",
    base_url="https://aipass.one/apikey/v1",
    api_key="sk-aikey-YOUR_KEY",
)

result = llm.invoke("What is the capital of France?")
print(result.content)

Cursor, Claude Code, and other agent tools

Any tool that accepts a custom OpenAI base URL works. Set:

OPENAI_BASE_URL=https://aipass.one/apikey/v1
OPENAI_API_KEY=sk-aikey-YOUR_KEY

Most tools (LiteLLM, LlamaIndex, Vercel AI SDK, CrewAI, AutoGen, etc.) read these environment variables automatically.

Need OAuth2 for user-facing apps instead of API keys? See the REST API / OAuth2 guide. To manage API keys programmatically, see the Management API.

Using Claude Code, Cursor, or another AI agent?

Drop the AI Pass skill into your agent and skip the manual setup. Works with Claude Code, Codex, Cursor, OpenCode, and 38+ other agents.

npx skills add aipass-one/skill

Two skills available: aipass-api (personal use) and aipass-oauth-app (for app builders).

Stuck? We're happy to help on Discord

Active Discord community with the AI Pass team. Get unblocked on integration, ask about models, share what you're building.

Join AI Pass Discord