API basics

Rate limits

Routes that start model runs or handle sign-in and invites are limited per minute.

Limits

RouteDefault limitCounted per
POST /api/v1/agents-v2/agents/{agent_id}/run-stream/15 per minuteUser or API key
POST /api/v1/agents-v2/agents/run-stream/15 per minuteUser or API key
POST /api/v1/agents-v2/runs/15 per minuteUser or API key
POST /api/v1/agents-v2/agents/{agent_id}/sandbox/files/save-to-files/classify/15 per minuteUser or API key
POST /api/v1/chat-links/public/{token}/message/ and …/message/stream/15 per minuteIP address
POST /api/v1/auth/token, GET /api/v1/spaces/invites/preview, POST /api/v1/spaces/invites/set-password, GET /api/v1/organizations/invites/preview, POST /api/v1/organizations/invites/set-password10 per minuteIP address
  • The window is 60 seconds. The four agent-run routes share one counter per caller.
  • Platform keys are never counted.
  • Limits apply on deployments that enable them, including Alomana's shared cloud; a dedicated deployment may leave them off.

When you hit a limit

The response is 429 with headers that say when to retry:

HTTP/1.1 429 Too Many Requests
Retry-After: 42
RateLimit: "agent-run";r=0;t=42
RateLimit-Policy: "agent-run";q=15;w=60
{
  "detail": "Too many requests",
  "code": "REQUEST_RATE_LIMITED",
  "limit_name": "agent-run",
  "limit": 15,
  "window_secs": 60,
  "retry_after": 42
}
  1. Read Retry-After (seconds).
  2. Wait that long, then retry the same request.
  3. To start many runs, spread them so no more than the limit start within any 60 seconds.

A plan limit is a different error: 402 with code QUOTA_EXCEEDED. See Errors.

On this page