Error codes
Detailed descriptions of API error codes.
Below are detailed descriptions of error codes returned by the Gamma API.
Quick reference
400means the request shape or values are invalid.401usually means the API key is missing or invalid.402means the workspace is out of credits.404on generation polling usually means thegenerationIdis wrong or unavailable.429means you should slow down and retry later.
Example error response
{
"message": "Invalid API key.",
"statusCode": 401
}Error Code Reference
400
Input validation errors
Invalid parameters detected. Check the error details for specific parameter requirements.
401
Invalid API key
The provided API key is invalid or not associated with an eligible account.
402
Insufficient credits
Your workspace does not have enough credits. Purchase more at gamma.app/settings/billing or enable auto-recharge.
403
Forbidden
Access denied. You do not have permission for this resource, or the requested feature is not available on your plan.
404
Generation ID not found. generationId: xxxxxx
The specified generation ID could not be located. Check and correct your generation ID.
422
Failed to generate text. Check your inputs and try again.
Generation produced an empty output. Review your input parameters and ensure your instructions are clear.
429
Too many requests
Too many requests have been made. Retry after the rate limit period.
500
An error occurred while generating the gamma.
An unexpected error occurred while generating the gamma. Contact support with the x-request-id header for troubleshooting assistance.
502
Bad gateway
The request could not be processed due to a temporary gateway issue. Try again.
Troubleshooting Tips
400 - Input validation errors
Check that all required fields are present (
inputText,textModefor v1.0)Verify enum values match exactly (e.g.,
presentationnotPresentation)Ensure
inputTextis between 1 and 400,000 charactersCheck that
numCardsis within your plan’s limits
Related
Warnings for non-fatal response warnings
Poll for results if your error happens during generation status checks
Get Help if you need support escalation
Last updated
Was this helpful?