Insights Studio

AI Report

Turn a document or spreadsheet into an interactive report dashboard.

document.report reads a document or spreadsheet and builds a self-contained HTML dashboard: headline figures, charts and the analysis behind them. Download dashboard.html from the result and open it in a browser.

OperationInputCreditsResult
document.reportPDF up to 50 MB; DOCX, XLSX, XLS or CSV up to 25 MBStandard: 2 per PDF page, 2 per 3,000 DOCX characters, 100 per spreadsheet. Premium: double.dashboard file, title and genre

Input

uploadIdstringrequired

Upload of a PDF, DOCX, XLSX, XLS or CSV file.

targetLanguagestringoptionaldefault: English

Language of the report, as a name or code. Same list as translation.

tonestringoptionaldefault: professional

Writing style of the report.

Allowed values:
professionalcasualdetail-orientedfancyvisual friendly
detailLevelstringoptionaldefault: standard

How much the report covers.

Allowed values:
concisestandardexhaustive
modelstringoptionaldefault: standard

Model tier. Premium costs twice as much.

Allowed values:
standardpremium
customInstructionsstringoptional

What to focus on, 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.report",
    "input": {"uploadId":"UPLOAD_ID","targetLanguage":"English","tone":"professional","detailLevel":"concise","model":"standard"}
  }'

Response

Result of a finished document.report job
{
  "job": {
    "id": "JOB_ID",
    "operation": "document.report",
    "status": "succeeded",
    "chargedCredits": 6,
    "result": {
      "type": "files",
      "data": { "title": "Launch Services Program", "genre": "technical fact sheet" },
      "files": [
        { "role": "dashboard", "fileName": "dashboard.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.