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.

Body Params
string
required

The 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'.

number
64 to 1024
Defaults to 1024

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).

number
64 to 1024
Defaults to 1024

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).

number
1 to 10
Defaults to 2

The number of images to generate.

string | null
enum
Defaults to urn:air:sdxl:model:fluxai:flux_kontext_max@1

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.

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json