en-api-openai-compatible.md
Use the OpenAI-compatible base URL for OpenAI SDKs, Cursor, Codex, Cline, aider, and most custom tools:
https://api.omniakey.com/v1
POST /v1/chat/completions is the most portable endpoint. It can call supported Claude, GPT, Gemini, and Grok models by id.
cURL
Python
TypeScript
curl https://api.omniakey.com/v1/chat/completions \
-H "Authorization: Bearer your-omniakey-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-8",
"messages": [{"role": "user", "content": "Refactor this function for readability."}]
}'
from openai import OpenAI
client = OpenAI(
api_key="your-omniakey-api-key",
base_url="https://api.omniakey.com/v1",
)
response = client.chat.completions.create(
model="claude-opus-4-8",
messages=[{"role": "user", "content": "Refactor this function for readability."}],
)
print(response.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "your-omniakey-api-key",
baseURL: "https://api.omniakey.com/v1",
});
const response = await client.chat.completions.create({
model: "claude-opus-4-8",
messages: [{ role: "user", content: "Refactor this function for readability." }],
});
console.log(response.choices[0].message.content);
POST /v1/responses follows OpenAI’s newer Responses shape and serves GPT models. Use it for Codex-style GPT workflows. For Claude, Gemini, or Grok, use Chat Completions unless your tool explicitly requires a different protocol.
curl https://api.omniakey.com/v1/responses \
-H "Authorization: Bearer your-omniakey-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"input": "Refactor this function for readability."
}'
POST /v1/responses/compact is available for clients that call the Responses compaction path, including Codex-style context compaction flows.
Use GET /v1/models for an OpenAI-compatible model list. For the human-readable catalog, see Supported Models.
AuthenticationAnthropic-native API
⌘I