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

# Create Image

`POST /images/generations`

## Request

- Base URL: `https://platform.qubrid.com/v1`
- URL: `https://platform.qubrid.com/v1/images/generations`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/qubrid/apis/qubrid-image-api/docs/images/generations/post.ts> (a function with typed inputs; its response is checked against the schema)

Generate an image with minimal or advanced parameters.

## Request body

- ImageGenerationRequest
  - `model` string, required: The image generation model to use.
  - `prompt` string, required: The text prompt describing the image to generate.
  - `enhance_prompt` boolean: Whether to automatically enhance the prompt before generation.
  - `go_fast` boolean: Whether to prioritize faster generation.
  - `guidance` number: Guidance scale controlling prompt adherence.
  - `negative_prompt` string: Elements you want to avoid in the generated image.
  - `num_inference_steps` integer: Number of denoising steps used during generation.
  - `seed` integer, nullable: Optional random seed for reproducible results.
  - `disable_safety_checker` boolean: Disable the safety checker for generation.
  - `image` string, nullable: Optional input image for image-to-image generation or editing.
  - `strength` number: Strength of transformation when using an input image.
  - `lora_weights` string, nullable: Optional LoRA weights identifier.
  - `lora_scale` number: Scale factor for the primary LoRA weights.
  - `extra_lora_weights` string[]: Additional LoRA weights to apply.
  - `extra_lora_scale` number[]: Scale values for additional LoRA weights.
  - `aspect_ratio` string: Aspect ratio for the generated image.
  - `image_size` string: Controls image resolution or optimization mode.
  - `output_format` string: Desired output image format.
  - `output_quality` integer: Compression quality for the output image.

## Response `200`

Image generated successfully

- ImageGenerationResponse
  - `created` integer: Unix timestamp when the image was generated.
  - `data` object[]
    - `url` string, nullable: URL of the generated image.
    - `b64_json` string, nullable: Base64-encoded image output when requested.

## Other responses

- `400`: Bad request - missing required fields, invalid values, or malformed input
- `401`: Unauthorized - missing or invalid API key
- `402`: Insufficient credits to process the request
- `403`: Forbidden - authenticated but not allowed to access this model or resource
- `404`: Model not found - the specified image model does not exist or is not available
- `429`: Rate limit exceeded
- `500`: Internal server error
- `502`: Bad gateway - upstream image provider is unavailable or returned an error
- `504`: Gateway timeout - upstream image provider took too long to respond

## Changes

- **2026-04-13** `1b2db4255b7c`: 7 breaking, 6 warning, 42 info
  - the response property `data/items/url` became nullable for the status `200`
  - the `error` response's property type changed from `string` to `object` for status `400`
  - the `error` response's property type changed from `string` to `object` for status `401`
  - the `error` response's property type changed from `string` to `object` for status `403`
  - …51 more

[Operation history](https://skmtc.dev/qubrid/apis/qubrid-image-api/changes/images/generations/post.md)

---

[API](https://skmtc.dev/qubrid/apis/qubrid-image-api.md) - [All operations](https://skmtc.dev/qubrid/apis/qubrid-image-api/llms.txt) - [OpenAPI document](https://skmtc.dev/qubrid/apis/qubrid-image-api/revisions/1b2db4255b7c?raw)
