---
title: "Get prediction status"
url: "https://docs.api.pruna.ai/apis/models-api-0/versions/e82c070d-36fc-4aa3-b8cc-8140e0221f53/operations/getPredictionStatus"
---

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

# Get prediction status

`GET` `/v1/predictions/status/{id}`

Operation ID: `getPredictionStatus`

Check the status of a prediction request. This is the second step in the asynchronous workflow. When the prediction is completed successfully, the response will include download URLs for the generated content (images or videos). Rate limit: 30,000 requests per minute.

## Path parameters

- `id` (string, required) - The prediction ID returned from the initial request

## Responses

- `200` - Prediction status retrieved successfully
- `401` - Authentication failed
- `404` - Resource not found
- `500` - Internal server error

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: P-API
  version: 0.1.0
servers:
  - url: https://api.pruna.ai
    description: Production server
paths:
  /v1/predictions/status/{id}:
    get:
      summary: Get prediction status
      description: >
        Check the status of a prediction request. This is the second step in the
        asynchronous workflow.

        When the prediction is completed successfully, the response will include
        download URLs for the generated content (images or videos).


        Rate limit: 30,000 requests per minute.
      operationId: getPredictionStatus
      tags:
        - Predictions
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          required: true
          description: The prediction ID returned from the initial request
          schema:
            type: string
            example: 1knpbkf075rme0csjqr987hg4w
      responses:
        "200":
          description: Prediction status retrieved successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PredictionStatusResponse"
              examples:
                processing:
                  summary: Prediction in progress
                  value:
                    status: processing
                    message: Generation in progress
                starting:
                  summary: Prediction starting
                  value:
                    status: starting
                    message: Generation in progress
                completed:
                  summary: Prediction completed successfully
                  value:
                    status: succeeded
                    generation_url: https://api.pruna.ai/v1/predictions/delivery/xezq/52UGYRrRfqViaKmvYsEnENTh0qLDAWHptQ8jOnEHu7XC6AtKA/output.mp4
                canceled:
                  summary: Prediction was canceled
                  value:
                    status: canceled
                    message: Prediction was canceled
                failed:
                  summary: Prediction failed during processing
                  value:
                    status: failed
                    message: Prediction failed
                    error: Number of samples, -5, must be non-negative.
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
security:
  - ApiKeyAuth: []
components:
  schemas:
    PredictionStatusResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          description: Current status of the prediction
          enum:
            - starting
            - processing
            - succeeded
            - failed
            - canceled
          example: processing
        generation_url:
          type: string
          description: URL to download the generated content (available when status is
            'succeeded')
          example: https://api.pruna.ai/v1/predictions/delivery/xezq/52UGYRrRfqViaKmvYsEnENTh0qLDAWHptQ8jOnEHu7XC6AtKA/output.mp4
        message:
          type: string
          description: Status message
          example: Generation in progress
        error:
          type: string
          description: Error details (available when status is 'failed')
          example: Number of samples, -5, must be non-negative.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
            message:
              type: string
              description: Human-readable error message
            details:
              type: string
              description: Additional error context
        request_id:
          type: string
          description: Unique request identifier for debugging
          example: req_1234567890
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            error:
              code: AUTHENTICATION_FAILED
              message: Invalid or missing API key
              details: Include your API key in the 'apikey' header
            request_id: req_1234567890
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            error:
              code: NOT_FOUND
              message: The requested resource was not found
              details: Prediction ID does not exist or has expired
            request_id: req_1234567890
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            error:
              code: INTERNAL_ERROR
              message: An unexpected error occurred
              details: Please try again later or contact support if the problem persists
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: >
        API key for authentication. You can obtain your API key from the Pruna
        AI dashboard.

        Include it in the `apikey` header for all requests.
```
