---
title: "Generate Images"
method: POST
path: "/images/generations"
---

# Generate Images

`POST /images/generations`

Generate images from text prompts

## Request body

- ImageGenerationRequest
  - `model` string, required
  - `prompt` string, required — Text description of the desired image
  - `n` integer — Number of images to generate
  - `quality` 'standard' | 'hd'
  - `size` '256x256' | '512x512' | '1024x1024' | '1792x1024' | '1024x1792'
  - `response_format` 'url' | 'b64_json'
  - `public` boolean — Whether to make the image publicly accessible

## Response `200`

Success

- ImageResponse
  - `created` integer, required
  - `data` ImageData[], required
    - `url` string, uri
    - `b64_json` string
    - `revised_prompt` string

---

[API](https://skmtc.dev/electronhub/apis/electron-hub-api.md) · [All operations](https://skmtc.dev/electronhub/apis/electron-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/electronhub/electron-hub-api/revisions/727f9c51555b/schema)
