Errors and rate limits
Error responses
An error is an HTTP status code and a JSON body with a human-readable message:
{ "message": "Insufficient balance" }Status | Meaning | Typical causes | What to do |
|---|---|---|---|
400 | Bad request | A required field is missing, an unknown field was sent, a malformed node number, Insufficient balance, Node not available (taken or offline) | Read message and fix the request: top up, pick another node. Do not retry unchanged |
401 | Not authenticated | The key is missing, wrong or deleted | Check the key; create a new one if needed |
403 | Forbidden | Access denied | Contact support if you think it is a mistake |
404 | Not found | The session has stopped or the UUID is unknown; a hosting node is offline or not yours | List your sessions or pick another node |
409 | Conflict | The session is still starting or restarting | Wait until it is ready, then try again |
429 | Too many requests | A rate limit, or a restart too soon | Wait Retry-After seconds |
5xx | Server error | A temporary problem on our side | Retry later (see below for paid requests) |
503 | Unavailable | A service is temporarily unavailable, for example render | Retry later |
Requests with an unknown field are rejected with 400 instead of ignoring it, so a typo in a parameter name never silently starts a session with defaults.
Request ID
Each response carries a request ID in the X-Request-Id header. You can also send your own X-Request-Id to correlate calls with your logs. The SDKs expose it on the error (APIError.RequestID in Go, err.requestId in JavaScript). Include it when you contact support about a failed call.
Errors in the SDKs
Status | Go | JavaScript |
|---|---|---|
400, 422 | *ValidationError, IsValidation(err) | OctaValidationError |
401 | *AuthenticationError, IsAuthError(err) | OctaAuthenticationError |
403 | *PermissionError | OctaPermissionError |
404 | *NotFoundError, IsNotFound(err) | OctaNotFoundError |
409 | *ConflictError, IsConflict(err) | OctaConflictError |
429 | *RateLimitError, IsRateLimit(err) | OctaRateLimitError |
5xx | *ServerError | OctaServerError (OctaServiceUnavailableError for 503) |
No response (DNS, connection, TLS) | *NetworkError | OctaNetworkError (OctaTimeoutError on timeout) |
The CLI prints the API's message (for example Insufficient balance) and exits with a non-zero code. On a rate limit it tells you how long to wait.
Rate limits
Requests | Limit per minute |
|---|---|
Without an API key | 60 per IP address |
With an API key | 300 per account |
Starting and restarting sessions (POST /services/compute, POST /services/render, POST /services/compute/{uuid}/restart) | 10 per account |
In addition, one session can be restarted once in 5 minutes and 6 times an hour.
Every response carries the current state:
Header | Meaning |
|---|---|
RateLimit-Limit | Requests allowed in the window |
RateLimit-Remaining | Requests left in the window |
RateLimit-Reset | Seconds until the window resets |
Over the limit the API answers 429 with a Retry-After header (seconds). The SDKs expose the same state: client.RateLimit() in Go, client.rateLimit in JavaScript.
Tips
- Poll a starting session every 3 seconds or more; the SDK helpers already do this.
- Starting many sessions? Use a batch start: one request starts several sessions, though each still counts toward the 10 starts per minute.
- Cache listings for a few seconds on your side; with a key they are refreshed at most every 10 seconds anyway.
Retries
Read requests (GET) are safe to retry. The SDKs retry them automatically on network errors and on 429, 502, 503 and 504 (Go also on 500), with exponential backoff and jitter. They honour Retry-After up to 60 seconds; when the API asks to wait longer, the error is returned at once.
Stopping a session is safe to repeat: stopping a stopped session does nothing.
Requests that cost money or change prices are never retried automatically: starting, batch starting and restarting sessions, setting prices. A start that timed out may still have succeeded, and repeating it blindly could start a second paid session. After such an error:
- List your sessions with GET /sessions.
- If the session is there, use it. If not, start it again.
If you call the API directly, follow the same rules in your own retry logic.