Integration
Integration is one change: point base_url at metaproxy. Keep your SDK, request schema, and streaming behavior.
Your first request in three minutes.
- 1Create a key
One key works with every available model.
- 2Replace base_url
https://api.metaproxy.agency/v1. The request schema and streaming responses remain OpenAI-compatible. - 3Switch with the model field
Model choice stays in your product logic.
curl https://api.metaproxy.agency/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-5",
"messages": [{"role": "user", "content": "Hello"}]
}'
# Switch models by changing only this value: model="..."Your existing clients work as-is.
Any OpenAI-compatible client that supports a custom base_url can connect.
pip install openai, then change base_url.
from openai import OpenAI
client = OpenAI(base_url="https://api.metaproxy.agency/v1", api_key="YOUR_API_KEY")npm i openai, then change baseURL.
import OpenAI from 'openai'
const client = new OpenAI({ baseURL: 'https://api.metaproxy.agency/v1', apiKey: 'YOUR_API_KEY' })Set ChatOpenAI(base_url=...).
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(base_url="https://api.metaproxy.agency/v1", api_key="YOUR_API_KEY")Set the custom OpenAI endpoint to the gateway URL.
Custom OpenAI endpoint: https://api.metaproxy.agency/v1POST https://api.metaproxy.agency/v1/chat/completions.
curl https://api.metaproxy.agency/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY"createOpenAI({ baseURL }).
import { createOpenAI } from '@ai-sdk/openai'
const openai = createOpenAI({ baseURL: 'https://api.metaproxy.agency/v1' })Moving from the official API takes two edits.
| Client | Before | Now | Changes |
|---|---|---|---|
| Python SDK | OpenAI() points to the official endpoint | base_url="https://api.metaproxy.agency/v1" | 2 lines |
| Node SDK | new OpenAI() points to the official endpoint | baseURL: 'https://api.metaproxy.agency/v1' | 2 lines |
| LangChain | ChatOpenAI() points to the official endpoint | base_url="https://api.metaproxy.agency/v1" | 2 lines |
| cURL | https://api.openai.com/v1/chat/completions | https://api.metaproxy.agency/v1/chat/completions | 2 edits |
- base_url must end in /v1.
- Streaming and non-streaming requests are supported.
- Create keys in the console. The full key is shown only once.
Three controls for every key.
Credit limit
Set a per-key cap to contain runaway usage.
Expiration
Give a key an expiration time and it disables automatically.
Model access
Restrict a key to selected models.
The gateway provides OpenAI-compatible chat/completions for streaming and non-streaming requests, and an Anthropic-compatible messages endpoint for clients that speak that protocol — including Claude Code, which can therefore address any model in the catalog, not only Anthropic ones. Other endpoints depend on what is currently available in the console.