---
title: "PredictionRequest"
url: "https://docs.api.pruna.ai/apis/models-api-0/versions/e82c070d-36fc-4aa3-b8cc-8140e0221f53/schemas/PredictionRequest"
---

> Full API specification: https://docs.api.pruna.ai/apis/models-api-0/versions/e82c070d-36fc-4aa3-b8cc-8140e0221f53.md

# PredictionRequest

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: P-API
  version: 0.1.0
servers:
  - url: https://api.pruna.ai
    description: Production server
components:
  schemas:
    flux-dev:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: Text prompt for image generation
            speed_mode:
              type: string
              description: Speed optimization level
              enum:
                - Lightly Juiced 🍊 (more consistent)
                - Juiced 🔥 (default)
                - Extra Juiced 🔥 (more speed)
                - Blink of an eye 👁️
              default: Juiced 🔥 (default)
            num_inference_steps:
              type: integer
              description: Number of inference steps
              default: 28
            guidance:
              type: number
              description: Guidance scale
              default: 3.5
            seed:
              type: integer
              description: Random seed (-1 for random)
              default: -1
            aspect_ratio:
              type: string
              description: Aspect ratio of output image
              enum:
                - 1:1
                - 16:9
                - 21:9
                - 3:2
                - 2:3
                - 4:5
                - 5:4
                - 3:4
                - 4:3
                - 9:16
                - 9:21
              default: 1:1
            image_size:
              type: integer
              description: Base image size (longest side)
              default: 1024
            output_format:
              type: string
              description: Output format
              enum:
                - png
                - jpg
                - webp
              default: jpg
            output_quality:
              type: integer
              description: Output quality (for jpg and webp)
              minimum: 1
              maximum: 100
    flux-dev-lora:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: Text prompt for image generation
            lora:
              type: string
              description: HuggingFace LoRA URL (e.g., owner/model-name)
            lora_scale:
              type: number
              description: LoRA application strength
              minimum: -1
              maximum: 3
              default: 1
            extra_lora:
              type: string
              description: Second HuggingFace LoRA URL
            extra_lora_scale:
              type: number
              description: Second LoRA application strength
              minimum: -1
              maximum: 3
              default: 1
            image:
              type: string
              format: uri
              description: Input image for img2img mode
            prompt_strength:
              type: number
              description: Prompt strength for img2img
              minimum: 0
              maximum: 1
              default: 0.8
            num_outputs:
              type: integer
              description: Number of outputs to generate
              minimum: 1
              maximum: 4
              default: 1
            num_inference_steps:
              type: integer
              description: Number of denoising steps
              default: 28
            guidance:
              type: number
              description: Guidance scale
              minimum: 0
              maximum: 10
              default: 3
            seed:
              type: integer
              description: Random seed
            aspect_ratio:
              type: string
              description: Aspect ratio of output image
              enum:
                - 1:1
                - 16:9
                - 21:9
                - 3:2
                - 2:3
                - 4:5
                - 5:4
                - 3:4
                - 4:3
                - 9:16
                - 9:21
              default: 1:1
            output_format:
              type: string
              description: Output format
              enum:
                - png
                - jpg
                - webp
              default: jpg
            output_quality:
              type: integer
              description: Output quality (for jpg/webp)
              minimum: 1
              maximum: 100
              default: 80
            speed_mode:
              type: string
              description: Speed optimization level
              enum:
                - Base Model (compiled)
                - Lightly Juiced 🍊
                - Juiced 🧃
                - Extra Juiced 🔥
              default: Juiced 🧃
            megapixels:
              type: string
              description: Approximate megapixels for output
              enum:
                - "1"
                - "0.25"
              default: "1"
          additionalProperties: false
    wan-i2v:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          required:
            - prompt
            - image
          properties:
            prompt:
              type: string
              description: Text prompt for video generation
            image:
              type: string
              format: uri
              description: Input image to generate video from
            last_image:
              type: string
              format: uri
              description: Optional last image to condition the video generation. If provided,
                creates smoother transitions between frames
            num_frames:
              type: integer
              description: Number of video frames. 81 frames give the best results
              minimum: 81
              maximum: 121
              default: 81
            resolution:
              type: string
              description: Resolution of video. 16:9 corresponds to 832x480px, and 9:16 is
                480x832px
              enum:
                - 480p
                - 720p
              default: 480p
            frames_per_second:
              type: integer
              description: Frames per second. Note that the pricing of this model is based on
                the video duration at 16 fps
              minimum: 5
              maximum: 30
              default: 16
            interpolate_output:
              type: boolean
              description: Interpolate the generated video to 30 FPS using ffmpeg
              default: false
            go_fast:
              type: boolean
              description: Go fast
              default: true
            sample_shift:
              type: number
              description: Sample shift factor
              minimum: 1
              maximum: 20
              default: 12
            seed:
              type: integer
              description: Random seed. Leave blank for random
            disable_safety_checker:
              type: boolean
              description: Disable safety checker for generated video
              default: false
            lora_weights_transformer:
              type: string
              format: uri
              description: Load LoRA weights for the HIGH transformer. Supports arbitrary
                .safetensors URLs from the Internet (e.g.,
                'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_hinoise.safetensors')
            lora_scale_transformer:
              type: number
              description: Determines how strongly the transformer LoRA should be applied
              default: 1
            lora_weights_transformer_2:
              type: string
              format: uri
              description: Load LoRA weights for the LOW transformer_2. Supports arbitrary
                .safetensors URLs from the Internet. Can be different from
                transformer LoRA (e.g.,
                'https://huggingface.co/TheRaf7/instagirl-v2/resolve/main/Instagirlv2.0_lownoise.safetensors')
            lora_scale_transformer_2:
              type: number
              description: Determines how strongly the transformer_2 LoRA should be applied
              default: 1
          additionalProperties: false
    wan-t2v:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: Text prompt for video generation
            optimize_prompt:
              type: boolean
              description: Translate prompt to Chinese before generation
              default: false
            num_frames:
              type: integer
              description: Number of video frames. 81 frames give the best results
              minimum: 81
              maximum: 121
              default: 81
            aspect_ratio:
              type: string
              description: Aspect ratio of video. 16:9 corresponds to 832x480px, and 9:16 is
                480x832px
              enum:
                - 16:9
                - 9:16
              default: 16:9
            resolution:
              type: string
              description: Resolution of video. 16:9 corresponds to 832x480px, and 9:16 is
                480x832px
              enum:
                - 480p
                - 720p
              default: 480p
            frames_per_second:
              type: integer
              description: Frames per second. Note that the pricing of this model is based on
                the video duration at 16 fps
              minimum: 5
              maximum: 30
              default: 16
            interpolate_output:
              type: boolean
              description: Interpolate the generated video to 30 FPS using ffmpeg
              default: false
            go_fast:
              type: boolean
              description: Go fast
              default: true
            sample_shift:
              type: number
              description: Sample shift factor
              minimum: 1
              maximum: 20
              default: 12
            seed:
              type: integer
              description: Random seed. Leave blank for random
            disable_safety_checker:
              type: boolean
              description: Disable safety checker for generated video
              default: false
            lora_weights_transformer:
              type: string
              format: uri
              description: Load LoRA weights for transformer. Supports arbitrary .safetensors
                URLs from the Internet (e.g.,
                'https://huggingface.co/Viktor1717/scandinavian-interior-style1/resolve/main/my_first_flux_lora_v1.safetensors')
            lora_scale_transformer:
              type: number
              description: Determines how strongly the transformer LoRA should be applied
              default: 1
            lora_weights_transformer_2:
              type: string
              format: uri
              description: Load LoRA weights for transformer_2. Supports arbitrary
                .safetensors URLs from the Internet. Can be different from
                transformer LoRA
            lora_scale_transformer_2:
              type: number
              description: Determines how strongly the transformer_2 LoRA should be applied
              default: 1
          additionalProperties: false
    wan-image-small:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: Text prompt for image generation
            juiced:
              type: boolean
              description: Enable faster generation
              default: false
            aspect_ratio:
              type: string
              description: Aspect ratio for the generated image. Use 'custom' to specify width
                and height manually.
              enum:
                - 1:1
                - 16:9
                - 9:16
                - 4:3
                - 3:4
                - 21:9
                - custom
              default: 16:9
            width:
              type: integer
              description: Width of the generated image. Only used when aspect_ratio=custom.
                Must be a multiple of 16.
              minimum: 256
              maximum: 900
            height:
              type: integer
              description: Height of the generated image. Only used when aspect_ratio=custom.
                Must be a multiple of 16.
              minimum: 256
              maximum: 900
            seed:
              type: integer
              description: Random seed for reproducible generation
            output_format:
              type: string
              description: Output format
              enum:
                - png
                - jpg
                - webp
              default: jpg
            output_quality:
              type: integer
              description: Output quality (for jpg/webp)
              minimum: 1
              maximum: 100
              default: 80
          additionalProperties: false
    qwen-image:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: Text prompt for image generation
            enhance_prompt:
              type: boolean
              description: Enhance the prompt with positive magic
              default: false
            lora_weights:
              type: string
              format: uri
              description: Load LoRA weights. Supports arbitrary .safetensors URLs, tar files,
                and zip files from the Internet
            replicate_weights:
              type: string
              format: uri
              description: Load LoRA weights from Replicate training. Supports arbitrary
                .safetensors URLs, tar files, and zip files
            lora_scale:
              type: number
              description: Determines how strongly the main LoRA should be applied
              default: 1
            extra_lora_weights:
              type: array
              items:
                type: string
                format: uri
              description: Additional LoRA weights as an array of URLs. Same formats supported
                as lora_weights
            extra_lora_scale:
              type: array
              items:
                type: number
              description: Scales for additional LoRAs as an array of numbers. Must match the
                number of weights in extra_lora_weights
            image:
              type: string
              format: uri
              description: Input image for img2img pipeline
            strength:
              type: number
              description: Strength for img2img pipeline
              minimum: 0
              maximum: 1
              default: 0.9
            negative_prompt:
              type: string
              description: Negative prompt for generated image
              default: " "
            aspect_ratio:
              type: string
              description: Aspect ratio for the generated image
              enum:
                - 1:1
                - 16:9
                - 9:16
                - 4:3
                - 3:4
              default: 16:9
            image_size:
              type: string
              description: Image size for the generated image
              enum:
                - optimize_for_quality
                - optimize_for_speed
              default: optimize_for_quality
            go_fast:
              type: boolean
              description: Run faster predictions with additional optimizations
              default: true
            num_inference_steps:
              type: integer
              description: Number of denoising steps. Recommended range is 28-50
              minimum: 1
              maximum: 50
              default: 30
            guidance:
              type: number
              description: Guidance for generated image. Lower values can give more realistic
                images
              minimum: 0
              maximum: 10
              default: 3
            seed:
              type: integer
              description: Random seed. Set for reproducible generation
            output_format:
              type: string
              description: Format of the output images
              enum:
                - webp
                - jpg
                - png
              default: webp
            output_quality:
              type: integer
              description: Quality when saving the output images
              minimum: 0
              maximum: 100
              default: 80
            disable_safety_checker:
              type: boolean
              description: Disable safety checker for generated images
              default: false
          additionalProperties: false
    qwen-image-edit-plus:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          required:
            - image
            - prompt
          properties:
            prompt:
              type: string
              description: Text instruction on how to edit the given image
            image:
              oneOf:
                - type: string
                  format: uri
                - type: array
                  items:
                    type: string
                    format: uri
                  minItems: 1
                  maxItems: 2
              description: Images to use as reference. Must be jpeg, png, gif, or webp
            aspect_ratio:
              type: string
              description: Aspect ratio for the generated image
              enum:
                - match_input_image
                - 16:9
                - 9:16
                - 1:1
                - 4:3
                - 3:4
              default: match_input_image
            go_fast:
              type: boolean
              description: Run faster predictions with additional optimizations
              default: true
            seed:
              type: integer
              description: Random seed. Set for reproducible generation
            output_format:
              type: string
              description: Format of the output images
              enum:
                - webp
                - jpg
                - png
              default: webp
            output_quality:
              type: integer
              description: Quality when saving the output images
              minimum: 0
              maximum: 100
              default: 95
            disable_safety_checker:
              type: boolean
              description: Disable safety checker for generated images
              default: false
          additionalProperties: false
    vace:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: Text prompt describing the edit
            src_video:
              type: string
              description: Input video to edit (HTTP URL or base64 data URI)
            src_mask:
              type: string
              description: Input mask video or image (HTTP URL or base64 data URI)
            src_ref_images:
              type: array
              items:
                type: string
              description: Array of reference images (HTTP URLs or base64 data URIs)
            speed_mode:
              type: string
              description: Speed optimization level
              enum:
                - Lightly Juiced 🍊 (more consistent)
                - Juiced 🔥 (more speed)
                - Extra Juiced 🚀 (even more speed)
              default: Lightly Juiced 🍊 (more consistent)
            frame_num:
              type: integer
              description: Number of frames to generate
              default: 81
            size:
              type: string
              description: Output resolution
              enum:
                - 720*1280
                - 1280*720
                - 480*832
                - 832*480
              default: 832*480
            seed:
              type: integer
              description: Random seed (-1 for random)
              default: -1
            sample_shift:
              type: integer
              description: Sample shift parameter
              default: 16
            sample_solver:
              type: string
              description: Sample solver algorithm
              enum:
                - unipc
                - dpm++
              default: unipc
            sample_steps:
              type: integer
              description: Number of sampling steps
              default: 50
            sample_guide_scale:
              type: number
              description: Guidance scale for sampling
              default: 5
          additionalProperties: false
    p-image:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: Text prompt for image generation
            aspect_ratio:
              type: string
              description: Aspect ratio for the generated image. Use 'custom' to specify width
                and height manually.
              enum:
                - 1:1
                - 16:9
                - 9:16
                - 4:3
                - 3:4
                - 3:2
                - 2:3
                - custom
              default: 16:9
            width:
              type: integer
              description: Width of the generated image. Only used when aspect_ratio=custom.
                Must be a multiple of 16.
              minimum: 256
              maximum: 1440
            height:
              type: integer
              description: Height of the generated image. Only used when aspect_ratio=custom.
                Must be a multiple of 16.
              minimum: 256
              maximum: 1440
            seed:
              type: integer
              description: Random seed for reproducible generation
            disable_safety_checker:
              type: boolean
              description: Disable safety checker for generated images
              default: false
          additionalProperties: false
    p-image-edit:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          required:
            - prompt
            - images
          properties:
            prompt:
              type: string
              description: Text prompt for image editing
            images:
              type: array
              items:
                type: string
                format: uri
              description: Images to use as reference (1-5 images)
              minItems: 1
              maxItems: 5
            mode:
              type: string
              description: Mode to use with P-Edit
              enum:
                - default
                - multiple_angles
                - relight
                - light_restoration
                - white_to_scene
                - fusion
                - add_characters
                - next_scene
                - style_consistency
                - subject_consistency
              default: default
            aspect_ratio:
              type: string
              description: Aspect ratio for the generated image
              enum:
                - match_input_image
                - 1:1
                - 16:9
                - 9:16
                - 4:3
                - 3:4
                - 3:2
                - 2:3
              default: match_input_image
            seed:
              type: integer
              description: Random seed for reproducible generation
            disable_safety_checker:
              type: boolean
              description: Disable safety checker for generated images
              default: false
            turbo:
              type: boolean
              description: If turned on, the model will run faster with additional
                optimizations. For complicated tasks, it is recommended to turn
                this off.
              default: true
          additionalProperties: false
    PredictionRequest:
      type: object
      required:
        - input
      oneOf:
        - $ref: "#/components/schemas/flux-dev"
        - $ref: "#/components/schemas/flux-dev-lora"
        - $ref: "#/components/schemas/wan-i2v"
        - $ref: "#/components/schemas/wan-t2v"
        - $ref: "#/components/schemas/wan-image-small"
        - $ref: "#/components/schemas/qwen-image"
        - $ref: "#/components/schemas/qwen-image-edit-plus"
        - $ref: "#/components/schemas/vace"
        - $ref: "#/components/schemas/p-image"
        - $ref: "#/components/schemas/p-image-edit"
```
