Generate images from a text prompt without input images.
Provide a prompt describing the desired image. Returns base64 images or signed download URLs.
Documentation Index
Fetch the complete documentation index at: https://docs.photalabs.com/llms.txt
Use this file to discover all available pages before exploring further.
Request body for the generate endpoint.
Provide a text prompt describing the image you want to create.
Reference profiles inline using [[profile_id]] syntax to
specify which people should appear in the generated image.
Text prompt describing the desired edit.
Number of output images to generate (1-4).
1 <= x <= 4Output aspect ratio (auto, 1:1, 3:4, 4:3, 9:16, 16:9).
auto, 1:1, 3:4, 4:3, 9:16, 16:9 Output resolution (1K, 2K, 4K). Per-model support varies; see /models.
1K, 2K, 4K Quality tier (auto, low, medium, high). Only supported by gpt-image-2; passing this field for other models returns 400. Omit (or pass 'auto') to let the provider pick — for gpt-image-2 this resolves to OpenAI's auto tier. Lower tiers reduce output tokens and therefore settled cost.
auto, low, medium, high Base model identifier. Omit to use the default base model. Unknown ids are rejected with 400; base models that do not support this endpoint's capability are also rejected with 400.
flux-2, gpt-image-2, nb2, qwen-image-2, reve Output image format (png, jpg). Default: png (will change to jpg on 2026-05-08).
png, jpg Response delivery mode. 'bytes': return base64-encoded image data (default). 'urls': return signed download URLs (24-hour expiry) instead of image bytes.
bytes, urls Successful Response
Response returned by the edit, generate, and enhance endpoints.
Dictionary mapping a known subject's profile_id to the number of times they were generated. If multiple variations are generated, this will be the aggregated count across all variations.
Output image(s) as raw base64-encoded strings. Format matches the requested output_format. Populated when response_mode='bytes', empty otherwise.
Signed download URLs for each output image (24-hour expiry). Populated when response_mode='urls', empty otherwise.