---
title: "p-image"
url: "https://docs.api.pruna.ai/apis/models-api-0/versions/7dfbc266-0f94-4c90-8518-d9e4d1a245ec/schemas/p-image"
---

> Full API specification: https://docs.api.pruna.ai/apis/models-api-0/versions/7dfbc266-0f94-4c90-8518-d9e4d1a245ec.md

# p-image

Ultra-fast text-to-image generation with automatic prompt enhancement and 2-stage refinement. Supports custom aspect ratios and dimensions. Rate limit: 250 requests per minute.

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: P-API
  version: 0.3.0
servers:
  - url: https://api.pruna.ai
    description: Production server
components:
  schemas:
    p-image:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          properties:
            seed:
              title: Seed
              description: Random seed. Set for reproducible generation.
              type: integer
            width:
              title: Width
              maximum: 1440
              minimum: 256
              description: Width of the generated image. Only used when aspect_ratio=custom.
                Must be a multiple of 16.
              type: integer
            height:
              title: Height
              maximum: 1440
              minimum: 256
              description: Height of the generated image. Only used when aspect_ratio=custom.
                Must be a multiple of 16.
              type: integer
            prompt:
              title: Prompt
              description: Text prompt for image generation.
              type: string
            aspect_ratio:
              enum:
                - 1:1
                - 16:9
                - 9:16
                - 4:3
                - 3:4
                - 3:2
                - 2:3
                - custom
              title: aspect_ratio
              description: Aspect ratio for the generated image.
              default: 16:9
              type: string
            prompt_upsampling:
              title: Prompt Upsampling
              default: false
              description: Upsample the prompt with an LLM.
              type: boolean
            disable_safety_checker:
              title: Disable Safety Checker
              default: false
              description: Disable safety checker for generated images.
              type: boolean
          required:
            - prompt
          additionalProperties: false
      description: "Ultra-fast text-to-image generation with automatic prompt
        enhancement and 2-stage refinement. Supports custom aspect ratios and
        dimensions. Rate limit: 250 requests per minute."
```
