---
title: "Creative Generator"
method: POST
path: "/creative-generator"
---

# Creative Generator

`POST /creative-generator`

## Request body

- CreativeGeneratorRequest — An API request to the Creative Generator service.
  - `height` integer, nullable — Integer representing the height of image to generate. Supported resolutions (w,h): SDXL={(1536, 640), (768, 1344), (832, 1216), (1344, 768), (1152, 896), (640, 1536), (1216, 832), (896, 1152), (1024, 1024)}
  - `loras` object, nullable — A dictionary of LoRAs to apply. LoRAs as keys and their weights (float) as values.
  - `negative_prompt` string, nullable — Text describing image traits to avoid during generation.
  - `num_images` integer — Integer representing how many output images to generate with this prompt.
  - `product_image_b64` string, required — The original product image to place in the creative. Image should feature a plain background and should be larger than target_product_size_px.
  - `prompt` string, required — Text describing the image content to generate.
  - `rotate_deg` number — Number of degrees to rotate product_image_b64.
  - `seed` union — Integer number or list of integers representing the seeds of random generators. Fixing random seed is useful when attempting to generate a specific image. Must be greater than 0 and less than 2^32. If None, a random seed is chosen. The value used for each image is returned in the response.
    - integer
    - integer[]
  - `style_preset` 'base' | 'cinematic' | 'photographic' | 'Advertising' — The supported SDXL styles.
  - `target_product_height_px` integer, required — Target product height, in pixels. The product width will be scaled so the target product dimensions match the original aspect ratio of product_image_b64.
  - `width` integer, nullable — Integer representing the width of image to generate. Supported resolutions (w,h): SDXL={(1536, 640), (768, 1344), (832, 1216), (1344, 768), (1152, 896), (640, 1536), (1216, 832), (896, 1152), (1024, 1024)}

## Response `200`

Successful Response

- CreativeGeneratorResponse
  - `images` GeneratedImage[], required
    - `image_b64` string, required — Base64-encoded PNG image.
    - `seed` integer, required — Seed used to generate this image

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/octoml/apis/media-utilities-api.md) · [All operations](https://skmtc.net/octoml/apis/media-utilities-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/octoml/media-utilities-api/versions/24ca8e2b43f8/schema)
