P-API provides access to multiple AI models for image generation,
video generation, and image-to-video transformation. The API supports both asynchronous
and synchronous workflows:
Asynchronous Workflow (default):
- POST /v1/predictions - Submit a generation request
- GET /v1/predictions/status/{id} - Check prediction status and get results
- GET /v1/predictions/delivery/{path} - Download the generated content
Synchronous Workflow (with Try-Sync header):
- POST /v1/predictions with
Try-Sync: trueheader - Submit a generation
request and wait up to 60 seconds for completion.
The API exposes 16 AI models across different categories:
- Text-to-Image: p-image, p-image-lora, flux-dev, flux-2-klein-4b, wan-image-small, qwen-image, qwen-image-fast, z-image-turbo, z-image-turbo-lora
- Image Editing: p-image-edit, p-image-edit-lora, qwen-image-edit-plus, flux-dev-lora
- Text-to-Video: wan-t2v
- Image-to-Video: wan-i2v
- Video Generation/Editing: vace
LoRA Trainers:
- p-image-trainer: Train custom LoRA models for p-image
- p-image-edit-trainer: Train custom LoRA models for p-image-edit
Trainers have a lower rate limit (5 requests/minute) and return training job status.
For detailed model documentation, see: https://docs.api.pruna.ai/guides/models
All requests require API key authentication via the apikey header.
- Server 1:https://api.pruna.ai
Production server
ApiKeyAuth (apiKey)
API key for authentication. You can obtain your API key from the
Pruna AI dashboard.
Include it in the apikey header for all requests.