Insights Studio
Mind Map
Map a document's main ideas and how they connect, as data and as ready-to-open HTML.
document.mindmap builds a knowledge graph of a document. The result carries the graph as nodes and edges plus a Mermaid diagram you can render yourself, and two HTML views (professional and casual) you can open directly.
| Operation | Input | Credits | Result |
|---|---|---|---|
| document.mindmap | PDF up to 50 MB; DOCX or PPTX up to 25 MB | 10 per started 100 pages | nodes, edges, mermaid; professional_html and casual_html files |
Input
uploadIdstringrequiredUpload of a PDF, DOCX or PPTX file.
targetLanguagestringoptionaldefault: EnglishLanguage of the node labels, as a name or code.
customInstructionsstringoptionalWhat to emphasize, up to 2000 characters.
webhookUrlstringoptionalPublic HTTPS URL that receives signed job updates (top-level, next to operation). See Webhooks.
Code Example
curl -X POST https://api.transpera.io/v1/jobs \
-H "authorization: Bearer tp_test_..." \
-H "content-type: application/json" \
-H "idempotency-key: $(uuidgen)" \
-d '{
"operation": "document.mindmap",
"input": {"uploadId":"UPLOAD_ID","targetLanguage":"Hindi"}
}'Response
Result of a finished document.mindmap job
{
"job": {
"id": "JOB_ID",
"operation": "document.mindmap",
"status": "succeeded",
"chargedCredits": 10,
"result": {
"type": "files",
"data": {
"nodes": [{ "id": "root", "label": "Launch Services Program" }],
"edges": [{ "source": "root", "target": "n1" }],
"mermaid": "mindmap
root((Launch Services Program))..."
},
"files": [
{ "role": "professional_html", "fileName": "professional_view.html", "url": "https://...", "expiresAt": "..." },
{ "role": "casual_html", "fileName": "casual_view.html", "url": "https://...", "expiresAt": "..." }
]
}
}
}Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_input | A field is missing, unknown or out of range, or the upload is not yours. |
| 400 | unsupported_file | The operation does not take this file type. |
| 400 | file_too_large | PDF over 50 MB, office or spreadsheet file over 25 MB, or image over 10 MB. |
| 400 | unreadable_document | The document's pages could not be counted. |
| 402 | insufficient_credits | The wallet, or a test key's spend cap, does not cover the estimate. |
| 409 | conflict | The Idempotency-Key was already used with a different input or operation. |
| errorCode | Meaning |
|---|---|
| failed | The worker could not finish the job. |
| missing_output | The worker finished but returned none of the expected output. |
| enqueue_failed | The job could not be handed to the worker. Retry with a new Idempotency-Key. |