Error response format
Error object fields
| Field | Type | Description |
|---|---|---|
type | string | Error category (see taxonomy below) |
code | string | Machine-readable error code |
message | string | Technical description for developers |
display_message | string | User-safe message suitable for end users |
param | string | null | The parameter that caused the error, if applicable |
doc_url | string | Link to documentation for this specific error |
suggested_action | string | What to do to fix the error |
Error taxonomy
invalid_request_error (400)
The request was malformed or missing required parameters.
missing_required_param
missing_required_param
Cause: A required parameter is missing from the request body.Common triggers:
- Missing
textfield in/v1/classify - Missing
comment_idin/v1/comments/:id/reply
invalid_param_value
invalid_param_value
Cause: A parameter has an invalid value or type.Common triggers:
platformnot one of:youtube,instagram,twitter,facebooktextis empty or not a string
text_too_long
text_too_long
Cause: The
text parameter exceeds the maximum allowed length of 5,000 characters.Fix: Truncate or split long texts before sending.authentication_error (401)
The API key is missing, invalid, expired, or revoked.
missing_api_key
missing_api_key
Cause: No
Authorization header was provided.Fix: Include the header: Authorization: Bearer nawa_live_sk_xxxinvalid_api_key
invalid_api_key
Cause: The API key is not recognized. It may be malformed or from a different environment.Fix: Verify the key is correct and matches the environment (free/live).
expired_api_key
expired_api_key
Cause: The free API key has exceeded its 14-day expiry.Fix: Create a new free key from the dashboard. Live keys don’t expire.
revoked_api_key
revoked_api_key
Cause: The API key has been manually revoked.Fix: Use a different active key or create a new one.
insufficient_credits (402)
Your account balance is insufficient for the requested operation.
balance_exhausted
balance_exhausted
Cause: Your credit balance has reached $0. There is no grace period — paid endpoints stop immediately.Fix: Purchase a credit pack from the dashboard to restore access instantly.
rate_limit_error (429)
You’ve exceeded the rate limit for your current tier.
rate_limit_exceeded
rate_limit_exceeded
Cause: Too many requests in the current time window.Fix: Wait until the The
X-RateLimit-Reset time, then retry. Consider upgrading your tier.X-NAWA-RateLimit-Reason response header provides additional context (minute_limit or sandbox_exhausted).sandbox_exhausted
sandbox_exhausted
Cause: You’ve used all 100 lifetime requests on your free key.Fix: Buy credits to unlock a live key.
api_error (500)
An unexpected error occurred on the NAWA side.
internal_error
internal_error
Cause: An unexpected internal failure.Fix: Retry the request. If the issue persists, contact support with the
request_id.provider_failure
provider_failure
Cause: The upstream AI provider (ALLaM) experienced a failure.Fix: Retry after a brief delay. Check status.trynawa.com for incidents.