الأخطاء
الأخطاء بصيغة تفاصيل المشكلة وفق RFC 9457 بنوع المحتوى application/problem+json. اعتمد في منطقك على code لأنه ثابت. أما title وdetail فنصوص إنجليزية موجّهة للبشر وقد تتغير.
صيغة الأخطاء
يشير type إلى الرمز في هذه الصفحة، ويكرر status حالة HTTP، وفي حالة invalid_params يسرد issues المعاملات التي فشلت.
HTTP/1.1 409 Conflict
Content-Type: application/problem+json
{
"type": "https://inker.si/developers/errors#max_coins_exceeded",
"title": "Max coins exceeded",
"status": 409,
"detail": "The price (52 coins) is above maxCoins (40).",
"code": "max_coins_exceeded",
"instance": "/v1/generations"
}رموز الأخطاء
الأوصاف باللغة الإنجليزية، مثل رسائل واجهة البرمجة.
| الرمز | حالة HTTP | المعنى |
|---|---|---|
consent_required | 400 | This task needs consent: true: you confirm you have the consent of the people shown, or the rights to the recording. |
idempotency_key_required | 400 | The Idempotency-Key header is missing or malformed (16–128 of A–Z a–z 0–9 _ -). |
input_duration | 400 | An input audio or video is shorter or longer than the model accepts. |
input_file_too_large | 400 | An input file is larger than the model accepts. |
input_too_large | 400 | An input image is too large for the model at these settings. |
invalid_params | 400 | A param fails the model’s schema; issues says which one and why. |
invalid_quote | 400 | The quoteToken is malformed, belongs to another account or to other params. |
wrong_media | 400 | A media param references a file of the wrong kind (an image where audio is expected). |
api_key_expired | 401 | The API key has expired. |
api_key_revoked | 401 | The API key was revoked. |
invalid_api_key | 401 | The API key is malformed or unknown. |
unauthorized | 401 | No API key was sent. |
insufficient_coins | 402 | Your balance cannot cover the price. Buy a coin pack on inker.si. |
spend_cap_exceeded | 402 | This request would pass the key’s monthly coin limit. |
account_locked | 403 | The account is locked, for example while a payment dispute is open. |
cooldown | 403 | A temporary abuse-protection cooldown is active on the account. |
explore_blocked | 403 | Sharing to Explore is blocked for this account. |
insufficient_scope | 403 | The API key lacks the scope this endpoint needs. |
not_found | 404 | The generation or file does not exist or is not yours. |
unknown_model | 404 | The model does not exist or is not open to the API. |
explore_limit | 409 | Too many posts on Explore already. |
explore_not_shareable | 409 | This output cannot be shared to Explore. |
explore_removed | 409 | Moderation removed this output from Explore; it cannot be shared again. |
idempotency_conflict | 409 | This Idempotency-Key was already used with a different body. |
max_coins_exceeded | 409 | The current price is above your maxCoins. Nothing was charged. |
not_cancelable | 409 | Only generations that are still queued can be canceled. |
price_changed | 409 | The quote expired and the price changed since. Quote again and resubmit. |
download_too_large | 413 | The requested download is too large. |
upload_too_large | 413 | The upload is larger than the upload limit. |
upload_too_long | 413 | The audio or video upload is too long. |
upload_invalid | 415 | The upload is not a supported, readable image, audio or video file. |
rate_limited | 429 | Too many requests in the current window. Wait Retry-After seconds. |
internal | 500 | Something went wrong on our side. Retry later. |
channel_disabled | 503 | The API is temporarily switched off. Reads keep working; nothing was charged. |
maintenance | 503 | inker is in maintenance. Nothing was charged; retry later. |
unavailable | 503 | The model cannot run these params right now. Nothing was charged; retry later. |
الأخطاء والعملات
لا يكلّف الطلب المرفوض أي عملات أبدًا. وتُسترد عملية التوليد التي تفشل بعد بدئها بالكامل.