Перейти к содержимому

Справочник ошибок

При успешном ответе HTTP-статус равен 200, а поле code в теле — нулю. При ошибке возвращается соответствующий HTTP-статус, а машиночитаемый код передаётся в поле code.

Формат ответа

{
"code": 5,
"message": "Insufficient balance, check account balance.",
"trace_id": "662f1a9c4b1e2d0012a3b4c5"
}
ПолеТипОбяз.Описание
codenumberдаКод ошибки (0 при успехе, см. таблицу ниже).
messagestringдаЧеловекочитаемое описание ошибки.
detailsarrayнетДетали валидации входных данных (присутствует при code: 3).
trace_idstringнетИдентификатор запроса для обращения в поддержку (при внутренних ошибках, code: 1).

Авторизация

Если API-ключ отсутствует или недействителен, возвращается HTTP 401 с телом вида { "error": { "message": "Unauthorized" } }. Проверьте заголовок Authorization.

Доступные ошибки

CodeHTTPMessage
1500Internal server error.
3400Invalid input, check schema issues.
5402Insufficient balance, check account balance.
6429API key limit exceeded. Check your daily or monthly limits.
7403Model is not available for this account (banned or restricted).
20404Model not found or is not available via the LAB API.
21410Model is deprecated or not available for this organization.
22404Task not found.
23409Task with this idempotency_key already exists with different input.
24404Model is not available for this API key. Request GET /api/v2/media/models to see the models available to you.
25400Input file was rejected by the model. Check its size, format, resolution and aspect ratio.
26400Prompt was rejected by the model. Check its length and content.
27400Requested combination of parameters is not supported by this model.
28503Generation failed for a reason we could not attribute. Repeat the same request later; if it keeps failing, check the input files and their URLs.
99404API method not found, check the URL.
1001400Sensitive content has been detected in your request or uploaded files. Please check the text and media and try again.
1002400Request was blocked by moderation.