Errors
Canonical API error codes and response format
By YT2Text Team • Published February 1, 2025 • Updated March 22, 2026
Errors
Many route-level business failures use a stable envelope:
{
"success": false,
"error": {
"code": "FEATURE_NOT_AVAILABLE",
"message": "Feature unavailable on current plan",
"details": {}
}
}
Common error codes
INVALID_REQUEST– malformed payload or validation errorUNAUTHORIZED– missing/invalid credentialsINVALID_KEY/INVALID_API_KEY/KEY_NOT_FOUND– key does not exist, malformed, or revokedFORBIDDEN– authenticated user lacks permission for this routeRATE_LIMIT_EXCEEDED– too many requests in current windowQUOTA_EXCEEDED– daily/plan quota is exhaustedFEATURE_NOT_AVAILABLE– feature blocked for planJOB_NOT_FOUND– unknown job idJOB_NOT_COMPLETED– result not ready yetJOB_FAILED– job failed after processingBATCH_NOT_FOUND– unknown batch idLIMITS_ERROR– internal usage/limit accounting failureLIST_ERROR– list/filter retrieval failureRESULTS_ERROR– unable to assemble result payload
HTTP status mapping
Do not assume every failure maps cleanly to an HTTP status. The current backend mixes two patterns:
- application/business-rule failures often return
success: falsevia the JSON envelope - auth, CSRF/origin, and throttling failures are commonly raised as real HTTP errors
- 400/422: request/validation errors
- 401: missing or invalid auth credentials
- 403: permission denied, invalid origin, CSRF failure, or runtime-disabled feature
- 404: missing job/batch/resource on routes that raise
HTTPException - 429: throttled API-key request
- 500: unexpected internal failure
Examples of envelope-style failures that may still arrive with HTTP 200 today:
FEATURE_NOT_AVAILABLEQUOTA_EXCEEDEDJOB_NOT_FOUNDJOB_NOT_COMPLETED