Error Handling
Error code reference and troubleshooting guide.
All ListenHub API responses use HTTP 200 status codes. Success and failure are distinguished by the code field in the response body: code = 0 means success, code ≠ 0 means failure.
Error Code Reference
| Error Code | Description | Suggested Action |
|---|---|---|
| 0 | Request succeeded | — |
| 21007 | Invalid API key | Check that the Authorization header format is Bearer $LISTENHUB_API_KEY and verify the key is copied correctly |
| 25002 | Resource not found | Verify the episodeId is correct |
| 25008 | Invalid episode state | Only occurs in the script-first workflow. Wait for script generation to complete before submitting audio synthesis. See Podcast API reference |
| 26004 | Insufficient credits | Call GET /v1/user/subscription to check balance, then purchase credits |
| 29003 | Invalid parameters | Validate request payload against the API reference |
| 29998 | Rate limit exceeded | Over the 3 RPM limit — implement backoff retry |
| 91001 | Input content too short | Increase input content length |
| 91002 | Content policy violation | Review content for compliance |
| 91003-91007 | Content generation errors | Check the message field for details |
For unlisted non-zero error codes, check the message field in the response for details, or contact support@marswave.ai.
Error Response Format
All error responses follow the same JSON structure:
{
"code": 21007,
"message": "Invalid API key",
"data": null
}Common Troubleshooting
API key issues (21007):
- Confirm the
Authorizationheader format isBearer $LISTENHUB_API_KEY(note the space after Bearer) - Confirm the API key is fully copied with no extra whitespace
- Visit API Key settings to verify key status
Rate limiting (29998):
- Creation requests are limited to 3 per minute (3 RPM)
- Read-only requests are not subject to this limit
- Implement exponential backoff retry
Next Steps
- Authentication — API key setup and security practices
- Credits & Pricing — Solutions for insufficient credit balance
- Support — Contact the support team