> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inquantum.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Generation

> Generate images through one AI Gateway endpoint.

Use `POST /v1/images/generations` for image generation. Your base URL and authentication stay the same for every supported image model.

## Generate an Image

```typescript theme={null}
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.inquantum.ai/v1",
  apiKey: process.env.PLANCK_API_KEY,
});

const response = await client.images.generate({
  model: "gpt-image-1",
  prompt: "A clean product rendering of a small desk lamp",
  size: "1024x1024",
});

console.log(response.data[0]);
```

Copy the model ID from the model registry. The Planck endpoint and authentication never change. Supported sizes, quality settings, reference images, and other fields vary by model.

## Billing and Tracking

Image requests appear in **Requests** with the route, provider/model identity, duration, generated-image count, size or quality variants, billing data, and JSON request/response bodies.

See the [Image Generation API reference](/rest/ai-gateway/post-v1-images-generations) for request fields and a cURL example.
