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

# Generate

`POST /v1/images/generations`

## Query parameters

- `ai_project_id` string, nullable — current project ID

## Request body

- CommonImageGenerationRequest
  - `model` string, required — ID of the model to use.
  - `loras` LoRA[], nullable — List of publicly accessible LoRAs compatible with the selected model
    - `url` string, required — LoRA .safetensors URL
    - `scale` number, required — Scale of LoRA weights
  - `prompt` string, required — A text description of the desired image(s).
  - `width` integer — The width of the generated image(s) in pixels.
  - `height` integer — The height of the generated image(s) in pixels.
  - `num_inference_steps` integer, nullable — Number of denoising steps in the diffusion process. Higher values generally result in higher quality images but take longer to generate.
  - `seed` integer — Random seed for image generation. Use -1 for a random seed.
  - `guidance_scale` number, nullable — Guidance scale for the model. Higher values make the image adhere more closely to the prompt.
  - `negative_prompt` string — A text description of the non-desired image(s).
  - `response_extension` 'webp' | 'jpg' | 'png'
  - `response_format` 'b64_json' | 'url'

## Response `200`

Successful Response

- ImageGenerationResponse
  - `data` ImageObject[], required
    - `b64_json` string, nullable
    - `url` string, nullable
  - `id` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/nebius/apis/nebius-openai-compatible-inference-api.md) · [All operations](https://skmtc.net/nebius/apis/nebius-openai-compatible-inference-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nebius/nebius-openai-compatible-inference-api/versions/0fb323abba3c/schema)
