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
- Base URLhttps://genai-api.picsart.io/v1
- URLhttps://genai-api.picsart.io/v1/text2image
- AuthAPI key in header X-Picsart-API-Key
Request body
The prompt.
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).
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).
The number of images to generate.
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.
Example request
{
"width": 512,
"height": 512
}Response
Accepted.
Changes
No recorded changes to this operation across all 1 revision of this API.