Error envelope
json
{
"error": {
"code": "invalid_request",
"message": "The request is invalid",
"request_id": "req-...",
"details": [
{
"path": "parameters.duration_seconds",
"code": "too_big",
"message": "Number must be less than or equal to 30"
}
]
}
}Log request_id and include it when contacting support. Never parse human-readable messages as stable program logic.
HTTP errors
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_request | Malformed JSON, invalid fields, or an invalid constraint combination |
| 401 | authentication_required | Bearer key missing, invalid, expired, or inactive |
| 402 | insufficient_balance | Not enough available USD for the hold |
| 403 | forbidden / model_not_available | Scope is missing or external model sales are unavailable for this project |
| 404 | generation_not_found / media_asset_not_found | The resource does not exist in this project |
| 409 | idempotency_conflict / media_upload_not_ready / media_asset_not_ready | Request conflicts with current state |
| 410 | media_upload_expired | The reserved upload expired |
| 413 | payload_too_large / media_upload_limit_exceeded | HTTP or media-upload limit exceeded |
| 415 | unsupported_media_type | Request Content-Type is not application/json |
| 422 | media_upload_mismatch / input_video_duration_invalid | Uploaded metadata or verified duration violates the contract |
| 503 | media_upload_storage_unavailable | Immutable upload verification is temporarily unavailable |
| 500 | internal_error | Internal failure without provider or database details |
Asynchronous generation failures
A provider failure after create is returned by normal GET with HTTP 200, status: failed, and an error object. Gensta does not forward the provider's raw HTTP envelope. Treat unknown asynchronous error codes as valid and display the safe message or request support.