Document Infocard
document-infocardBuild one study card from documents — pdf, docx, txt, md, pptx (wowslides), xlsx, epub. Several files are read as one body of material and produce one card.
POST the files array; the call is async and returns a gateway job id. Poll GET /v2/jobs/{id} until status is completed, then read result_data.data.outputData.infocard. The same object is also under outputData.lms_card for existing integrations, and outputData.files reports what was read from each file.
/v1/proxy/transcript-infocardAsync. Documents in, one structured card out.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
files | array<object> | required | Each item: fileId (your identifier, echoed back), filePath (public http(s) URL), fileType (pdf | docx | txt | md | pptx | wowslides | xlsx | epub — inferred from the URL when omitted), extractedContent (optional: send the text yourself and the file is not downloaded). filePath or extractedContent is required per file. |
language | string | optional | Card language, ISO-639-1. Detected from the material when omitted. |
extraInformation | string | optional | Free-text instruction — audience, angle, terminology. |
processID | integer | optional | Echoed back in reqData for correlation. |
env | string | optional | Echoed back in reqData; kept for compatibility. |
callbackUrl | string | optional | Best-effort POST when the job ends: { status, processID, job_id }. |
curl -X POST https://api.cn8.io/v1/proxy/transcript-infocard \
-H "X-API-Key: <cn8_api_key>" \
-H "Content-Type: application/json" \
-d '{"files":["value"]}'{
"outputData": {
"infocard": {
"title": "...", "description": "...", "summary": "...", "longSummary": "...",
"keywords": ["..."], "highlights": ["..."],
"key_concepts": [{ "term": "...", "definition": "..." }],
"learning_objectives": ["..."], "key_points": ["..."],
"sections": [{ "title": "...", "content": "..." }],
"extracted_content": "...", "language": "en"
},
"lms_card": { "...": "same object" },
"files": [{ "fileId": "doc-1", "fileType": "pdf", "ok": true, "characters": 48210 }]
},
"usage": { "units": 1 }
}
One card, not one per file
Every file in a request is merged into a single body of material and produces one card. Send one request per document if you want one card each — billing is per file either way.
Scanned PDFs
A PDF with no text layer extracts nothing. OCR it first and pass the result as extractedContent.