POST /images
Generate a standalone on-brand image from a text prompt.
Start an asynchronous image generation from a text prompt. Returns an imageGenerationId to poll for the image URL and metadata.
Creates an asynchronous image generation job that produces one standalone on-brand image. Returns an image generation ID that can be used to poll for status. If themeId is provided but does not exist or is not accessible to your workspace, the request fails with 400.
API key for authentication
Visual style of the generated images. Defaults to "illustration". Skipped when referenceImages are present — references take precedence and style comes from the prompt.
illustrationExample: illustrationPossible values: Output size preset (sets the aspect ratio; exact pixel dimensions are model-determined). Defaults to "social-square" (1:1).
social-squareExample: social-squarePossible values: Description of the image to generate. Background treatments ("on white", "contained in a circle") go here.
illustration of a team running payroll accurately and on time, on whitePattern: \STheme to brand the images with. Defaults to the workspace default theme.
Applied for all types except "scene", whose curated style ignores theme
colors (a theme_ignored_for_type warning is returned if you supply
themeId for scene). Also ignored when referenceImages are present —
references drive the look.
abc123xyzImage generation job created successfully
Unique identifier for the image generation job. Poll
GET /v1.0/images/{id} with this id until status is "completed" or
"failed".
abc123xyzInvalid request parameters
Invalid or missing API key
Insufficient credits
Access denied or feature not available
Not found
POST /v1.0/images HTTP/1.1
Host: public-api.gamma.app
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 235
{
"type": "illustration",
"sizePreset": "social-square",
"referenceImages": [
{
"url": "https://example.com/mascot.png",
"role": "subject"
}
],
"prompt": "illustration of a team running payroll accurately and on time, on white",
"themeId": "abc123xyz"
}{
"imageGenerationId": "abc123xyz",
"warnings": [
{
"code": "no_brand_theme_applied",
"message": "No brand theme found; a standard theme was used."
}
]
}Related
GET /images/{id} to poll for the image URL and
savedMediaIdPoll for results for polling patterns and rate limit guidance
Warnings for image-generation warning codes returned in the response
Last updated
Was this helpful?