Skip to main content

Error Response Format

All API errors follow a consistent JSON response format:
string
required
Short error message describing what went wrong
string
Human-readable explanation with additional context (optional)
object
Usage information when error is quota-related (optional)
number
Number of videos generated this billing period
number
Maximum videos allowed for your plan

HTTP Status Codes

400 Bad Request

The request was malformed or contained invalid parameters. Common causes:
  • Invalid JSON in request body
  • Missing required fields (url, variantCount, etc.)
  • Invalid URL format (not a valid HTTP/HTTPS URL)
  • Invalid variantCount (must be 1-3)
  • urls not an array of 1-3 valid URLs
Always validate your request parameters before sending to avoid 400 errors. These errors indicate a problem with your code, not the API.

401 Unauthorized

Authentication failed. Your API key is missing, invalid, or malformed. Common causes:
  • Missing Authorization header
  • Invalid API key format (must start with nvl_)
  • API key has been revoked
  • API key does not exist
Always use the Bearer authentication scheme:

402 Payment Required

You have exceeded your plan’s quota or attempted to use a feature not available on your plan. Common causes:
  • Generated more videos than your plan allows this billing period
  • Trial period has ended
  • Plan does not include API access
The usage object is included when the error is quota-related, showing your current usage and plan limit.

403 Forbidden

Your API key lacks the required permission to perform this action. Common causes:
  • API key does not have generate permission (for POST /api/v1/generate)
  • API key does not have projects:read permission (for GET endpoints)
  • Attempting to access another user’s resources
API key permissions cannot be modified after creation. If you need different permissions, revoke the key and create a new one with the correct permissions.
See the Permissions page for details on permission scopes.

404 Not Found

The requested resource does not exist. Common causes:
  • Job ID does not exist
  • Project ID does not exist
  • Typo in the endpoint URL
Job IDs are UUIDs (e.g., 550e8400-e29b-41d4-a716-446655440000). Double-check that you’re using the correct ID format from the generation response.

422 Unprocessable Entity

The request was well-formed, but the server cannot process it due to semantic errors. Common causes:
  • URL is not a product page (detected as homepage, category page, blog post, etc.)
  • URL is a valid product page but cannot be processed (unsupported e-commerce platform)
The special error code not_a_product is always returned with a 422 status. This indicates the URL was successfully accessed but determined to be a non-product page.

429 Too Many Requests

You have exceeded the rate limit of 60 requests per minute.
number
Number of seconds to wait before retrying (optional)
The response also includes a Retry-After header with the same value. See the Rate Limits page for detailed guidance on handling rate limits.

500 Internal Server Error

An unexpected error occurred on the server. Common causes:
  • Temporary service outage
  • Database connection issue
  • Unexpected data format from upstream service
500 errors are rare but can happen. Always implement retry logic with exponential backoff for 5xx errors.

Error Handling Best Practices

1. Implement Comprehensive Error Handling

Always check both the HTTP status code and the error response body:

2. Retry Strategy

Retry 5xx errors and 429 errors with exponential backoff. Do not retry 4xx errors (except 429).

3. Log Errors for Debugging

Always log the full error response for debugging:

4. Handle Special Error Types

Quota Exceeded (402)

When you receive a 402 error, show the user their current usage and guide them to upgrade:

Not a Product (422)

When you receive not_a_product, help the user understand what went wrong:

Contact Support

If you encounter persistent errors or need help debugging:
Include the error response, timestamp, and request ID (if available) when contacting support for faster resolution.