AI models¶
Hosted open models served from the platform and metered per token.
Manage models¶
AI models lists the models available to your tenant and a catalog to pull more from. Pulling a model is a background task.
Call a model¶
The API is OpenAI-compatible, so existing SDKs only need a different base URL and token. Use a service account token (or your own session token):
curl https://gateway.cloud.rso.dev/ai/v1/chat/completions \
-H "Authorization: Bearer $RSO_DEV_ACCESS_TOKEN" \
-H "X-Tenant: <tenant-id>" \
-H "Content-Type: application/json" \
-d '{"model": "<model-name>", "messages": [{"role": "user", "content": "Hello"}]}'
| Endpoint | Shape |
|---|---|
POST /ai/v1/chat/completions |
OpenAI chat completions, streaming supported |
POST /ai/v1/embeddings |
OpenAI embeddings |
With the OpenAI SDKs, set the base URL to https://gateway.cloud.rso.dev/ai/v1 and send the
tenant as the X-Tenant default header.
Waiting for a model¶
The model host serves one large model at a time, so requests take turns: a request for a model that is not loaded waits for the running requests and for its model to load.
- A streaming chat completion that has to wait is answered at once and kept open with
server-sent comment lines (
: queued …), which SDKs ignore, until the first token. A failure after that point arrives as anerrorevent in the stream. - Every other request waits silently.
- When the queue is full or the wait gets too long the answer is
503withRetry-After; retry after that many seconds.
Set client timeouts generously (minutes, not seconds) for non-streaming calls.
Limits¶
| Limit | Value |
|---|---|
| Tokens per month | aiTokens quota, 5,000,000 by default: prompt and completion tokens together, per calendar month (UTC) |
| Request rate | 120 requests a minute per client address |
When the month's tokens are used up, requests are refused with 429 and an OpenAI-style error of
type insufficient_quota, with used, limit and resets_at. The limit is checked before a
request starts, so the request that crosses it still completes. It starts again on the first of
the next month; contact support to raise it.
Permissions¶
Calling a model needs the ai.inference permission, which every member and service account has
by default. It can be granted for some models only,
and withheld from a restricted service account.
Usage¶
Prompt and completion tokens are counted per model and per account; the Billing page shows the month's usage per model, and the dashboard shows the month's tokens against the quota.