---
title: "Generate Pdf Report"
method: GET
path: "/v2/reports/pdf/{media_id}"
tags: ["Report API"]
---

# Generate Pdf Report

`GET /v2/reports/pdf/{media_id}`

## Request

- Base URL: `https://api.imentiv.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.imentiv.ai/v2/reports/pdf/{media_id}`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Get PDF report if available, or trigger generation if not.

- Returns the PDF if it is already generated
- Triggers generation and returns 202 if not available
- Returns processing status if generation is already in progress
- Returns 409 with body {"detail": "media_unavailable"} when the owner's
  account is gone. Retrying does not help.

## Path parameters

- `media_id` string, required: Unique identifier of the media

## Query parameters

- `media_type` string, required: Type: Only 'video' is allowed at present
- `callback_url` string, nullable: Callback URL for completion notification. Must be an https URL on a publicly reachable host.

## Response `200`

PDF stream when the artifact is ready; JSON {id, message, status} when this request triggered generation.

- GenerateReportResponse: Response model for PDF report generation Inherits from GenerateCSVResponse
  - `id` string, required
  - `message` string, required
  - `status` string, required

## Other responses

- `202`: Generation already running.
- `409`: The owner's account is gone, so the report cannot be generated. The body is {"detail": "media_unavailable"}. Retrying does not help.
- `422`: Validation Error

## Changes

- **2026-11-02** `1ec1d62c9bcf`: 1 info
  - added the non-success response with the status `409`
- **2026-08-20** `74ceee4a5c98`: 1 breaking, 5 info
  - the response's body type changed from no type to `object` for status `200`
  - added the media type `application/pdf` for the response with the status `200`
  - added the required property `id` to the response with the `200` status
  - added the required property `message` to the response with the `200` status
  - …2 more

[Operation history](https://skmtc.dev/imentiv/apis/welcome-to-imentiv-ai/changes/v2/reports/pdf/:media_id/get.md)

---

[API](https://skmtc.dev/imentiv/apis/welcome-to-imentiv-ai.md) - [All operations](https://skmtc.dev/imentiv/apis/welcome-to-imentiv-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/imentiv/apis/welcome-to-imentiv-ai/revisions/bc15cec7e794?raw)
