# Images

Image models use their own endpoints and per-request tariffs. A text model key and endpoint are not interchangeable with an image route.

Source: https://zrelay.net/docs/capabilities/images/

## Choose an image route

Select an enabled GPT image model and its pool from [model pricing](https://zrelay.net/prices.html#per-model). The catalog specifies the route and confirmed customer tariff.

Examples demonstrate request formats. Select an enabled model, endpoint and pool from the [live catalog](https://zrelay.net/prices.html#per-model) before sending a request. Availability and rates can change.

## Generate an image

```
curl https://api.zrelay.net/v1/images/generations \
  -H "Authorization: Bearer $ZRELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-image-2.5-sunburst","prompt":"A quiet mountain observatory at sunrise","n":1}'
```

## Read the result

Inspect the response’s `data` entries. When a base64 image is returned as `b64_json`, decode it to a file. Preserve the response format supported by the selected model rather than assuming every route returns a hosted URL.

## Image edits and aliases

The generation path also has the legacy `/v1/image/generations` alias. Use the canonical plural path for new integrations. Only use `/v1/images/edits` when the model and selected pool explicitly list an edit route; generation availability alone does not establish edit support.
