P-Image
P-Image is Pruna’s performance text-to-image generation model, delivering state-of-the-art AI images in less than one second.
Designed for professional results, it offers a rare combination of speed, affordability, visual quality, diversity, exact prompt adherence, and exceptional text rendering, making it the go-to choice when you need fast, beautiful, and reliable image generation.
Tip
Test it now in the P-Image Playground.
Prompt formula
Primary Subject - What/who is the focus? - Be specific: “young woman with short black hair” not “person” - Include details: age, appearance, clothing, expression
Subject Behavior - What are they doing? - Use descriptive actions: “reading”, “walking”, “smiling”
Visual Style - Artistic medium/aesthetic - Examples: “photorealistic”, “oil painting”, “anime style”, “watercolor”
Environmental Context - Setting & atmosphere - Location: “living room”, “mountain peak”, “urban street” - Lighting: “golden hour”, “soft studio lighting”, “dramatic shadows” - Mood: “peaceful”, “energetic”, “mysterious”
Tip
For full prompting guidelines, see the Image Generation guide.
Key Features
P-Image delivers exceptional performance for text-to-image generation with the following key capabilities:
- Cost, Speed and Quality
Just $0.005 and 1 second per image. P-Image provides exceptional value with ultra-fast generation times while maintaining high-quality output.
- Adherence
Exact prompt adherence for precise results. The model faithfully follows your prompts to deliver accurate and consistent image generation.
- Text Rendering
Highly controlled text generation. P-Image excels at rendering text within images with precision and control.
- Diversity
The model can generate images with a high degree of diversity.
"Full-body fashion shot of a model wearing an oversized beige hoodie and cargo pants, leaning against a graffiti-covered concrete wall in Tokyo at night. Neon street signs reflect off the wet pavement. Flash photography style, high grain, hypebeast aesthetic, sharp focus on the clothing texture and fabric drape, 35mm film look."
"A landscape image created entirely out of layered colored paper cutouts. A mountain range at sunset with a paper moon and paper clouds suspended by strings. The lighting casts realistic shadows between the paper layers, giving it physical depth. Orange, purple, and deep blue color palette. Arts and crafts style, playful but intricate."
"Intense, high-contrast action shot of a female athlete boxing in a dark, gritty gym. She is mid-punch, with sweat droplets flying off her glove. Rim lighting outlines her silhouette against the dark background. Smoke machine atmosphere. Motivational, gritty, Nike ad style, desaturated colours with high contrast. Add text "Now only $45 per month" and in small letters "Free trial class"
"A man" / "A woman"
Tip
Test it now in the P-Image Playground.
Domain Use Cases
Tip
Test it now in the P-Image Playground.
Integration
P-Image integrates seamlessly with Pruna’s API infrastructure. Here’s how to get started:
Tip
For more information on how to use the API, see the API Reference.
- API Endpoint
Base URL:
https://api.pruna.ai/v1/predictions
Authentication
Include your API key in the request header:
-H 'apikey: YOUR_API_KEY'
Asynchronous (Default)
Submit requests asynchronously for longer-running generations:
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-image' \
-d '{
"input": {
"prompt": "A majestic lion standing on a rocky cliff at sunset, photorealistic, 4k",
"aspect_ratio": "16:9"
}
}'
Response includes a status URL to check progress:
{
"id": "1zww7deyssrme0csqwr90phzzr",
"model": "p-image",
"input": { },
"get_url": "https://api.pruna.ai/v1/predictions/status/1zww7deyssrme0csqwr90phzzr"
}
Check status by polling the status endpoint:
curl -H 'apikey: YOUR_API_KEY' \
https://api.pruna.ai/v1/predictions/status/1zww7deyssrme0csqwr90phzzr
When completed, download the result:
curl -H 'apikey: YOUR_API_KEY' \
https://api.pruna.ai/v1/predictions/delivery/xezq/abc123.../output.jpg \
-o result.jpg
Synchronous (Try-Sync)
For faster results, use synchronous mode with the Try-Sync: true header:
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-image' \
-H 'Try-Sync: true' \
-d '{
"input": {
"prompt": "A majestic lion standing on a rocky cliff at sunset, photorealistic, 4k",
"aspect_ratio": "16:9"
}
}'
If the generation completes within 60 seconds, you’ll receive the result directly:
{
"status": "succeeded",
"generation_url": "https://api.pruna.ai/v1/predictions/delivery/xezq/abc123.../output.jpg"
}
Download your image:
curl -H 'apikey: YOUR_API_KEY' \
https://api.pruna.ai/v1/predictions/delivery/xezq/abc123.../output.jpg \
-o my-image.jpg
Configuration
P-Image offers flexible configuration options to customize image generation:
Tip
For more information on how to use the API, see the API Reference.
Required Parameters
Parameter |
Type |
Description |
|---|---|---|
prompt |
string |
Text description of the image to generate. The model provides exact prompt adherence for precise results. |
Optional Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
aspect_ratio |
string |
“16:9” |
Aspect ratio for the image. Options: “1:1”, “16:9”, “9:16”, “4:3”, “3:4”, “3:2”, “2:3”, “custom” |
width |
integer |
None |
Custom width in pixels (256-1440). Only used when aspect_ratio=”custom”. Must be multiple of 16. |
height |
integer |
None |
Custom height in pixels (256-1440). Only used when aspect_ratio=”custom”. Must be multiple of 16. |
seed |
integer |
random |
Random seed for reproducible generation |
disable_safety_checker |
boolean |
false |
Disable safety checker for generated images |
Example Configuration
Standard aspect ratio:
{
"input": {
"prompt": "A serene mountain landscape at dawn",
"aspect_ratio": "16:9",
"seed": 42
}
}
Custom dimensions:
{
"input": {
"prompt": "A futuristic cityscape",
"aspect_ratio": "custom",
"width": 1024,
"height": 768
}
}