Predictions

Submit a content generation request

Submit a request to generate images or videos using one of the available AI models. This is the first step in the workflow.

The request will be queued for processing and you'll receive a prediction ID to track its status.

The model to use is specified via the Model header. The request body structure varies by model (see examples below).

If the Try-Sync header is set to true, the API will wait up to 60 seconds for completion. If generation completes within this time, the response will include the final result directly.

post/v1/predictions

Request

  • Base URL: https://api.pruna.ai
  • URL: https://api.pruna.ai/v1/predictions
  • Auth: API key in header apikey

Headers

Model'flux-dev' | 'flux-dev-lora' | 'flux-2-klein-4b' | 'wan-i2v' | 'wan-t2v' | 'wan-image-small' | 'qwen-image' | 'qwen-image-fast' | 'qwen-image-edit-plus' | 'vace' | 'p-image' | 'p-image-edit' | 'p-image-ideogram' | 'p-image-lora' | 'p-image-edit-lora' | 'z-image-turbo' | 'z-image-turbo-lora' | 'p-video' | 'p-video-animate' | 'p-video-replace' | 'p-video-avatar' | 'p-image-upscale' | 'p-image-try-on' | 'p-judger' | 'p-image-trainer' | 'p-image-edit-trainer' required

The AI model to use for generation. Each model has specific capabilities and input requirements.

Try-Syncboolean

If true, the API will wait up to 60 seconds for the generation to complete.

Request body

inputobject required

Model-specific input parameters

Response

Prediction request created successfully. Returns either an async response with prediction ID (default) or a sync response with final results (if Try-Sync=true and generation completes within 60 seconds).

OR

Example response

{
  "id": "1zww7deyssrme0csqwr90phzzr",
  "model": "vace",
  "get_url": "https://api.pruna.ai/v1/predictions/status/1zww7deyssrme0csqwr90phzzr"
}

Changes

No recorded changes to this operation across all 1 revision of this API.