Image Generation
Multi-provider image generation with an OpenAI-canonical API surface. All providers are normalized to the same request/response schema.
Supported Providers
| Provider | Models | Key Features |
|---|---|---|
| OpenAI | openai/gpt-image-1, openai/dall-e-3 | Transparency, high quality |
| Gemini | gemini/imagen-3 | Negative prompts, seeds |
| Stability AI | stability/sdxl, stability/sd3 | ControlNet, CFG scale, steps |
| Flux | flux/pro, flux/dev, flux/schnell | LoRA support, seeds |
| xAI | xai/aurora | Fast generation |
Basic Request
POST /v1/images/generations
{
"prompt": "A majestic lion in a savanna at sunset",
"model": "openai/gpt-image-1",
"n": 1,
"size": "1024x1024",
"quality": "high"
}Response
{
"code": 200,
"type": "SUCCESS",
"data": {
"created": 1735500000,
"data": [{
"url": "https://provider-url.com/...",
"file_id": "file_abc123",
"file_url": "https://cdn.picklayer.com/...",
"revised_prompt": "A majestic African lion..."
}],
"model": "openai/gpt-image-1"
}
}Core Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
prompt | string | required | Text prompt (max 32000 chars) |
model | string | required | Provider-prefixed model ID |
n | number | 1 | Number of images (1-10) |
size | string | ”1024x1024” | Output size |
quality | string | ”auto” | low, medium, high, hd |
response_format | string | ”url” | url or b64_json |
Provider-Specific Parameters
Stability AI / Flux
{
"prompt": "A futuristic city skyline",
"model": "stability/sdxl",
"negative_prompt": "blurry, low quality",
"cfg_scale": 7.5,
"steps": 30,
"seed": 12345
}Stability AI with ControlNet
{
"prompt": "A futuristic city skyline",
"model": "stability/sdxl",
"control_image": "file_abc123",
"control_type": "depth"
}Flux with LoRA
{
"prompt": "Portrait photo in anime style",
"model": "flux/pro",
"lora": "anime-portrait-v1",
"cfg_scale": 3.5
}OpenAI GPT-Image-1
{
"prompt": "A logo for a tech company",
"model": "openai/gpt-image-1",
"background": "transparent",
"output_format": "png"
}Provider Capability Comparison
| Provider | Negative Prompt | Seed | CFG Scale | Steps | Transparency | ControlNet |
|---|---|---|---|---|---|---|
| OpenAI | - | - | - | - | Yes | - |
| Gemini | Yes | Yes | - | - | - | - |
| Stability | Yes | Yes | Yes | Yes | - | Yes |
| Flux | - | Yes | Yes | Yes | - | - |
| xAI | - | - | - | - | - | - |
CDN Storage
Generated images are automatically stored to PickLayer’s CDN:
file_id: PickLayer file ID for permanent storagefile_url: CDN URL for permanent access- Provider URLs may expire; use CDN URLs for long-term access
Billing
Charged by output megapixels (width x height x n). Guard reserves before provider call and finalizes with actuals.
Usage is recorded internally and available via /usage/summary, but it is not returned in image generation responses.
Unsupported Parameter Warnings
When sending parameters not supported by the target provider, they’re filtered and returned in metadata.warnings:
{
"metadata": {
"warnings": [
{ "field": "negative_prompt", "message": "not supported by OpenAI, ignored" }
]
}
}Last updated on