Error Handling
The Garmint API uses standard HTTP status codes and returns consistent JSON error responses.Error Response Format
All errors follow this structure:Error Codes
Authentication Errors
Request Errors
Rate & Usage Errors
Server Errors
HTTP Status Codes
Handling Errors in Code
TypeScript
Python
Debugging Tips
Check request headers
Check request headers
Ensure you’re sending:
Authorization: Bearer gm_live_xxxContent-Type: application/jsonfor POST requests
Validate URLs
Validate URLs
Design and garment URLs must be:
- Publicly accessible (no auth required)
- HTTPS preferred
- Valid image formats (PNG, JPEG, WebP)
Check your token balance
Check your token balance
The
X-Tokens-Remaining header shows your current balance in every response.Review rate limit headers
Review rate limit headers
Monitor
X-RateLimit-Remaining to avoid hitting limits.Getting Help
If you encounter persistent errors:- Check our status page
- Search Discord for similar issues
- Email api@garmint.app with:
- Your request (redact API key)
- The error response
- Timestamp of the request