> ## Documentation Index
> Fetch the complete documentation index at: https://veniceai-mintlify-6ce01df5.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# رموز الأخطاء

عند حدوث خطأ، تُعيد Venice API رمز حالة HTTP ورسالة وصفية. تتضمن بعض الأخطاء أيضًا حقولًا إضافية، مثل حالة الاسترداد، أو النماذج المقترحة لإعادة المحاولة، أو تفاصيل التحقق، أو معرّفات الطلب.

## صيغة استجابة الخطأ

تُعيد معظم الأخطاء حقل `error` مع رسالة قابلة للقراءة من قِبَل الإنسان:

```json theme={"system"}
{
  "error": "Invalid request parameters"
}
```

تتضمن بعض endpoints حقولًا إضافية خاصة بالـ endpoint. على سبيل المثال، يمكن أن تتضمن أخطاء التحكم بمحتوى الفيديو ما إذا تم استرداد الاعتمادات:

```json theme={"system"}
{
  "error": "Your generation was blocked due to the model provider's content policies. Credits have been refunded.",
  "credits_refunded": true
}
```

قد تتضمن أخطاء التحقق حقلي `details` و `issues` مع معلومات التحقق على مستوى الحقل:

```json theme={"system"}
{
  "error": "Invalid request parameters",
  "details": {
    "_errors": [],
    "field": {
      "_errors": ["Field is required"]
    }
  },
  "issues": []
}
```

قد تُعيد بعض endpoints المتوافقة مع OpenAI كائنات أخطاء بأسلوب OpenAI لحالات محددة، مثل أخطاء طول السياق:

```json theme={"system"}
{
  "error": {
    "message": "Your request exceeds the model's maximum context. Please reduce your prompt or completion length.",
    "type": "invalid_request_error",
    "param": "messages",
    "code": "context_length_exceeded"
  }
}
```

## رموز الأخطاء

| رمز الخطأ                            | حالة HTTP | الرسالة                                                                                                                                                           | مستوى السجل |
| ------------------------------------ | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `AUTHENTICATION_FAILED`              | 401       | Authentication failed                                                                                                                                             | -           |
| `AUTHENTICATION_FAILED_INACTIVE_KEY` | 401       | Authentication failed - Pro subscription is inactive. Please upgrade your subscription to continue using the API                                                  | -           |
| `X402_INVALID_SIGN_IN`               | 401       | Invalid Sign-in-with-x signature                                                                                                                                  | -           |
| `PRO_ONLY_MODEL`                     | 401       | This model is only available to Pro users                                                                                                                         | -           |
| `INSUFFICIENT_BALANCE`               | 402       | Insufficient USD or Diem balance to complete request. Visit [https://venice.ai/settings/api](https://venice.ai/settings/api) to add credits.                      | -           |
| `API_KEY_DIEM_SPEND_LIMIT_EXCEEDED`  | 402       | API key DIEM spend limit exceeded. Your account may still have DIEM balance, but this API key has reached its configured DIEM spending limit.                     | -           |
| `API_KEY_USD_SPEND_LIMIT_EXCEEDED`   | 402       | API key USD spend limit exceeded. Your account may still have USD balance, but this API key has reached its configured USD spending limit.                        | -           |
| `UNAUTHORIZED`                       | 403       | Unauthorized access                                                                                                                                               | -           |
| `API_ACCESS_DISABLED`                | 403       | API access has been disabled for this account. Please contact [support@venice.ai](mailto:support@venice.ai)                                                       | -           |
| `X402_WALLET_MISMATCH`               | 403       | You can only access resources for your own wallet                                                                                                                 | -           |
| `INVALID_REQUEST`                    | 400       | Invalid request parameters                                                                                                                                        | -           |
| `INVALID_MODEL`                      | 400       | Invalid model specified                                                                                                                                           | -           |
| `REQUEST_ID_NOT_FOUND`               | 400       | Request ID is invalid.                                                                                                                                            | -           |
| `INVALID_AUDIO_FORMAT`               | 400       | Invalid audio format. Supported formats are WAV and MP3.                                                                                                          | -           |
| `INVALID_VIDEO_FORMAT`               | 400       | Invalid video format. Supported formats include MP4, MOV, WebM, MKV, AVI, and others.                                                                             | -           |
| `CORRUPTED_IMAGE`                    | 400       | The image file is corrupted or unreadable                                                                                                                         | -           |
| `IMAGE_TOO_SMALL`                    | 400       | Image dimensions are too small                                                                                                                                    | -           |
| `TOO_MANY_TOKENS`                    | 400       | Your request exceeds the model's maximum context. Please reduce your prompt or completion length.                                                                 | -           |
| `CHARACTER_NOT_FOUND`                | 404       | No character could be found from the provided character\_slug                                                                                                     | -           |
| `MODEL_NOT_FOUND`                    | 404       | Specified model not found                                                                                                                                         | -           |
| `MEDIA_NOT_FOUND`                    | 404       | Media could not be found. Request may may be invalid, expired, or deleted.                                                                                        | -           |
| `PAYLOAD_TOO_LARGE`                  | 413       | The request payload is too large. Please reduce the size of your request.                                                                                         | -           |
| `INVALID_CONTENT_TYPE`               | 415       | Invalid request content-type                                                                                                                                      | -           |
| `VIDEO_DURATION_TOO_LONG`            | 422       | Video duration exceeds the maximum allowed.                                                                                                                       | -           |
| `VIDEO_DURATION_TOO_SHORT`           | 422       | Video duration is too short.                                                                                                                                      | -           |
| `IMAGE_TOO_LARGE`                    | 422       | Image dimensions exceed the maximum allowed.                                                                                                                      | -           |
| `CONTENT_POLICY_VIOLATION`           | 422       | Your prompt violates the content policy of Venice.ai or the model provider                                                                                        | -           |
| `ASR_UPSTREAM_VALIDATION_FAILED`     | 422       | The audio could not be processed for transcription. Common causes: zero-length, silent, corrupt, or unsupported-language audio. Please verify the file and retry. | warn        |
| `RATE_LIMIT_EXCEEDED`                | 429       | Rate limit exceeded                                                                                                                                               | -           |
| `MODEL_OVERLOADED`                   | 429       | The model is currently overloaded. Please try again later.                                                                                                        | -           |
| `INFERENCE_FAILED`                   | 500       | Inference processing failed                                                                                                                                       | error       |
| `UPSCALE_FAILED`                     | 500       | Image upscaling failed                                                                                                                                            | error       |
| `IMAGE_EDIT_ERROR`                   | 500       | Image edit failed                                                                                                                                                 | error       |
| `UNKNOWN_ERROR`                      | 500       | An unknown error occurred                                                                                                                                         | error       |
| `TEE_ATTESTATION_FAILED`             | 502       | TEE attestation request failed. The Trusted Execution Environment provider may be temporarily unavailable.                                                        | error       |
| `TEE_SIGNATURE_FAILED`               | 502       | TEE signature request failed. The Trusted Execution Environment provider may be temporarily unavailable.                                                          | error       |
| `ASR_UPSTREAM_FAILED`                | 502       | Audio transcription failed due to a temporary upstream error. Please retry.                                                                                       | warn        |
| `MODEL_OFFLINE`                      | 503       | The model is temporarily offline. Please try again later.                                                                                                         | -           |
| `MODEL_AT_CAPACITY`                  | 503       | The model is at capacity. Please try again later.                                                                                                                 | -           |
| `REQUEST_TIMEOUT`                    | 504       | The request took too long to complete and was timed-out. For long-running inference requests, use the streaming API by setting `stream=true` in your request.     | -           |
