오류 응답 형식
대부분의 오류는 사람이 읽을 수 있는 메시지가 포함된error 필드를 반환합니다:
{
"error": "Invalid request parameters"
}
{
"error": "Your generation was blocked due to the model provider's content policies. Credits have been refunded.",
"credits_refunded": true
}
details 및 issues 필드가 포함될 수 있습니다:
{
"error": "Invalid request parameters",
"details": {
"_errors": [],
"field": {
"_errors": ["Field is required"]
}
},
"issues": []
}
{
"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"
}
}
자격 증명 누락
자격 증명이 없는 요청은401이 아니라 402 Payment Required를 반환합니다. 모든 유료 라우트는 x402 지갑 인증도 허용하므로, 응답은 결제 챌린지입니다. 응답에는 PAYMENT-REQUIRED 헤더와 두 가지 인증 방법을 설명하는 본문이 포함됩니다.
{
"x402Version": 2,
"error": "Authentication required",
"accepts": [ ... ],
"authOptions": {
"apiKey": {
"header": "Authorization: Bearer YOUR_API_KEY",
"getKey": "https://venice.ai/settings/api"
},
"x402Wallet": {
"header": "SIGN-IN-WITH-X",
"topUp": "POST /api/v1/x402/top-up"
}
}
}
Authorization: Bearer 헤더가 설정되어 있는지 확인하세요. 키가 있지만 유효하지 않으면 401을 반환합니다.
요청 형식 오류
이 오류는 엔드포인트별 유효성 검사가 실행되기 전, 요청 본문을 읽는 단계에서 발생합니다.| HTTP Status | Message | 원인 |
|---|---|---|
| 400 | 'Content-Type' must be 'application/json' | Content-Type: application/json 없이 전송된 POST, PUT, PATCH 본문. 파일 업로드를 받는 엔드포인트는 multipart/form-data도 허용합니다 |
| 400 | Invalid JSON request | 본문이 유효한 JSON이 아닙니다 |
| 400 | Invalid multipart request: malformed part header | 파싱할 수 없는 multipart/form-data 본문 |
| 413 | Request body exceeds the maximum allowed size. | 요청 본문이 너무 큽니다 |
| 415 | Request encoding is not supported | API가 디코딩할 수 없는 Content-Encoding 또는 문자 집합 |
Content-Type은 415가 아니라 400을 반환합니다. 크기 제한으로 인한 413 응답에는 code 필드도 포함됩니다:
{
"code": "PAYLOAD_TOO_LARGE",
"error": "Request body exceeds the maximum allowed size."
}
오류 코드
| Error Code | HTTP Status | Message | Log Level |
|---|---|---|---|
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 | - |
X402_USER_NOT_ALLOWED | 401 | Wallet user is not allowed to authenticate | - |
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 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 [email protected] | - |
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 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. /image/multi-edit에서만 반환됩니다 | - |
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 non-streaming requests, use the streaming API by setting stream=true. A streaming chat completion that times out before the model’s first chunk reports the failure as an in-band SSE error frame instead. | - |
기타 오류
위 표가 모든 오류를 망라하지는 않습니다. 일부 오류는 표에 나열된 코드 없이 반환되며, 메시지는 모델과 엔드포인트에 따라 다를 수 있으므로 메시지 텍스트가 아닌 HTTP 상태를 기준으로 분기하세요. 표에 없지만 발생할 수 있는 오류는 다음과 같습니다:| HTTP Status | 발생 상황 |
|---|---|
| 400 | 채팅 또는 Responses 요청의 이미지 입력이 지원되지 않는 형식입니다 |
| 400 | 요청한 음성을 해당 텍스트 음성 변환 모델에서 사용할 수 없습니다 |
| 403 | API 키의 허용 목록에 없는 IP 주소에서 요청했습니다 |
| 403 | API 키의 개인정보 보호 설정에서 요청한 모델을 허용하지 않습니다 |
| 403 | 요청한 모델에 대한 액세스가 제한되어 있습니다. [email protected]로 문의하세요 |
| 409 | 비디오, 음악 또는 음성 변환 결과를 조회할 때 아직 업로드 중입니다. 잠시 후 다시 시도하세요 |
| 410 | 엔드포인트가 지원 종료되었습니다 |
| 422 | 오디오가 너무 길거나 짧습니다(음성 복제, 음성 변환, 오디오 작업) |
| 422 | 비디오 요청의 입력 이미지 가로세로 비율이 모델이 허용하는 범위를 벗어났습니다 |
| 422 | 비디오 요청의 입력이 콘텐츠 검토에 의해 차단되었습니다 |
| 500 | 비디오 또는 음성 변환 생성에 실패했습니다 |
| 502 | 업스트림에서 음성 합성에 실패했거나 생성된 비디오를 가져올 수 없습니다. 요청을 다시 시도하세요 |