---
title: "Generate Image"
method: POST
path: "/v1/images/generations"
tags: ["images"]
---

# Generate Image

`POST /v1/images/generations`

## Request

- Base URL: `https://api.oxlo.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.oxlo.ai/v1/images/generations`
- Auth: HTTP bearer

Generate images using SDXL, Flux models, or Azure Foundry.
Checks model mapping to determine routing (Azure vs local workers).

## Request body

- ImageGenerationRequest: OpenAI-compatible image generation request.
  - `prompt` string, required: Text description of image to generate
  - `model` string: Model to use
  - `n` integer: Number of images
  - `size` string: Image size ('0x0' = model native resolution)
  - `quality` string: Image quality
  - `negative_prompt` string: What to avoid
  - `num_inference_steps` integer, nullable: Denoising steps
  - `guidance_scale` number, nullable: CFG scale
  - `seed` integer, nullable: Random seed

## Response `200`

Successful Response

- ImageGenerationResponse
  - `created` integer, required
  - `data` ImageData[], required
    - `b64_json` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/oxlo/apis/oxlo-backend.md) - [All operations](https://skmtc.dev/oxlo/apis/oxlo-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/oxlo/apis/oxlo-backend/revisions/bc2ecdc94f31?raw)
