HomeDocssdk/curl
Gateway Protocol v1 · Production Reference

Documentation

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

REST & cURL

The gateway is plain JSON over HTTPS. You do not need an SDK — a raw POST to the chat endpoint is enough to get a completion back.

Chat completions — POST /v1/chat/completions
bash
curl https://api.selora.lol/v1/chat/completions \
  -H "Authorization: Bearer $SELORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3",
    "messages": [{ "role": "user", "content": "Explain the moon landing in one sentence." }],
    "temperature": 0.4
  }'

The Anthropic-compatible route takes the same key and answers the same models, but it hangs off the bare origin and it requires max_tokens — omit that field and the call is rejected with a 400 rather than defaulted.

Messages — POST /v1/messages
bash
curl https://api.selora.lol/v1/messages \
  -H "x-api-key: $SELORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "max_tokens": 256,
    "messages": [{ "role": "user", "content": "Explain the moon landing in one sentence." }]
  }'

# Count the tokens in that payload without spending them:
curl https://api.selora.lol/v1/messages/count_tokens \
  -H "x-api-key: $SELORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "claude-sonnet-5", "messages": [{ "role": "user", "content": "Hello" }] }'

List the keys on your account with a read-only call — note this one takes no request body and is scoped to the credential you authenticate with. It lives under /v1/me, which accepts either an API key or your console session.

List API keys — GET /v1/me/keys
bash
curl https://api.selora.lol/v1/me/keys \
  -H "Authorization: Bearer $SELORA_API_KEY" \
  -H "Accept: application/json"

# 200 → { "keys": [ { "id": "…", "name": "Production Router",
#                     "key_hint": "sk-gw-…", "status": "active",
#                     "request_count": 128 } ] }