Error Handling & Response Schema
OneASR returns standard HTTP status codes along with OpenAI-compatible JSON error bodies.
Error Response Format
json
{
"error": {
"message": "Invalid API key provided.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}Common HTTP Status Codes
| Status Code | Code / Type | Description |
|---|---|---|
200 OK | - | Request succeeded. |
400 Bad Request | invalid_request_error | Missing required parameters or unsupported audio format. |
401 Unauthorized | invalid_api_key | Missing or incorrect API key in Authorization header. |
404 Not Found | not_found_error | Requested task ID or model was not found. |
422 Unprocessable | validation_error | Multipart form schema validation failed. |
500 Internal Server | server_error | ASR inference worker error or out-of-memory exception. |
