Picsart Generative AI-Hub icon

Picsart Generative AI-Hub

Generate and edit media with Picsart GenAI API: images, stickers, sound, video, and prompt-based image editing.

Generate Images from Prompt

AI-generated

Summary

Generates one or more images from a text prompt using a selected AI model.

Inputs

  • prompt (required) — Text prompt describing the desired image.
  • width — Width of the generated image in pixels (1–1024). Defaults to 1024.
  • height — Height of the generated image in pixels (1–1024). Defaults to 1024.
  • count — Number of images to generate (1–10). Defaults to 1.
  • model — AI model to use. Defaults to 'urn:air:sdxl:model:fluxai:flux_kontext_max@1'.

Output shape

A list of items, each containing a binary image and metadata (prompt, dimensions, model, transaction ID, etc.).

The operation polls the API for up to 600 attempts (approximately 10 minutes) until the images are generated. Returns one output item per generated image.

Examples

Example 1: Generate a single 1024x1024 image using the default Flux model.

Prompt: 'A futuristic city skyline at sunset', Count: 1

Example 2: Generate a 2x2 grid of images using the DALL-E 3 model.

Prompt: 'Abstract geometric shapes', Width: 1024, Height: 1024, Count: 2, Model: 'urn:air:openai:model:openai:dall-e-3@1'

Links

Discussion