What You Will Build
Text to Image
Generate images from descriptive text prompts
Model Selection
Choose from multiple AI image models
Style Control
Apply visual styles such as photorealistic, artistic, or cartoon
Job Polling
Monitor image generation and retrieve the result
Before You Begin
Make sure you have:- A Pictory API key
- Node.js or Python installed on your machine
- The required packages installed
Step-by-Step Guide
Step 1: Set Up Your Request
Prepare your API credentials and define the image prompt along with the desired model and style.Step 2: Submit the Image Generation Request
Send the request to the AI Studio image generation endpoint. On success, the API returns ajobId that you will use to poll for the result.
Step 3: Poll for the Result
Check the job status at regular intervals until the image is ready. The recommended polling interval is 10 to 30 seconds.Understanding the Parameters
Tips for Effective Prompts
- Be specific and descriptive. Include details about the subject, setting, lighting, and composition.
- Specify the camera angle. Use terms such as “wide shot”, “close-up”, or “aerial view” to control framing.
- Pair with a style. Combine your prompt with the
styleparameter for more consistent results. For example, use"photorealistic"for lifelike images or"artistic"for a painterly look. - Keep prompts focused. A single clear subject with a well-defined setting produces better results than a prompt that tries to describe too many elements at once.
Next Steps
- Generate Image from Reference Image to use an existing image as a visual guide
- Generate Image API Reference for the complete parameter documentation
