> For the complete documentation index, see [llms.txt](https://bountyv.gitbook.io/vdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bountyv.gitbook.io/vdocs/image-api/images-overview.md).

# Overview

Text-to-image generation, instruction-based editing, image-to-image/inpaint, and image-to-video animation across five self-hosted engines (Z-Image, SDXL, SD1.5, Qwen-Image, FLUX.2) plus SFW-only external engines (Seedream, Nano Banana Pro, ChatGPT Image).

## Endpoints

| Endpoint                                                   | Method                          | Description                                                                                                                         |
| ---------------------------------------------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| [Text-to-Image](/vdocs/image-api/images-txt2img.md)        | `POST /api/v1/images/txt2img`   | Generate an image from a text prompt across five self-hosted architectures plus three SFW external engines                          |
| [Image Edit](/vdocs/image-api/images-edit.md)              | `POST /api/v1/images/edit`      | Instruction edits — undress, add-cum, anime→real, outfit swap, and more                                                             |
| [Image-to-Image / Inpaint](/vdocs/image-api/images-i2i.md) | `POST /api/v1/images/i2i`       | Re-render an image at a chosen denoise strength, optionally masked. Composes from up to 16 reference images on the external engines |
| [Image-to-Video](/vdocs/image-api/images-img2video.md)     | `POST /api/v1/images/img2video` | Animate a still with self-hosted Wan 2.2 (async submit + poll)                                                                      |

All endpoints require the header:

```
Authorization: Bearer sk_live_...
```

See [Authentication](/vdocs/authentication.md) for details.

## Access required

Endpoints here are gated by one of two entitlements:

* **`image`** — the SFW lane: Text-to-Image called with `"mode": "sfw"`.
* **`nsfw`** — the adult lanes: Text-to-Image called with `"mode": "nsfw"`, plus Image Edit, Image-to-Image / Inpaint, and Image-to-Video (all three are `nsfw`-only — there is no SFW mode for them).

If you can read this page but get a `403` `product_disabled`-style error when you call an endpoint, contact your account manager to enable that product on your account.

## Quick start

```bash
curl -X POST https://substance-api.com/api/v1/images/txt2img \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a woman in a sunlit kitchen", "engine": "zimage", "mode": "sfw"}'
```

Each image endpoint returns its result on success (or a job ID to poll, for Image-to-Video) and charges your pooled credits on completion. Failed generations are refunded automatically — see [Errors](/vdocs/errors.md).

## Safety

Every prompt passes an age-safety blocklist and is augmented with adult-positive / minor-negative tokens, and outputs are additionally screened after generation. Prompts implying minors are rejected with `400` on every endpoint in this group.

## Pricing

Billed per call — see [Credits & pricing](/vdocs/account/credits.md) for current rates. Per-call pricing varies by endpoint and, on Text-to-Image and Image-to-Image, by the selected `engine`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bountyv.gitbook.io/vdocs/image-api/images-overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
