SUPREME AI
QuickstartSetu ConsoleOpenAPI 3.1 Get an API key
Public API · v1

Build on SUPREME AI

An OpenAI-compatible chat completions API — drop-in replacement for existing LLM pipelines — plus a public gateway to every connector tool (Gmail, Slack, GitHub, and more) your workspace has attached. One key, per-key rate limits, transparent credit-based spend.

Create a free key Read the docs

OpenAI-compatible

Point the official OpenAI SDK at our base URL — no rewrite needed.

Connector gateway

List and call every MCP tool your workspace has attached via /api/v1/tools.

Versioned & rate-limited

Every route lives under /api/v1, with per-key RPM/TPM caps that scale by tier.

API Reference

The SUPREME API is OpenAI-compatible — drop it into any existing OpenAI client by overriding the base URL. Powered by Gemini and DeepSeek under one billing surface.

Base URL & Authentication

All requests go to the /api/v1 base path and authenticate with a bearer token:

Base URL:   https://your-domain.com/api/v1
Auth:       Authorization: Bearer sk-supreme-...

Create keys in the Overview tab. Each key carries scopes (chat, models), a tier, and optional spend caps. Keys are shown once — store them securely.

Quickstart

Send your first request in seconds. Pick your language:

curl https://your-domain.com/api/v1/chat/completions \
  -H "Authorization: Bearer $SUPREME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-2.5-flash",
    "messages": [{"role": "user", "content": "Namaste! Ek chhoto kavita lekha."}]
  }'

Chat Completions

POST /api/v1/chat/completions — create a model response. Request fields:

FieldTypeNotes
modelstringA model id from /api/v1/models.
messagesarrayRoles: system, user, assistant.
streambooleanSSE token stream when true.
max_tokensnumberMax output tokens.
temperaturenumber0–2 sampling temperature.

Set "stream": true for incremental Server-Sent Events:

curl https://your-domain.com/api/v1/chat/completions \
  -H "Authorization: Bearer $SUPREME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-2.5-pro",
    "stream": true,
    "messages": [{"role": "user", "content": "Stream a haiku about the Himalayas."}]
  }'
# → Server-Sent Events: data: {"choices":[{"delta":{"content":"..."}}]}  ... data: [DONE]

Models

GET /api/v1/models lists the models currently served; GET /api/v1/models/{id} retrieves one. The list reflects live provider availability. Currently served:

ModelOwnerContextMin tier
Loading from /api/v1/models…

Connector tools (MCP)

Keys carrying the mcp scope can list and call every connector you've attached — your own MCP connections plus any workspace-enabled connectors — through the same gateway your in-app agents use. Grant this scope when creating a key in the Overview tab ("Connector access").

GET /api/v1/tools — list every tool available to the key's owner, in the OpenAI function-tool shape:

curl https://your-domain.com/api/v1/tools \
  -H "Authorization: Bearer $SUPREME_API_KEY"
# → { "object": "list", "data": [ { "type": "function", "server_id": "...", "function": { "name": "...", "description": "...", "parameters": {...} } } ] }

POST /api/v1/tools/call — invoke one tool by server + name:

curl https://your-domain.com/api/v1/tools/call \
  -H "Authorization: Bearer $SUPREME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "server_id": "gmail",
    "tool_name": "send_email",
    "arguments": { "to": "a@b.com", "subject": "Hi", "body": "..." }
  }'

Each call costs a flat 2 credits, billed against the key the same way chat completions are.

Rate limits & spend

Limits scale with your key's tier. Responses include X-RateLimit-* headers; a 429 carries Retry-After.

TierRequests / minTokens / min
free2020K
starter6060K
pro120200K
max300400K
enterprise1,0002M

Spend caps: set an optional monthly or lifetime credit cap per key. When reached, requests return 429 insufficient_quota until you raise the cap.

Auto-tier graduation: keys ratchet up automatically as cumulative spend crosses thresholds — and never downgrade:

starter @ 1,000 crpro @ 25,000 crmax @ 100,000 crenterprise @ 1,000,000 cr

Errors

Errors follow the OpenAI shape: { "error": { "message", "type", "code" } }.

StatusTypeWhen
401invalid_api_keyMissing/invalid/revoked key.
403insufficient_scopeKey lacks the 'chat' scope.
404model_not_foundUnknown or unavailable model id.
429rate_limit_exceededRPM or TPM exceeded — see Retry-After.
429insufficient_quotaPer-key spend cap reached (billing_hard_limit_reached).
© 2026 SUPREME AI Pvt. Ltd. — Back to app