Documentation

UnifyAPI speaks the OpenAI API. If your code already calls OpenAI, change the base URL and the key — everything else stays the same.

Quickstart

Create an account to get a key, then point your client at https://api.unifyapi.ai/v1.

curl https://api.unifyapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $UNIFYAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Using an existing SDK

Any OpenAI-compatible client works. Set the base URL and your UnifyAPI key:

from openai import OpenAI

client = OpenAI(
    api_key=os.environ["UNIFYAPI_KEY"],
    base_url="https://api.unifyapi.ai/v1",
)

response = client.chat.completions.create(
    model="gpt-5",
    messages=[{"role": "user", "content": "Hello"}],
)

Anthropic-style clients can use /v1/messages instead, with the same key.

Authentication

Pass your key as a bearer token on every request. Keys are created and revoked in the console, and each one can be scoped to specific models and given its own spend limit.

Authorization: Bearer sk-...

Endpoints

POST /v1/chat/completionsOpenAI-compatible chat
POST /v1/messagesAnthropic-compatible messages
POST /v1/responsesOpenAI Responses API
POST /v1/embeddingsText embeddings
POST /v1/images/generationsImage generation
GET /v1/modelsList the models available to your key

Call GET /v1/models to see exactly which models your key can reach — that list is authoritative for your account.

Choosing a model

Pass any model your key has access to in the model field. UnifyAPI routes the request to the provider behind it and fails over automatically if that provider degrades, so a single model name keeps working through an upstream incident.

Errors

Errors follow the OpenAI error shape, so existing error handling keeps working. A 401 means the key is missing or revoked, and 429 means you have hit a rate or spend limit — both are visible in the console.

Ready to make your first call?

Create an account and your key is ready immediately.

Get your API key