API Reference

HTTP Status Codes

StatusMeaning
200Success
400Bad request — malformed input or validation failure
401Unauthorized — missing or invalid API key
403Forbidden — valid key but insufficient permissions
404Not found — project or resource doesn't exist
429Too many requests — rate limit exceeded
500Internal server error — something went wrong on our end

Error Response Format

All errors return a JSON body:

{
  "error": {
    "code": "invalid_request",
    "message": "The 'sourceLanguage' field is required."
  }
}

Common Error Codes

CodeStatusDescription
invalid_request400Request body failed validation
unauthorized401API key is missing, expired, or malformed
forbidden403API key doesn't have access to this project
not_found404Project or resource not found
rate_limited429Too many requests — back off and retry
translation_failed500AI translation failed after retries
internal_error500Unexpected server error

LLM Failure Handling

The API retries failed LLM calls up to 3 times with exponential backoff. If all retries are exhausted, the entire batch fails — partial results are not returned. This is an all-or-nothing approach per batch chunk to avoid inconsistent translation states.