---
title: "Text To Image"
method: POST
path: "/api/v1/aiPhotoshoot/text-to-image"
tags: ["aiPhotoshoot"]
---

# Text To Image

`POST /api/v1/aiPhotoshoot/text-to-image`

Generate image from text prompt using AI models (async).

Args:
    request: TextToImageRequestDTO with prompt, style, and model parameters
    background_tasks: FastAPI background tasks
    db: Database session
    user: User object

Returns:
    dict: Contains task ID for polling

## Request body

- TextToImageRequestDTO
  - `prompt` string, required
  - `style` string, nullable
  - `image_model` string, nullable
  - `domain_id` string, required
  - `aspect_ratio` string, nullable
  - `steps` integer, nullable
  - `seed` integer, nullable
  - `width` integer, nullable
  - `height` integer, nullable
  - `numSamples` integer, nullable
  - `ignore_credits` boolean, nullable
  - `ugc_character` UgcCharacterPayload — Optional UGC character from frontend (id, name, imageUrl).
    - `id` string, required
    - `name` string, required
    - `imageUrl` string, required
  - `product_image` string, nullable
  - `reference_image_url` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/brandbooster/apis/fastapi.md) · [All operations](https://skmtc.dev/brandbooster/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/brandbooster/fastapi/revisions/a9374f6fe96c/schema)
