---
title: "Create an image"
method: POST
path: "/images/generations"
tags: ["Images"]
---

# Create an image

`POST /images/generations`

Supported across providers: OpenAI (`gpt-image-1`, `gpt-image-1-mini`,
`gpt-image-1.5`), Google Imagen (`imagen-4.0-{fast,standard,ultra}-generate-001`),
and xAI Grok (`grok-imagine-image`, `grok-imagine-image-pro`).

## Request body

- ImageGenerationRequest
  - `model` string, required — Image-generation model. OpenAI / Google Imagen / xAI Grok families are all served on this endpoint.
  - `prompt` string, required
  - `n` integer
  - `size` string — OpenAI-style size like `1024x1024`. For models that use aspect-ratio instead (Gemini Imagen), OrcaRouter maps `1024x1024` → `1:1`, `1792x1024` → `16:9`, etc.
  - `quality` 'auto' | 'standard' | 'hd' | 'high' | 'medium' | 'low'
  - `style` 'vivid' | 'natural'
  - `response_format` 'url' | 'b64_json'
  - `user` string

## Response `200`

OK

- ImageResponse
  - `created` integer
  - `data` object[]
    - `url` string — URL to the generated image (if response_format=url)
    - `b64_json` string — base64 image (if response_format=b64_json)
    - `revised_prompt` string

---

[API](https://skmtc.dev/orcarouter/apis/orcarouter-api.md) · [All operations](https://skmtc.dev/orcarouter/apis/orcarouter-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/orcarouter/orcarouter-api/revisions/9c5cc5d00311/schema)
