Endpoints & Rate Limits

Every request to SCX.ai goes to a single base URL over HTTPS — there's no per-region routing to configure.

text
https://api.scx.ai/v1

API endpoints

All endpoints are relative to the base URL above.

ResourcePath
Chat completions/chat/completions
Completions/completions
Embeddings/embeddings
Moderations/moderations
Messages/messages
Models/models
Responses/responses
Audio (transcription/translation)/audio/transcriptions, /audio/translations
Audio speech/audio/speech
Audio voices/audio/voices
Vector stores/vector_stores
Connectors/connectors
Files/files
Batches/batches
Videos/videos
Images/images/generations, /images/edits

Request size limits

Each endpoint enforces a maximum request body size. A request over its endpoint's limit is rejected with a 413 before it's processed — retrying the same body can never succeed, so shrink the payload first.

EndpointMax body size
Default (any endpoint not listed below)100 MB
/audio/transcriptions, /audio/translations25 MB
/videos40 MB
/videos/extensions210 MB
/images/generations1 MB
/images/edits40 MB
/files200 MB per file
/batches input file200 MB
json
{
  "error": {
    "message": "request body is too large for this endpoint's limit",
    "type": "invalid_request_error"
  }
}

Rate limits

Rate limits are enforced per organization and, where a request resolves to a specific model, per model — not per API key or per IP. Three limits apply together:

LimitMeaning
RPMRequests per minute
TPMTokens per minute
TPDTokens per day

Your actual RPM/TPM/TPD depend on your organization's plan and can change over time, so they aren't published as a fixed table here — check the usage page for your current limits, or read them straight off the response headers on any request:

HeaderDescription
X-RateLimit-Limit-RPMRequests-per-minute limit
X-RateLimit-Remaining-RPMRequests remaining in the current minute
X-RateLimit-Limit-TPMTokens-per-minute limit
X-RateLimit-Remaining-TPMTokens remaining in the current minute
X-RateLimit-Limit-TPDTokens-per-day limit
X-RateLimit-Remaining-TPDTokens remaining in the current day

Exceeding any of the three returns a 429:

json
{
  "error": {
    "message": "Rate limit exceeded",
    "type": "rate_limit_error"
  }
}

On a 429, back off and retry — the same request will succeed once the window resets.

Spend limits

Spend can be capped at three levels: an API key, a member of the organization, and the organization as a whole. A request is refused by whichever budget it reaches first, checked from the narrowest: the key, the key's budget for the requested model, the member, then the organization. Budgets count usage paid from your credit balance; they don't cap usage covered by a subscription or invoiced separately.

On a request that goes through, these headers report whichever of your own budgets has less left, your key's or your member budget:

HeaderDescription
X-Budget-LimitMaximum spend for the current period
X-Budget-Current-SpendSpend so far in the current period
X-Budget-RemainingRemaining budget in the current period

They are omitted when neither your key nor your membership has a budget, and they never report the organization's budget on a request that goes through.

A request over a budget returns a 429 whose code names the budget that refused it, with the headers describing that budget:

json
{
  "error": {
    "message": "Member budget exceeded",
    "type": "quota_exceeded",
    "code": "member_budget_exceeded"
  }
}
codeRefused by
key_budget_exceededThe API key's budget
key_model_budget_exceededThe API key's budget for the requested model
member_budget_exceededYour member budget in the organization
organization_budget_exceededThe organization's budget

Unlike a rate limit, retrying won't succeed until the budget's period resets or the budget is raised.

Errors and status codes

Every error response follows the same shape:

json
{
  "error": {
    "message": "human-readable description",
    "type": "error_type"
  }
}
StatusTypeMeaning
400invalid_request_errorThe request is malformed, or a parameter is missing or invalid.
401authentication_errorThe API key is missing or invalid.
402insufficient_creditYour organization has run out of credit.
403permission_errorYour API key doesn't have permission for this resource.
404not_found_errorThe requested resource doesn't exist.
413invalid_request_errorThe request body is over this endpoint's size limit — see Request size limits.
429rate_limit_error / quota_exceededA rate or spend limit was hit — see Rate limits and Spend limits.
500api_errorSomething went wrong on our end.
529overloaded_errorThe model is temporarily overloaded.