---
title: "Generate photo"
method: POST
path: "/v0/assistant/photo/generate"
tags: ["Media"]
---

# Generate photo

`POST /v0/assistant/photo/generate`

Generates a new photo using a text prompt and returns the image URL. This action costs credits.

## Request body

- PhotoGenerateRequest
  - `prompt` string, required — Text prompt for image generation.
  - `aspect_ratio` string, nullable — Aspect ratio of the generated image.
  - `output_format` string, nullable — Format of the output image.
  - `output_quality` integer, nullable — Quality of the output image (1-100).
  - `safety_tolerance` number, nullable — Safety tolerance for generation.
  - `prompt_upsampling` boolean, nullable — Whether to use prompt upsampling.

## Response `201`

Successful Response

- InfoResponseStr
  - `info` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/unify/apis/unifyai-http-api-reference.md) · [All operations](https://skmtc.net/unify/apis/unifyai-http-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unify/unifyai-http-api-reference/versions/900377f918b6/schema)
