API reference

The Seligo API is OpenAI-compatible: any client that speaks the OpenAI API can point at https://api.seligo.cloud/v1. Base URL is https://api.seligo.cloud/v1.

Authentication

Send your key in the standard Authorization header:

Authorization: Bearer rk-…

Every request is authenticated with an API key scoped to your org & user. Unknown keys get a 401; known keys blocked by a quota/balance/region rule get a 403 with a machine-readable code.

Chat completions

POST /v1/chat/completions

Body is the standard OpenAI chat request. stream:true returns server-sent events (SSE); otherwise you get a JSON response.

# non-streaming
curl -s "$SELIGO_BASE/chat/completions" \
  -H "authorization: Bearer rk-…" \
  -H "content-type: application/json" \
  -d '{"model":"scaleway/Meta-Llama-3-1-8B-Instruct",
       "messages":[{"role":"user","content":"Explain EU data sovereignty in one line."}]}'
# streaming (SSE) — set the model to whatever you listed in /v1/models
curl -N -s "$SELIGO_BASE/chat/completions" \
  -H "authorization: Bearer rk-…" \
  -H "accept: text/event-stream" \
  -H "content-type: application/json" \
  -d '{"model":"scaleway/Meta-Llama-3-1-8B-Instruct",
       "stream":true,
       "messages":[{"role":"user","content":"Hello"}]}'

List models

GET /v1/models

Returns ids from the public catalogue. When called with a bearer key it also lists your org’s registered endpoints and, if you have a live private GPU, the stable seligo/gpu alias (see Private GPU). Without a key it returns just the public catalogue.

curl -s "$SELIGO_BASE/models" -H "authorization: Bearer rk-…"

Errors

Errors are OpenAI-shaped with Seligo extensions: a top-level {"error":{"message","type","code","param","request_id"}}. The code is machine-readable and prefixed seligo_* for Seligo-native conditions, while provider failures pass through untouched.

HTTPcodeMeaning
401invalid_key etc.Unknown / expired / revoked key
403insufficient_balance, budget_cap, region…Key known but a rule blocked it
429Ingress rate limit
502provider_errorUpstream provider failed

Regions

Keys and orgs carry a region pin. By default requests stay in your org’s EU region; models are labelled with their zone (eu / us / apac / global).

Private GPUs are served on the same OpenAI-compatible surface. The only differences are the self-serve lifecycle endpoints and the stable seligo/gpu model alias — see Private GPU.