Generate Image
AI Studio
Generate Image
Generate an AI image from a text prompt using a selection of AI image models
POST
Generate Image
Overview
The Generate Image API creates an AI-generated image based on a text prompt. You can choose from multiple AI image models, specify an aspect ratio, apply a visual style, and optionally provide a reference image to guide the output. The API returns a job ID that you can use to poll for the result once the image generation is complete.A valid API key is required to use this endpoint. Obtain your API key from the API Access page in your Pictory dashboard.
API Endpoint
Request Headers
string
required
API key for authentication (starts with
pictai_)string
required
Must be
application/jsonRequest Body
string
required
A text description of the image you want to generate. The prompt must be between 5 and 5,000 characters.Example:
"A serene mountain landscape at sunset with a reflective lake in the foreground"string
The AI model to use for image generation. Each model produces different visual styles and quality levels. Defaults to
seedream3.0 if not specified.Supported models: seedream3.0, flux-schnell, nanobanana, nanobanana-proModel Capabilities and Pricing:string
The aspect ratio for the generated image. The available values depend on the selected model. Defaults to the first supported aspect ratio of the chosen model. Refer to the model table above for supported aspect ratios per model.
string
An optional visual style to apply to the generated image.Supported values:
photorealistic, artistic, cartoon, minimalist, vintage, futuristicstring
An optional URL of a reference image to guide the generation. The URL must be a valid, publicly accessible URI.
string
An optional webhook URL that will receive a notification when the image generation job completes. The URL must be a valid URI.
Response
Success Response (200)
boolean
true when the job has been created successfullyobject
string
The unique identifier (UUID) of the image generation job. Use this ID to poll for the result using the Get Image Generation Job endpoint.
Response Examples
Status Codes
Code Examples
Next Steps
After receiving thejobId, poll for the image generation result using the Get Image Generation Job endpoint. Use a polling interval of 10–30 seconds to check the job status.