p-image
Ultra-fast text-to-image generation by Pruna
Ultra-fast text-to-image generation by Pruna
P-Image is Pruna's ultra-fast text-to-image model with automatic prompt enhancement and 2-stage refinement. It combines exceptional speed with high-quality output, supporting custom aspect ratios and flexible dimensions. Perfect for high-volume production or when you need both speed and quality.
Rate Limit: 250 requests per minute
Category: Text-to-Image Generation
Price: 0.005$ / image
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",
"aspect_ratio": "16:9"
}
}'
Response:
{
"id": "1zww7deyssrme0csqwr90phzzr",
"model": "p-image",
"input": { ... },
"get_url": "https://api.pruna.ai/v1/predictions/status/1zww7deyssrme0csqwr90phzzr"
}
Check status and get results:
curl -X GET 'https://api.pruna.ai/v1/predictions/status/1zww7deyssrme0csqwr90phzzr' \
-H 'apikey: YOUR_API_KEY'
Synchronous Request (Try-Sync)
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",
"aspect_ratio": "16:9"
}
}'
Response (if completed within 60 seconds):
{
"status": "succeeded",
"generation_url": "/v1/predictions/delivery/xezq/52UGYRrRfqViaKmvYsEnENTh0qLDAWHptQ8jOnEHu7XC6AtKA/output.jpg"
}
| Parameter | Type | Description |
|---|---|---|
| prompt | string | Text description of the image to generate. The model automatically enhances prompts for better results. |
| 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 | - | Custom width in pixels (256-1440). Only used when aspect_ratio="custom". Must be multiple of 16. |
| height | integer | - | 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 |