Convert PPTX to plain text
To convert PPTX to plain text, send one POST to /v1/pptx-to-text with the PPTX source. Each call costs $0.005 in USDC on Base via x402, with no account and no API key. The source file can be up to 25 MB.
- Endpoint
POST /v1/pptx-to-text- Price
- $0.005 per call
- Service
- pptx-to-text
01Limits
| Limit | Value |
|---|---|
| Largest source file | 25 MB (26,214,400 bytes) |
| Timeout | 40 s |
| Source formats | PPTX |
| Output formats | plain text |
02Example
A real PPTX to plain text run of pptx-to-text.
POST /v1/pptx-to-text
content-type: application/json
payment-signature: <base64 x402 payload>
{
"url": "https://grist.tools/samples/documents/garden-plan.pptx"
}200 OK
payment-response: <base64 settlement receipt>
{
"source_url": "https://grist.tools/samples/documents/garden-plan.pptx",
"slide_count": 3,
"chars": 244,
"slides": [
{
"number": 1,
"text": "Spring Planting Plan\nCommunity garden season overview"
},
{
"number": 2,
"text": "Beds and Crops\nNorth beds: beans and peas\nSouth beds: tomatoes & peppers\nHerb spiral: basil, thyme, mint"
},
{
"number": 3,
"text": "Next Steps\nOrder compost by March\nRepair the east fence\nSchedule the first work day"
}
],
"text": "Spring Planting Plan\nCommunity garden season overview\n\nBeds and Crops\nNorth beds: beans and peas\nSouth beds: tomatoes & peppers\nHerb spiral: basil, thyme, mint\n\nNext Steps\nOrder compost by March\nRepair the east fence\nSchedule the first work day"
}Source file: documents/garden-plan.pptx, 6.8 KB (6,964 bytes). Three-slide PowerPoint deck (a garden planting plan): a title slide and two bullet slides, one line holding an escaped ampersand, hand-written PresentationML with pinned zip dates. The recorded run returned 244 bytes of plain text, 4% of the source size, with 3 slides and 244 characters.
The returned text runs to 12 lines, 2 blank ones among them, and its longest line, "Community garden season overview", holds 32 characters. Its first line reads "Spring Planting Plan" and its last "Schedule the first work day". Split on whitespace, it yields 40 tokens over 10 non-blank lines.
03Format notes
PPTX as a source
Slide body text is what Grist extracts from a PPTX. The file must match the PK 03 04 ZIP signature and contain ppt/slides/slideN.xml parts; a ZIP with no slide parts is refused as not a presentation. Inflated size, entry count and the number of slide parts are bounded before the archive is read. Slides are visited in numeric order, so slide2 precedes slide10, which a lexical sort would misplace. Within each slide, the a:t text runs of each a:p paragraph are joined into one line, and paragraphs are separated by newlines. XML entities and numeric character references are decoded, and a reference to a character that XML forbids is refused. Speaker notes, chart data and images are excluded. The response lists each slide's text with its position, alongside the concatenated text of all slides.
plain text as a target
Plain text is recovered in several ways, each tied to one reader. ocr-image-to-text reads pixels with Tesseract running offline from local files, returns a mean confidence with the text, and offers only the languages whose data ships with the service. pdf-to-text returns the existing text layer page by page and performs no OCR. epub-to-text follows the spine's reading order and adds title, creator and language metadata. pptx-to-text returns slide body text in slide order, leaving out speaker notes. html-clean-text extracts article text with Readability by default and returns Markdown in the same response. Because each reader works differently, the text reflects its source: recognised characters with a confidence score from an image, but characters already present in the file from documents and pages.
04Errors
| Code | HTTP |
|---|---|
invalid_input | 400 |
blocked_target | 403 |
unreachable_target | 424 |
upstream_timeout | 424 |
unsupported_content_type | 415 |
too_large | 413 |
unprocessable | 422 |
internal | 500 |
When each is raised, and what it means for payment: /docs/pptx-to-text.
05Questions
- What does it cost to convert PPTX to plain text?
- $0.005 per call, paid in USDC on Base via x402.
- How large can the PPTX file be?
- Up to 25 MB (26,214,400 bytes). Past a limit the call answers too_large (413).
- What happens if the conversion fails?
- The tool answers with a typed JSON error from the errors table. Payment is settled only after the tool has produced its result; a call that fails inside the tool is never settled.