Here are the most common API errors and how to fix them quickly.
401 Unauthorized
Error: Code:
INVALID_API_KEY
Common causes:
- API key is incorrect or has a typo
- API key was revoked
- Missing "Bearer" prefix in the header
How to fix:
bash# Wrong - missing Bearer prefix Authorization: YOUR_API_KEY # Correct - includes Bearer prefix Authorization: Bearer YOUR_API_KEY
404 Not Found
Error: Code:
INVALID_DESIGN_ID
Common causes:
- Design ID is incorrect
- Design was deleted
- Design belongs to a different account
How to fix:
- Copy the ID directly from the editor URL:
/editor/YOUR_DESIGN_ID - Verify the design exists in your dashboard
- Ensure you're using the correct API key for that account
400 Bad Request
Error: Code:
INVALID_ELEMENT
Common causes:
- Element name doesn't exist in the design
- Typo in element name
- Case sensitivity issue (names are case-sensitive!)
How to fix:
- Open the design in the editor
- Check the exact layer names in the right panel
- Use the Integrations page to see all available elements
Tip: Layer names are case-sensitive.
Titleandtitleare different elements!
429 Too Many Requests
Error: Code:
RATE_LIMIT_EXCEEDED
Cause: You're sending too many requests in a short time period.
How to fix:
- Add delays between requests (100-200ms recommended)
- Implement exponential backoff for retries
- Contact us if you need higher rate limits
javascript// Example: Exponential backoff async function renderWithRetry(data, maxRetries = 3) { for (let i = 0; i < maxRetries; i++) { try { return await render(data); } catch (error) { if (error.code === 'RATE_LIMIT_EXCEEDED') { await sleep(Math.pow(2, i) * 1000); // 1s, 2s, 4s continue; } throw error; } } }
402 Payment Required
Error: Code:
INSUFFICIENT_CREDITS
Cause: Your account has run out of render credits.
How to fix:
- Check your credit balance in Dashboard → Usage
- Upgrade your plan for more monthly credits
- Purchase a one-time credit pack
Still Having Issues?
Note: When contacting support, include:
- Your API request (with API key redacted)
- The full error response
- Design ID you're trying to render
- Timestamp of when the error occurred
Email us at support@canvelete.com and we'll help you resolve the issue quickly.