Skip to main content
Generate an image from a prompt. To edit an image, add input.images using uploaded files or existing asset references. Open GPT Image 2 in the playground to explore this model’s inputs. The API tab generates request code from the same model schema. To reproduce the example below, enter its inputs before running.

Submit a job

Set HEDRA_API_KEY as shown in the quickstart. This example submits to gpt-image-2; its payload is not interchangeable with another model’s schema.
The 202 response contains a job_id. Follow the submit, wait, and download workflow, or use webhooks. Check output status before retrieving URLs. To estimate this request first, send its body to POST /v3/models/gpt-image-2/estimate.

Inputs and limits

Inspect GET /v3/models/gpt-image-2/openapi.json for accepted fields, defaults, and constraints. See Files and outputs for media references and Quality levels for models that expose a tier selector.