SexyVoice Docs

Error Codes

Centralized error response format and code semantics for API.

All errors return this shape:

{
  "error": {
    "message": "Human-readable message",
    "type": "invalid_request_error",
    "param": "input",
    "code": "input_too_long"
  }
}

Error Types

  • invalid_request_error: Request shape or parameter invalid.
  • authentication_error: Missing or invalid API key.
  • permission_error: Account is authenticated but operation is blocked (for example, insufficient credits).
  • not_found_error: Referenced resource does not exist.
  • rate_limit_error: Request exceeds configured rate limits.
  • server_error: Internal processing failure.

Common Codes

CodeTypeMeaning
invalid_requestinvalid_request_errorRequest body failed validation.
unsupported_parameterinvalid_request_errorParameter is not supported.
unsupported_response_formatinvalid_request_errorRequested format is unsupported for selected model.
input_too_longinvalid_request_errorInput exceeds model limits.
voice_not_foundnot_found_errorVoice ID does not exist, or voice name does not exist for the requested model.
invalid_api_keyauthentication_errorBearer key missing/invalid/inactive.
insufficient_creditspermission_errorAccount balance is too low.
rate_limit_exceededrate_limit_errorToo many requests.
provider_quota_exceededrate_limit_errorProvider quota or billing is temporarily exhausted.
content_policy_violationinvalid_request_errorContent blocked by provider safety policy.
provider_unavailableserver_errorUpstream provider is temporarily unavailable; retry later.
server_errorserver_errorInternal service or provider failure. Responses use HTTP 500 or 503; retry 503 responses with backoff.

Voice lookup errors and client compatibility

POST /api/v1/speech returns HTTP 404 with error.code = "voice_not_found" when a voice ID is unavailable or a voice name does not exist for the requested model. This applies to every supported model, including gpro, gpro31, orpheus, and xai, as well as gpro38.

If your client handles HTTP 400 with model_not_found, also handle HTTP 404 with voice_not_found for voice/model mismatches. Select an available voice ID or a matching name and model from GET /api/v1/voices before retrying. Invalid request shapes and unsupported model values still return HTTP 400 validation errors.

Debugging with request-id

Every response includes request-id header. Save it with your logs and include it in bug reports.

On this page