SilkDock
APIImage Generation

GPT Image 2

Configurable fields and supported values for gpt-image-2.

Model ID

gpt-image-2

Capabilities

CapabilitySupported value
Text-to-imageYes
Image-to-imageYes
Multi-image referenceNo
Aspect ratio (aspect_ratio)1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16
resolutionstandard, 1440p, 4k
qualitylow, medium, high
Reference fieldimage

Set top-level resolution when an explicit resolution is required.

Configurable fields

FieldRequiredNotes
modelYesMust be gpt-image-2.
promptYesText description or editing instruction.
aspect_ratioNoPreferred aspect-ratio field; select one supported value listed above.
sizeNoCompatibility alias for aspect_ratio. New integrations should use aspect_ratio.
qualityNoOnly use the quality values listed above.
nNoDefaults to 1; account/model limit comes from the model list API.
imageNoSingle reference image URL for image-to-image generation.
resolutionNostandard, 1440p, or 4k.
response_formatNourl (default) or b64_json.
output_formatNopng, jpeg, or webp.
wait_for_completionNoDefaults to false, which returns an asynchronous task ID. Set to true to wait in the create request.
polling_timeoutNoPolling timeout used only when wait_for_completion is true.

Example

{
  "model": "gpt-image-2",
  "prompt": "Create a cinematic editorial image",
  "aspect_ratio": "16:9",
  "quality": "high",
  "resolution": "4k"
}

Last updated on

On this page