---
title: "Image Generate"
method: POST
path: "/v1/image/generate"
tags: ["Image"]
---

# Image Generate

`POST /v1/image/generate`

Specifies: 
- text prompt for image generation (`input`)
- image generation options (`options`)
- where results will be stored (`output`)

## Request body

- GenerateRequest
  - `input` string, required — Text prompt that will be used to generate image(s). Should be from 3 to 1024 characters.
  - `options` ImageGenerateOptions
    - `number_of_images` integer — Number of images to generate. By default 4 images will be generated.
    - `guidance_scale` number — Guidance scale is used to make the generation better match the prompt potentially at the cost of image quality or diversity. Values between 5 and 7 are usually good choices, but sometimes more control is achieved with values such as 12. By default the pipeline uses a guidance scale of 5.
  - `output` string, uri — URL of the output folder. If `output` is not defined, we store the output image on our bucket and return the temporary URL, in this case images are stored for one day.

## Response `200`

Successful Response

- ResponseGenerateResponse — Wrapper for responses
  - `data` GenerateResponse
    - `input` GeneratePipelineInputObject, required
      - `text` string, required — Text prompt for image generation
    - `output` PipelineOutputObject[], required
      - `ext` string, required — File extension. Can have values: `"jpg"`, `"png"`, `"avif"`
      - `mps` number, required — Megapixel count
      - `mime` string, required — MIME type (also known as ‘media type’)
      - `format` string, required — File format. Can have values: `"jpeg"`, `"png"`, `"avif"`
      - `width` integer, required — Image width in pixels
      - `height` integer, required — Image height in pixels
      - `tmp_url` string — Temporal URL of a processed image
      - `object_key` string — Path to a processed image in a bucket
      - `object_bucket` string — Bucket name
      - `object_uri` string — URI of a processed image in a bucket
      - `claid_storage_uri` string — URI of a processed image in a storage
    - `profiling` object

## Other responses

- `401` — Authorization is required.
- `402` — No API calls left.
- `403` — Not enough permissions.
- `422` — Unprocessable Entity.
- `429` — Too many requests.

---

[API](https://skmtc.net/claid/apis/claid-rest-api.md) · [All operations](https://skmtc.net/claid/apis/claid-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/claid/claid-rest-api/revisions/410fc0db9665/schema)
