---
title: "Create image"
method: POST
path: "/images"
---

# Create image

`POST /images`

## Request

- Base URL: `https://api.shortgenius.com/v1`
- URL: `https://api.shortgenius.com/v1/images`
- Auth: HTTP bearer

Create an image from a prompt.

## Request body

- object: Parameters required to generate an image.
  - `prompt` string, required: The prompt to generate the image from.
  - `aspect_ratio` '9:16' | '16:9' | '1:1', required: The aspect ratio of the image.
  - `image_style_id` string, uuid, nullable: The ID of the image style to use. Use the [List image styles](#tag/images/GET/presets/{type}) endpoint to get a list of available image styles.
  - `scene_id` string, uuid, nullable: If you want to add the generated image to a video scene you can specify it here.
  - `wait_for_generation` boolean: If false, this endpoint immediately returns the incomplete image record, and you can poll the [Get image](#tag/images/GET/media/get/{id}) endpoint until the task completes. If true, this endpoint waits until the image generation completes, then returns the complete image record. Defaults to false.
  - `model` string
  - `quality` 'low' | 'medium' | 'high'
  - `source_media_id` string, uuid, nullable: The ID of the media to use as a source for the image.
  - `associated_product_id` string, nullable: The ID of the product to associate this image with.

## Response `200`

Successful response

- Image
  - `id` string, uuid, required
  - `url` string, nullable, required
  - `associatedProductId` string, nullable
  - `type` 'GeneratedImage' | 'GeneratedImagePreset', required
  - `state` 'pending' | 'generating' | 'completed' | 'error' | 'request_smart_motion' | 'placeholder', required
  - `created_at` string, required: Date and time (ISO 8601) when the media was created.
  - `updated_at` string, nullable: Date and time (ISO 8601) when the media was last updated.
  - `prompt` string, required
  - `is_nsfw` boolean, required
  - `aspect_ratio` '9:16' | '16:9' | '1:1', required: Aspect ratio of the generated image.
  - `image_style_id` string, uuid, nullable

## Other responses

- `400`: Invalid request
- `401`: Unauthorized request

---

[API](https://skmtc.dev/shortgenius/apis/shortgenius-api.md) · [All operations](https://skmtc.dev/shortgenius/apis/shortgenius-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shortgenius/apis/shortgenius-api/revisions/532abda8ff32?raw)
