API Documentation

GateArb provides an OpenAI-compatible API. Change your base URL and API key — everything else stays the same.

Quick Start

1. Get Your API Key

Sign in to your dashboard, go to the API Keys section, and create a key. Copy it immediately and store it securely.

2. Make Your First Request

curl
Python
Node.js
curl https://api.gatearb.com/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{
    "model": "deepseek-chat",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
from openai import OpenAI

client = OpenAI(
    base_url="https://api.gatearb.com/v1",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
    baseURL: "https://api.gatearb.com/v1",
    apiKey: "YOUR_API_KEY"
});

const response = await client.chat.completions.create({
    model: "deepseek-chat",
    messages: [{ role: "user", content: "Hello!" }]
});
console.log(response.choices[0].message.content);

API Reference

POST Chat Completions

/api/v1/chat/completions

OpenAI-compatible chat completions. Auto-routes to the cheapest healthy model.

ParameterTypeDescription
modelstringdeepseek-chat, gpt-4o, claude-3-haiku, etc.
messagesarrayArray of {role, content} objects
max_tokensintMax tokens to generate (optional)
temperaturefloat0-2 (optional)
streamboolEnable SSE streaming (optional)

GET List Models

/api/v1/models

Available models and pricing.

GET User Info

/api/v1/user/me

Profile, balance, and token quota.

GET API Keys

GET /api/v1/keys

List your API keys.

POST /api/v1/keys/create

Create key. Body: {"name": "my-key"}

POST /api/v1/keys/revoke

Revoke key. Body: {"key_id": 123}

OpenAPI spec: /openapi.json

Pricing

Tokens are deducted from your balance. See Pricing for current rates.