HomeDocsquickstart
Gateway Protocol v1 · Production Reference

Documentation

One key, two compatible wire protocols, 15 frontier models. Read the quickstart or explore the API reference.

Quickstart

This takes about three minutes. You need an API key — create one under API Keys and copy it, then paste it into the shell command below. First pick the base URL that matches the protocol your client speaks — they are not interchangeable.

Anthropic Wire Protocol

Anthropic

Base URL

https://api.selora.lol
SDK automatically appends /v1/messagesAuthenticate via x-api-key: sk-gw-...

OpenAI Wire Protocol

OpenAI

Base URL

https://api.selora.lol/v1
SDK automatically appends /chat/completionsAuthenticate via Authorization: Bearer sk-gw-...

Protocol Header Resolution: The gateway inspects x-api-key first and falls back to Authorization: Bearer. Both wire formats accept standard sk-gw-... gateway keys. Notice that the Anthropic URL is the bare origin (because official Anthropic SDKs append /v1/messages), while OpenAI tooling takes .../v1 (because OpenAI SDKs append /chat/completions).

1 · Make a chat request with cURL
bash
curl https://api.selora.lol/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SELORA_API_KEY" \
  -d '{
    "model": "claude-sonnet-5",
    "messages": [{ "role": "user", "content": "Say hello in one line." }],
    "max_tokens": 64
  }'

The response comes back as one JSON object with an id, the selection, and a usage block you can meter against. Keep the key in an environment variable rather than committing it.

2 · Read the response
json
{
  "id": "chatcmpl_7KRe0vWqD",
  "object": "chat.completion",
  "model": "claude-sonnet-5",
  "choices": [{
    "index": 0,
    "message": { "role": "assistant", "content": "Hello from the Selora gateway." },
    "finish_reason": "stop"
  }],
  "usage": { "prompt_tokens": 19, "completion_tokens": 12, "total_tokens": 31 }
}

Prefer the Anthropic wire format? Same key, same models, different base URL: POST https://api.selora.lol/v1/messages with x-api-key and a required max_tokens. The copy-paste client configs for both flavours are under Setup configs on the Introduction.

Use it from your coding agent

The gateway speaks both OpenAI-compatible and Anthropic-compatible, so almost any agent can be pointed at it in a couple of lines — set the matching custom base URL and use your Selora key. Pick your harness for a step-by-step setup.