---
title: "Generate Infographic"
method: POST
path: "/api/v1/generate-infographic"
tags: ["Chat"]
---

# Generate Infographic

`POST /api/v1/generate-infographic`

## Request

- Base URL: `https://backend.caspr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://backend.caspr.ai/api/v1/generate-infographic`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Generate infographic PDF for a report.

Logic:
- Uses current timestamp for infographic generation (no correlation with Report.generated_at)
- Stores info_pdf_generation_time in s3_uri JSONB only (like PPTX does with pptx_generation_time)
- Follows same versioning logic as PPTX:
  - If infographic exists and no changes → return existing
  - If infographic exists and changes detected → create new version
  - If no infographic exists → generate for current version
- Poster image: First generation (report OR infographic) creates it, subsequent reuse it
- If report_version_id is provided, generates for that specific version

## Request body

- GenerateInfographicRequest
  - `report_id` string, required
  - `report_version_id` string, nullable

## Response `200`

Successful Response

- GenerateInfographicResponse
  - `success` boolean, required
  - `message` string, required
  - `report_version_id` string, nullable
  - `version` integer, nullable
  - `info_pdf_s3_uri` string, nullable
  - `info_pdf_generation_time` string, nullable
  - `report_id` string, nullable
  - `modified` boolean, nullable
  - `already_exists` boolean, nullable

## Other responses

- `401`: Unauthorized
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/caspr/apis/casper-api.md) - [All operations](https://skmtc.dev/caspr/apis/casper-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caspr/apis/casper-api/revisions/f9765e3aa00c?raw)
