---
title: "Create an image from a text prompt"
method: POST
path: "/visuals/create_image"
tags: ["visuals"]
---

# Create an image from a text prompt

`POST /visuals/create_image`

Create an image from a text prompt

## Headers

- `webapp-authorization` string, nullable

## Request body

- VisualsPayload
  - `prompt` string, required
  - `seed` integer
  - `width` integer
  - `height` integer
  - `allow_nsfw` boolean, required

## Response `200`

Image file in PNG format

## Other responses

- `401` — Insufficient credits
- `422` — Validation Error
- `500` — Failed to apply effect. Your credits were refunded.

## Changes

- **2024-06-18** `273a11772d49` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/alphakek-ai/apis/fastapi/changes/visuals/create_image/post.md)

---

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