Capabilities
Markdown ↗

Images

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

Choose an image route

Select an enabled GPT image model and its pool from model pricing. The catalog specifies the route and confirmed customer tariff.

Generate an image

bash
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.

Questions about your integration? support@zrelay.net