Error Codes and Warnings

Error codes

Sample error response

{"message":"Invalid API key.", "statusCode":401}
Status CodeMessageDescription
400Input validation errorsInvalid parameters detected. Check the error details for specific parameter requirements.
401Invalid API keyThe provided API key is invalid or not associated with a Pro account.
404Generation ID not found. generationId: xxxxxxThe specified generation ID could not be located. Check and correct your generation ID.
422Failed to generate text. Check your inputs and try again.Generation produced an empty output. Review your input parameters and ensure your instructions are clear.
429Too many requestsToo many requests have been made. Retry after the rate limit period.
500An 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.
502Bad gatewayThe request could not be processed due to a temporary gateway issue. Try again.

Warnings

In some cases, we may return warnings in response to a generation request. Warnings are returned if there were conflicting or ignored parameters in your API call. For example, if you specified preservein textMode and at the same time used brief in textOptions.amount, Gamma would respect the instruction to preserve your text and would ignore the request for the generated text to be brief. For transparency, the API would return a warning informing you that we ignored the textOptions.amount parameter.

Some additional scenarios where warnings would be returned are illustrated below.

Conflicting format and dimensions

{
  "format": "presentation",
  "inputText": "Best hikes in the United States",
  "pageOptions": {
  	"dimensions": "1x1"
  }
}
{"generationId":"xxxxxxxxxx","warnings":"cardOptions.dimensions 1x1 is not valid for format presentation. Valid dimensions are: [ 16x9, 4x3, fluid ]. Using default: fluid."}

Conflicting image source and model

{
  "format": "presentation",
  "inputText": "Best hikes in the United States",
  "imageOptions": {
  	"source": "pictographic",
		"model": "flux-1-pro"
  }
}
{"generationId":"xxxxxxxxxx","warnings":"imageOptions.model and imageOptions.style are ignored when imageOptions.source is not aiGenerated."}