Prediction API Errors
Predictions-only error catalog — routes, `error_id` values, and shapes not repeated on the main API errors page.
Prediction errors
This page is the Predictions supplement to API errors (HTTP semantics, 401–429, shared error_id tables, and handling patterns). It lists GET /v1/predictions, POST /v1/predict, POST /v1/predictions, and GET /v1/predictions/:uuid only.
Also read: HTTP status · 401 · 402 · 403 · 404 · 422 · 429 · 500 · 502 · 503
Inference routes use a different shape — Inference errors. JSON field lists — Error objects.
Predictions-only notes
404: MODEL_NOT_FOUND is for a wrong model slug on list/create. GET /v1/predictions/{uuid} does not return 404 for a missing prediction id — use 502 + error_id (Get one).
Error response format
Structured failures use the unified API error envelope (status: false, response, nested error). The response HTTP status matches error.http_status. Branch on error.error_id.
{
"status": false,
"response": "Human-readable summary",
"error": {
"http_status": 402,
"message": "Detailed message",
"details": "String or object",
"error_id": "ERROR_CODE"
}
}Examples: Error objects (VALIDATION_ERROR, 502, 402 credits).
GET /v1/predictions — list
Shared auth errors: 401 (UNAUTHORIZED, ACCOUNT_SUSPENDED).
| HTTP | error_id | What happened |
|---|---|---|
| 400 | INVALID_PARAMETER | per_page not between 1 and 50 |
| 400 | INVALID_DATE_FORMAT | from or to not Y-m-d |
| 400 | INVALID_DATE_RANGE | from after to |
| 400 | INVALID_PARAMETER_COMBINATION | Query parameters conflict |
| 404 | MODEL_NOT_FOUND | model query filter slug does not exist |
| 500 | INTERNAL_ERROR | Error while paginating |
POST /v1/predict / POST /v1/predictions — create
Same handler. Shared codes (VALIDATION_ERROR, MODEL_NOT_SUPPORTED, credits, 403 model gates): 422 · 402 · 403.
Request validation
| HTTP | error_id | What happened |
|---|---|---|
| 422 | VALIDATION_ERROR | Missing model or input |
Examples: missing model · missing input
INVALID_PARAMETER_COMBINATION — 400
Predictions-specific: query or input fields cannot be combined. Fix using error.message / error.details.
Model checks (before modality branch)
| HTTP | error_id | What happened |
|---|---|---|
| 404 | MODEL_NOT_FOUND | Slug not found |
| 403 | MODEL_NOT_ACTIVE | Model is not active |
| 403 | MODEL_NOT_BILLABLE | Model has no billable price |
| 422 | MODEL_NOT_SUPPORTED | Model type is not image, video, or audio |
Incompatible parameters (create)
| HTTP | error_id | What happened |
|---|---|---|
| 400 | INVALID_PARAMETER_COMBINATION | Conflicting input fields |
Image predictions
| HTTP | error_id | What happened |
|---|---|---|
| 402 | INSUFFICIENT_CREDITS | Balance too low — see 402 |
| 503 | PREDICTION_ERROR | Empty/invalid handler — see 503 |
| 500 | CREDITS_DEDUCTION_FAILED | Deduction error |
| 502 | dynamic | Prediction Serving Error — 502 · example |
Video / audio predictions
| HTTP | error_id | What happened |
|---|---|---|
| 403 | PARAMETER_NOT_ALLOWED | Enterprise-only input |
| 500 | INPUT_FIELD_MISSING | input_field not configured |
| 422 | ASSET_URL_REQUIRED | Asset URL missing |
| 422 | FAILED_TO_CALCULATE_VIDEO_DURATION | Duration from URL failed |
| 422 | VIDEO_DURATION_LESS_THAN_4_SECONDS | Below minimum duration |
| 402 | INSUFFICIENT_CREDITS | Balance too low |
| 503 | PREDICTION_ERROR | Empty handler |
| 502 | dynamic | Prediction Serving Error |
| 500 | CREDITS_DEDUCTION_FAILED | Deduction error |
| 500 | PREDICTION_FAILED | Unexpected result structure |
GET /v1/predictions/:uuid — get one
Shared: 401.
| HTTP | error_id | What happened |
|---|---|---|
| 400 | PREDICTION_ID_REQUIRED | UUID missing from path |
| 502 | ACCESS_DENIED | Private / non-sharable prediction or resource |
| 502 | dynamic | Failed result — error_id from stored/serving outcome |
| 502 | UNKNOWN_ERROR | Unexpected handler result type |
| 500 | FAILED_TO_FETCH_PREDICTION | Exception while loading |
502 example: Error objects · serving failures: 502
Retry: 500 with backoff. 502: branch on error_id — ACCESS_DENIED is not retryable; other codes per Prediction Serving Error — 502.
ACCESS_DENIED — 502
Not allowed to use this model, read this prediction, or access this resource (private, non-sharable, or another account). Do not retry until access is valid.
VALIDATION_ERROR — 422
Create body missing model or input. 422 · JSON: validation example
Prediction Serving Error — 502
Serving/runtime failure with 502 and error.error_id. 502 — Bad Gateway · 502 envelope
Prediction-level errors
After the job is accepted, status: "failed" and error on the prediction resource (often 200 on GET) — not the structured error envelope. API errors — prediction level · failed prediction object · prediction.failed webhook
{
"status": "failed",
"error": "Failed to generate image.",
"output": null,
"id": "pred_id....",
"model": "truefusion"
}Trailing slash
POST /v1/predictions/ may redirect to GET the list. Use /v1/predictions without a trailing slash.
Handling errors
Use the envelope: read error.error_id on the JSON body (body.error in most clients). Nested shape matches Error objects. General patterns: Handling errors in code.
Predictions envelope (`error` nested)
import os, requests
r = requests.post(
"https://api.skytells.ai/v1/predictions",
headers={
"x-api-key": os.environ["SKYTELLS_API_KEY"],
"Content-Type": "application/json",
},
json={"model": "your-model-slug", "input": {}},
)
data = r.json()
err = data.get("error") or {}
if r.status_code >= 400 and err.get("error_id"):
print(err["error_id"], err.get("message"))Related
- API errors — shared HTTP and
error_idreference - Rate limits — 429
- status.skytells.ai — incidents
How is this guide?