POST /v3/images is a deterministic, provider-agnostic image endpoint. You pass a model and a prompt; Opper runs the job and returns the image inline. The same call works across every image model (OpenAI GPT Image, Google Imagen, xAI, Pruna, and more) — model and prompt are owned by Opper, a small set of high-level parameters is normalized for you, and anything model-specific goes in parameters.
Image generation is synchronous: the response comes back on the same request with the image as base64 (and, by default, a stored
file_id + presigned url). For looking at images instead of making them, see Vision & PDFs.Generate an image
images/generations shape, plus gateway extras:
file_id and a presigned url alongside the base64. Pass "store": false to skip persistence and get base64 only, or "response_format": "url" to omit the base64 and return only the stored URL.
Parameters
model and prompt are required. The rest are optional; the high-level ones are normalized across providers, and parameters is forwarded verbatim to the provider, which validates it.
| Field | What it does |
|---|---|
n | Number of images to generate (default 1, max 4). |
size | Pixel size WxH for pixel-sized models (GPT Image, DALL·E). Validated against the model’s sizes. |
aspect_ratio | 16:9, 1:1, etc. for aspect-ratio models (Imagen, Pruna, xAI). Bridged to/from size per model. |
quality | Normalized tier: low | medium | high (default medium), plus 4k where a model declares it. |
style | e.g. vivid | natural (DALL·E 3). |
response_format | b64_json (default) or url (returns the stored URL only). |
store | Persist the output to storage and return a file_id + url. Defaults to true; respects retention rules. |
parameters | Opaque per-provider passthrough for anything not normalized above. |
Edit and image-to-image
Pass a source image alongside the prompt. Each input accepts an http(s) URL, a data-URI, or afile_id from a previous generation or upload. Models that only do text-to-image reject these with a clear 400.
| Field | Use for |
|---|---|
image | The source image to edit or transform. |
mask | An inpaint mask (image/*) marking the region to change. |
reference_images | Style or subject reference images. |
Discover models
GET /v3/images/models reports the models you can use and their capabilities (sizes, aspect ratios, whether they support edit / image-to-image):
What’s next
Vision & PDFs
Send images into a model instead of generating them.
Video
Turn a generated image into video.
Models
Which models generate images, and at what sizes.
Control Plane
Govern providers, regions, and spend on every generation.