> ## Documentation Index
> Fetch the complete documentation index at: https://www.hedra.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate an image

> Run image inference on the Hedra v3 API with a model-specific request and the shared asynchronous job lifecycle.

Generate an image from a prompt. To edit an image, add `input.images` using uploaded files or existing asset references.

## Submit a job

Set `HEDRA_API_KEY` as shown in the [quickstart](/docs/pages/developer/v3/quickstart).
This example submits to `gpt-image-2`; its payload is not interchangeable with
another model's schema.

```bash theme={null}
curl --fail-with-body -X POST https://api.hedra.com/v3/models/gpt-image-2 \
  -H "Authorization: Key $HEDRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"prompt":"An industrial inspection camera on a workbench","aspect_ratio":"1:1","resolution":"1K","quality":"medium","output_format":"png"}}'
```

The `202` response contains a `job_id`. Follow the
[submit, wait, and download workflow](/docs/pages/developer/v3/quickstart#submit-wait-and-download),
or use [webhooks](/docs/pages/developer/v3/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](/docs/pages/developer/v3/files) for media
references and [Quality levels](/docs/pages/developer/v3/quality-levels) for models
that expose a tier selector.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.