Docs
One endpoint, an OpenAI-compatible shape, and three response headers worth reading.
The API is one endpoint. If you have used an OpenAI-compatible client before, change the base URL and the key and everything below already works — we did not invent a new shape for the sake of it.
Authenticate
# keys are scoped to a project, and to a region set export ARGOSY_API_KEY="ag_live_..."
A completion
curl https://api.argosy.example/v1/chat/completions -H "Authorization: Bearer $ARGOSY_API_KEY" -H "Content-Type: application/json" -d '{ "model": "llama-3.3-70b", "region": "fra1", "stream": true, "messages": [{"role":"user","content":"Summarise this changelog."}] }'
What comes back
Server-sent events, one JSON object per chunk, terminated by data: [DONE]. Three headers on the response are worth reading:
x-argosy-region— where the request was actually served. If this is not the region you asked for, we routed you, and the request is not billed.x-argosy-ttft— milliseconds to the first token, measured at the gateway.x-argosy-queue— milliseconds spent waiting for a replica. Should be zero. If it is not, capacity in that region is tight and you should say so.
Region pinning
The region field overrides the deployment default for one call. Pair it with strict residency when the data is not permitted to leave a jurisdiction:
regions: ["fra1", "ams1"] residency: "strict" fallback: false
With strict, a request that cannot be served inside the listed regions fails with 503 residency_unsatisfiable rather than quietly crossing a border. That is almost always what you meant.
Fill in the middle
The coder models support infilling. Send the halves separately — the sentinel tokens differ between releases and gluing them by hand is how editor plugins end up subtly wrong:
{
"model": "qwen2.5-coder-32b",
"prefix": "def parse(line):n ",
"suffix": "n return result"
}
Errors
Every error carries a type that is stable across versions, and a message written for a person. We do not return 400 Bad Request with an empty body, ever. Rate limits return 429 with retry-after in seconds, and the number is real rather than a fixed constant.