API documentation
Reference
Find error codes, input limits, rate limits, and usage details.
Error codes
All errors share a common envelope. The request_id matches the one in usage logs — include it when contacting support.
Error response
{
"error": {
"code": "invalid_request",
"message": "horizon: Input should be less than or equal to 512",
"request_id": "req_a1b2c3d4e5f67890a1b2c3d4e5f67890"
}
}| HTTP | Code | Description |
|---|---|---|
| 400 | invalid_request | Schema, value, or limit violation in the request body |
| 401 | unauthorized | Missing, invalid, or revoked API key |
| 402 | payment_required | Insufficient credits |
| 403 | forbidden | Insufficient permissions |
| 404 | not_found | Unknown route |
| 405 | method_not_allowed | HTTP method not allowed for this route |
| 413 | payload_too_large | Request body exceeds the size limit |
| 429 | rate_limited | Rate limit exceeded — retry with backoff |
| 500 | internal_error | Unexpected server error |
| 503 | model_unavailable | Model is not available — retry later |
| 504 | timeout | Inference timed out |
If an error does not resolve, see "Forecasts fail" in Help. opens in a new tab
Input limits
Requests exceeding these limits are rejected with 400 invalid_request.
| Limit | Value |
|---|---|
| Points per series | 16–2048 |
| Series per request | up to 64 |
| Forecast horizon | 1–512 |
| Total input points per request | up to 131,072 |
Rate limits
Applied per API key with a token bucket: burst of 10 requests, refilling at 1 request/sec (free tier). Exceeding it returns 429 rate_limited.
Usage
The usage object in every 200 response shows how many data points the request consumed. The same numbers appear in the request log on the Usage page.
| Field | Description |
|---|---|
| input_points | Total input points across all submitted series |
| output_points | Total points returned. Defined per endpoint: forecast = horizon × series count / anomaly = sum of 2 × (length − test_start) / impute = sum of imputed (null) points / embed = 0 |
| series_count | Number of series in the request |