Skip to main content
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/json

Request 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, futuristic
string
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 successfully
object
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

Replace YOUR_API_KEY with your actual API key from the API Access page.

Next Steps

After receiving the jobId, 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.