---
title: "Text2Image"
method: POST
path: "/text2image"
tags: ["Text2Image"]
---

# Text2Image

`POST /text2image`

The *Text2Image* service helps generate an image based on the text introduced as input by the user.
The result images can be as big as 1024x1024 pixels.

## Request body

- object
  - `prompt` string, required — The prompt.
  - `negative_prompt` string — Deprecated. The negative prompt (don’t generate this type of images). Don't use the nagitve keywords such as 'no', e.g. don't use 'no distorted faces', use 'distorted faces'.
  - `width` number — Desired width used to determine the aspect ratio and resolution tier. The actual output width is determined by the AI provider based on the closest matching supported aspect ratio. Supported ratios vary by model (common: 1:1, 4:3, 3:4, 16:9, 9:16, 21:9).
  - `height` number — Desired height used to determine the aspect ratio and resolution tier. The actual output height is determined by the AI provider based on the closest matching supported aspect ratio. Supported ratios vary by model (common: 1:1, 4:3, 3:4, 16:9, 9:16, 21:9).
  - `count` number — The number of images to generate.
  - `model` 'urn:air:sdxl:model:fluxai:flux_kontext_max@1' | 'urn:air:sdxl:model:fluxai:flux_kontext_pro@1' | 'urn:air:fluxai:model:fluxai:flux-2-flex@1' | 'urn:air:fluxai:model:fluxai:flux-2-pro@1' | 'urn:air:fluxai:model:fluxai:flux-2-max@1' | 'urn:air:google:model:google:gemini-2.5-flash-image@1' | 'urn:air:google:model:google:gemini-3-pro-image-preview@1' | 'urn:air:google:model:google:gemini-3.1-flash-image-preview@1' | 'urn:air:google:model:google:gemini-3.1-pro-preview@1' | 'urn:air:hunyuan:model:hunyuan:hunyuan-image@3' | 'urn:air:ideogram:model:ideogram:ideogram@1' | 'urn:air:ideogram:model:ideogram:ideogram@2' | 'urn:air:ideogram:model:ideogram:ideogram-turbo@1' | 'urn:air:ideogram:model:ideogram:ideogram-turbo@2' | 'urn:air:ideogram:model:ideogram:ideogram-2a@1' | 'urn:air:ideogram:model:ideogram:ideogram-2a-turbo@1' | 'urn:air:ideogram:model:ideogram:ideogram@3' | 'urn:air:google:model:google:imagen-4.0-generate-001@1' | 'urn:air:google:model:google:imagen-4.0-ultra-generate-001@1' | 'urn:air:google:model:google:imagen-4.0-fast-generate-001@1' | 'urn:air:openai:model:openai:dall-e-3@1' | 'urn:air:openai:model:openai:gpt-image-1@1' | 'urn:air:openai:model:openai:gpt-image-1.5@1' | 'urn:air:qwen:model:qwen:qwen-image-2.5@1' | 'urn:air:reve:model:reve:reve@1' | 'urn:air:runway:model:runway:gen4-image-ref@1' | 'urn:air:seedream:model:seedream:seedream@4.0' | 'urn:air:seedream:model:seedream:seedream@4.5' | 'urn:air:seedream:model:seedream:seedream@5.0-lite', nullable — Optionally choose a specific AI model to use for this request. If not specified, a default model will be applied. Please note that the default model may change over time as Picsart continues to improve performance and accuracy. Any change to the default will be made only after thorough testing and validation to ensure it delivers better results. If you require consistent behavior or wish to evaluate different models on your own, we recommend explicitly setting this parameter.

## Response `202`

Accepted.

- object
  - `status` 'success' | 'error' | 'processing'
  - `inference_id` string, nullable

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `413` — Request Entity Too Large
- `415` — Unsupported Media Type
- `429` — Too Many Requests
- `431` — Request Header Fields Too Large
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/picsart/apis/picsart-programmable-image-apis.md) · [All operations](https://skmtc.net/picsart/apis/picsart-programmable-image-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/picsart/picsart-programmable-image-apis/versions/726b2a637ae8/schema)
