---
title: "Create image"
method: POST
path: "/v1/images/generations"
tags: ["Images"]
---

# Create image

`POST /v1/images/generations`

## Request

- Base URL: `https://api.neosantara.xyz`
- URL: `https://api.neosantara.xyz/v1/images/generations`
- Auth: HTTP bearer

Creates an image given a prompt.

## Request body

- object
  - `model` string, required
  - `prompt` string, required
  - `n` integer
  - `size` string
  - `response_format` 'url' | 'b64_json'
  - `steps` integer
  - `user` string
  - `image` string
  - `mask_image` string
  - `mask_prompt` string
  - `outpainting_mode` 'DEFAULT' | 'PRECISE'
  - `quality` string
  - `style` string
  - `strength` number

## Response `200`

Successful response

- object
  - `created` number, required
  - `data` object[], required
    - `url` string
    - `b64_json` string
    - `revised_prompt` string

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/neosantara/apis/neosantara-ai-api.md) - [All operations](https://skmtc.dev/neosantara/apis/neosantara-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/neosantara/apis/neosantara-ai-api/revisions/f87af696a63e?raw)
