Docs — API Reference

Files

Files are how non-text artifacts — PDFs, images, audio — enter the platform. Upload, then either attach the file id to a run or let ingestion write it into the context graph. Extraction is asynchronous; file.processed fires when the content is queryable.

[ 01 ]post/v1/files

POST/v1/files

Upload a file (multipart/form-data, max 100 MB). Extraction begins immediately.

paramtypereqdescription
filebinaryrequiredThe file payload. PDF, PNG, JPEG, WAV, M4A, and plain text supported.
purposestringrequired"context" (ingest into the graph) or "attachment" (run-only).
metadataobjectoptionalUp to 16 string key–value pairs.
[ request ]POST
curl -X POST https://api.myndlabs.ai/v1/files \
  -H "Authorization: Bearer $MYND_API_KEY" \
  -F purpose=context \
  -F file=@invoice-march.pdf
[ response ]200 ok
{
  "id": "file_8c21aa04",
  "object": "file",
  "filename": "invoice-march.pdf",
  "bytes": 184201,
  "purpose": "context",
  "status": "processing"
}

[ 02 ]get/v1/files/:id

GET/v1/files/:id

Retrieve a file's metadata and extraction status.

paramtypereqdescription
idstringrequiredFile identifier. Path parameter.
[ response ]200 ok
{
  "id": "file_8c21aa04",
  "object": "file",
  "filename": "invoice-march.pdf",
  "status": "processed",
  "extracted": { "pages": 2, "tables": 1, "graph_items": 14 }
}

[ 03 ]delete/v1/files/:id

DELETE/v1/files/:id

Delete the file and every graph item extracted from it. Audit-log entries are retained.

paramtypereqdescription
idstringrequiredFile identifier. Path parameter.
[ response ]200 ok
{
  "id": "file_8c21aa04",
  "object": "file",
  "deleted": true,
  "graph_items_removed": 14
}

More resources