Справочник ошибок
Сервис CreativeLab API возвращает соответствующий HTTP-статус в зависимости от типа ошибки, чтобы клиентская логика и мониторинг работали предсказуемо. Дополнительно код ошибки передаётся в виде JSON в теле ответа (поле code).
При успешном сценарии HTTP-статус равен 200, а code — нулю.
Формат ответа
При ошибке тело ответа — JSON следующего вида:
{ "code": 5, "message": "Insufficient balance, check account balance.", "trace_id": "662f1a9c4b1e2d0012a3b4c5"}| Поле | Тип | Обяз. | Описание |
|---|---|---|---|
code | number | да | Внутренний код ошибки (0 при успехе, см. таблицу ниже). |
message | string | да | Человекочитаемое описание ошибки. |
issues | array | нет | Детали валидации входных данных (присутствует только при code: 3). |
trace_id | string | нет | Идентификатор запроса для обращения в поддержку (присутствует при внутренних ошибках, code: 1 / 500). |
Доступные ошибки
| Code | HTTP | Message |
|---|---|---|
| 1 | 500 | Internal server error. |
| 2 | 401 | Invalid token, check if authorization header has a valid value. |
| 3 | 400 | Invalid input, check schema issues. |
| 4 | 404 | Record not found. |
| 5 | 402 | Insufficient balance, check account balance. |
| 6 | 402 | API key limit exceeded. Check your daily or monthly limits. |
| 6 | 503 | Service on heavy load. Try again later. |
| 7 | 403 | Has organization restrict for this model. |
| 8 | 400 | Audio is too long. Maximum duration is 2 hours. |
| 9 | 400 | Audio is too short. Minimum duration is 1 second. |
| 10 | 504 | Could not read audio duration in time. Ensure audio_url is a direct, fast, publicly reachable link. |
| 11 | 415 | Unsupported audio format. Supported formats: mp3, mp2, wav, flac, aac, ogg, oga, opus, m4a, mp4, mov, 3gp, alac, webm, mka, wma, wmv, amr, aiff, ac3, avi, flv, ts, mpg, au. |
| 12 | 400 | Could not read the audio file at audio_url. Ensure the link is a direct, publicly accessible file URL (no bot protection), supports HTTP Range requests, and returns a correct Content-Length. |
| 13 | 400 | This model has no default generation tier and the tier cannot be set per request. Use a model id that encodes the tier in the id (a legacy variant with the parameters in the id). |
| 99 | 404 | API method not found, please check url you call. |
| 400 | 400 | model does not support First-and-Last-Frame-Video. |
| 400 | 400 | Prompt is too long. Max length is 500 characters. |
| 400 | 400 | Images are required for this model. |
| 500 | 500 | Internal exception. We already working on this issue. |
| 1001 | 400 | Sensitive content has been detected in your request or uploaded files. The security system has blocked data processing. Please check the text and images and try again. Repeated violations may lead to restricted access to your account. |
| 1002 | 400 | Your prompt did not pass the content safety check. Please modify your request. Please note that repeating this error may lead to account suspension. |