Skip to Content
Image Generation

Image Generation

Multi-provider image generation with an OpenAI-canonical API surface. All providers are normalized to the same request/response schema.

Supported Providers

ProviderModelsKey Features
OpenAIopenai/gpt-image-1, openai/dall-e-3Transparency, high quality
Geminigemini/imagen-3Negative prompts, seeds
Stability AIstability/sdxl, stability/sd3ControlNet, CFG scale, steps
Fluxflux/pro, flux/dev, flux/schnellLoRA support, seeds
xAIxai/auroraFast 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

ParameterTypeDefaultDescription
promptstringrequiredText prompt (max 32000 chars)
modelstringrequiredProvider-prefixed model ID
nnumber1Number of images (1-10)
sizestring”1024x1024”Output size
qualitystring”auto”low, medium, high, hd
response_formatstring”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

ProviderNegative PromptSeedCFG ScaleStepsTransparencyControlNet
OpenAI----Yes-
GeminiYesYes----
StabilityYesYesYesYes-Yes
Flux-YesYesYes--
xAI------

CDN Storage

Generated images are automatically stored to PickLayer’s CDN:

  • file_id: PickLayer file ID for permanent storage
  • file_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