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.

OperationInputCreditsResult
document.mindmapPDF up to 50 MB; DOCX or PPTX up to 25 MB10 per started 100 pagesnodes, edges, mermaid; professional_html and casual_html files

Input

uploadIdstringrequired

Upload of a PDF, DOCX or PPTX file.

targetLanguagestringoptionaldefault: English

Language of the node labels, as a name or code.

customInstructionsstringoptional

What to emphasize, up to 2000 characters.

webhookUrlstringoptional

Public 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

StatusCodeWhen
400invalid_inputA field is missing, unknown or out of range, or the upload is not yours.
400unsupported_fileThe operation does not take this file type.
400file_too_largePDF over 50 MB, office or spreadsheet file over 25 MB, or image over 10 MB.
400unreadable_documentThe document's pages could not be counted.
402insufficient_creditsThe wallet, or a test key's spend cap, does not cover the estimate.
409conflictThe Idempotency-Key was already used with a different input or operation.
errorCodeMeaning
failedThe worker could not finish the job.
missing_outputThe worker finished but returned none of the expected output.
enqueue_failedThe job could not be handed to the worker. Retry with a new Idempotency-Key.