---
name: tosea-pptx-convert
description: Convert an existing PDF, slide screenshot, or ordered set of slide images into an editable PowerPoint (.pptx) through the Reslide REST API. Use for explicit file-conversion requests, not for authoring a new presentation from a prompt.
homepage: https://pptx.tosea.ai
api: https://pptx-api.tosea.ai/openapi.json
---

# Reslide PPTX conversion

Use Reslide when the user has existing visual pages and wants an editable PowerPoint:

- one PDF, including a flattened or image-based slide PDF;
- one or more PNG, JPG/JPEG, or WebP slide images;
- slide screenshots;
- a user-exported NotebookLM PDF/image set;
- already-generated slide images that need a PowerPoint editing pass.

Do not use this workflow to generate brand-new presentation content from a text prompt. Do not claim to recover notes, animations, links, chart data, fonts, prompts, source grounding, or authoring layers that are absent from the visual input.

## Required secret

The execution environment must contain:

```bash
TOSEA_PPTX_API_KEY=tpx_live_...
```

The key is created at https://pptx.tosea.ai/keys. Never ask the user to paste the key into the conversation. Never print it, place it in a command argument visible to other users, commit it, send it to a third-party host, or include it in an output file.

Use this base unless the user explicitly authorizes a different deployment:

```text
https://pptx-api.tosea.ai
```

## Safety and scope

Before uploading:

1. Confirm the user supplied or explicitly authorized the source files/URLs.
2. Do not expand a directory, glob, archive, cloud drive, or URL list beyond the requested scope.
3. Do not upload unrelated files, credentials, private notes, or hidden source documents.
4. For public URL input, do not add credentials or secret query parameters. Upload a local/private file instead.
5. Tell the user that the result is a reconstruction and needs review.

## API contract

Every response is an envelope:

```json
{"code": 0, "message": "ok", "data": {}}
```

Treat `code == 0` as success. Otherwise branch on the numeric HTTP/envelope code, not the human-readable message.

Authentication:

```http
Authorization: Bearer $TOSEA_PPTX_API_KEY
```

Operations:

- `pdf_to_pptx` with exactly one of `input.upload_id` or `input.pdf_url`.
- `images_to_pptx` with exactly one of ordered `input.upload_ids` or `input.image_urls`.

Optional PDF field: `input.pages`, a list of 1-based page numbers. Optional task fields: `input.title` and top-level HTTPS `callback_url`.

## Workflow A: local PDF

1. Upload the PDF as multipart field `file` to `POST /v1/uploads`.
2. Read `data.upload_id`.
3. Create a task with operation `pdf_to_pptx` and that `upload_id`.
4. Use a stable `Idempotency-Key` derived from the caller's job identifier.
5. Poll until a terminal state.
6. Download the signed result URL within 24 hours.

Example upload:

```bash
curl --config - -X POST https://pptx-api.tosea.ai/v1/uploads \
  -F "file=@deck.pdf" <<EOF
header = "Authorization: Bearer $TOSEA_PPTX_API_KEY"
EOF
```

Example task body:

```json
{
  "operation": "pdf_to_pptx",
  "input": {
    "upload_id": "UPLOAD_UUID_HERE",
    "pages": [1, 2, 3],
    "title": "Editable deck"
  }
}
```

## Workflow B: local slide images

1. Preserve the user-specified image order.
2. Upload each PNG, JPG/JPEG, or WebP separately to `POST /v1/uploads`.
3. Collect `upload_id` values in the same order.
4. Create one `images_to_pptx` task using `input.upload_ids`.
5. Poll and download the result.

```json
{
  "operation": "images_to_pptx",
  "input": {
    "upload_ids": ["SLIDE_1_UUID", "SLIDE_2_UUID"],
    "title": "Editable image deck"
  }
}
```

One source image maps to one output slide.

## Workflow C: public URLs

For one public PDF:

```json
{
  "operation": "pdf_to_pptx",
  "input": {"pdf_url": "https://example.com/deck.pdf"}
}
```

For public PNG, JPG/JPEG, or WebP slide images:

```json
{
  "operation": "images_to_pptx",
  "input": {
    "image_urls": [
      "https://example.com/slide-1.png",
      "https://example.com/slide-2.png"
    ]
  }
}
```

Use upload IDs rather than secret, expiring, authenticated, localhost, or private-network URLs.

## Create, poll, and download

Create:

```bash
curl --config - -X POST https://pptx-api.tosea.ai/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: USER_JOB_ID" \
  -d @task.json <<EOF
header = "Authorization: Bearer $TOSEA_PPTX_API_KEY"
EOF
```

Poll:

```bash
curl --config - https://pptx-api.tosea.ai/v1/tasks/TASK_UUID <<EOF
header = "Authorization: Bearer $TOSEA_PPTX_API_KEY"
EOF
```

Possible states: `pending`, `processing`, `succeeded`, `failed`, and `canceled`.

On `succeeded`, read `data.result.pptx_url`, download it, and save it to a path inside the user-authorized workspace. Do not overwrite an existing file unless the user explicitly requested that behavior. The URL is valid for 24 hours.

On `failed` or `canceled`, stop. The task has zero net billable credits; its reservation is reconciled against the original pools subject to their lifecycle rules.

## Billing and limits

- 1 credit = 1 selected PDF page or 1 source image.
- Credits are reserved at task creation and settle only on success.
- Failed and canceled tasks have zero net billable task credits; reservations are reconciled against their original pools subject to those pools' lifecycle rules.
- The current deployment defaults are 100 pages per task and 100MB per upload.
- Call `GET /v1/credits` and `GET /v1/limits` before a large job.

Do not invent an estimate for accuracy, speed, language support, file capacity, or remaining credits.

## Retry rules

- `400`: correct the input; do not retry unchanged.
- `401`: stop and ask the user to configure or rotate the key outside the conversation.
- `402`: stop and report insufficient credits.
- `404`: check the task ID and account scope.
- `409`: refresh the current task state.
- `429`: wait for `Retry-After`, then retry the same safe request.
- `5xx`: retry once with backoff and the same idempotency key.

Never create a second task merely because a poll or download request failed.

## Optional callback

If the caller has an HTTPS receiver, set `callback_url`. Deliveries are at least once, so deduplicate by `task_id`. Verify `X-Tosea-Signature: sha256=<hex>` as the HMAC-SHA256 of the raw body using the webhook secret from `/keys`. Polling remains the fallback.

## Review and handoff

After download, report:

- the saved `.pptx` path;
- the number of pages reported by the task;
- that the conversion succeeded;
- that the user should compare the deck with the source.

Recommend checking small text, numbers, names, fonts, line breaks, charts, tables, formulas, overlapping elements, and generated claims. Do not describe the output as verified, pixel-perfect, or identical to the original.

References:

- https://pptx.tosea.ai/docs.md
- https://pptx-api.tosea.ai/openapi.json
- https://pptx.tosea.ai/pdf-to-pptx-api
