opusgate.
ModelsQuickstartPricing
Getting started
Overview
Setup guides
Claude CodeCodex CLICursorClineRoo CodeKilo CodeContinueOpenCode
API reference
Endpoints & authError codesRate limits
Account
API keysBilling & pricing
Reference
FAQTerms of ServicePrivacy Policy
opusgate.Opening your next page…
← PreviousOpenCodeNext →Error codes
opusgate.

AI models, one connection.
Build with your tools or start in chat.

Product

ModelsPricingWorkspacePayment methods

Get connected

Claude CodeCursorAPI referenceAll setup guides

Help

SupportFAQTermsPrivacy
© 2026 OpusGateModel and tool names belong to their respective owners.

Endpoints & authentication

OpusGate forwards Anthropic Messages and OpenAI-compatible requests. Configure the base URL, key and model ID for your client. Supported parameters and response features depend on the chosen model and upstream service.

Base URL
https://api.opusgate.dev for Anthropic-style clients (they add /v1/... themselves); https://api.opusgate.dev/v1 for OpenAI-style clients.

Authentication

Every request needs your sk-og-... key from the Keys page. Both standard header conventions are accepted — use whichever your SDK sends:

HTTP
Authorization: Bearer sk-og-...
# — or —
x-api-key: sk-og-...

A missing key returns 401 {"error": "missing_api_key"}, an unknown or revoked one 401 {"error": "invalid_api_key"} — see error codes.

Endpoints

EndpointProtocolPurpose
POST /v1/messagesAnthropic MessagesChat / agent requests with Claude-native features (system, tools, thinking). Streaming via "stream": true.
POST /v1/chat/completionsOpenAI Chat CompletionsSame models through the OpenAI wire format — for OpenAI-SDK tools. Streaming supported.
POST /v1/messages/count_tokensAnthropicCount request tokens when supported by the selected model.
POST /v1/responsesOpenAI ResponsesResponses-format requests. Keep conversation history in your client; upstream stored-response continuation is not supported.
GET /v1/modelsOpenAI-styleList of model IDs available to your key. Human-readable catalog with prices: models page.

Quick test with curl

Anthropic protocol
Bash
curl https://api.opusgate.dev/v1/messages \
  -H "x-api-key: sk-og-..." \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-5-5",
    "max_tokens": 100,
    "messages": [{"role": "user", "content": "Say hi"}]
  }'
OpenAI protocol
Bash
curl https://api.opusgate.dev/v1/chat/completions \
  -H "Authorization: Bearer sk-og-..." \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-5-5",
    "messages": [{"role": "user", "content": "Say hi"}]
  }'

SDK configuration

Anthropic SDK (Python / TypeScript)
Python
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.opusgate.dev",  # no /v1 — the SDK adds it
    api_key="sk-og-...",
)
TypeScript
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  baseURL: 'https://api.opusgate.dev',  // no /v1 — the SDK adds it
  apiKey: 'sk-og-...',
});
OpenAI SDK
Python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.opusgate.dev/v1",  # /v1 required
    api_key="sk-og-...",
)

Streaming

Set "stream": true in the body (or use your SDK's streaming call) — responses arrive as server-sent events for supported models. Handle interrupted streams as incomplete requests, and check their outcome before retrying. Gateway and upstream timeouts still apply (see rate limits).