Overview

The Images API provides a wire-compatible surface for image generation, editing, and variations. Requests are authenticated with a virtual key and routed to the configured image provider. When no provider is configured, the gateway returns placeholder SVGs for development and testing.

Base URL

For local development:

Endpoints

Authentication

All requests require a virtual key in the Authorization header. See Authentication.

Generate an image

Request body

Valid sizes

Example request

Example response

Edit an image

Provide a base64-encoded source image and a mask (optional). The gateway returns the edited result.

Request body

Example request

Create image variations

Generate variations of a base64-encoded source image.

Request body

Example request

Response format

All image endpoints return:
When response_format is b64_json, the b64_json field contains the base64-encoded image bytes and url is omitted.

Error codes