Skip to main content
POST
/
v0
/
files
/
{id}
/
extract
curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/extract \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "content": "Annual Report 2026\n\nExecutive Summary\nThis report covers the fiscal year...",
  "mime_type": "text/plain"
}
Extracts text content from files with supported MIME types including text/*, application/json, and text/csv.

Path Parameters

id
string
required
The unique identifier of the file to extract content from.
curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/extract \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "content": "Annual Report 2026\n\nExecutive Summary\nThis report covers the fiscal year...",
  "mime_type": "text/plain"
}
{
  "content": {
    "name": "config",
    "version": "1.0",
    "settings": { "debug": false }
  },
  "mime_type": "application/json"
}

Response

content
string | object
The extracted content. Returns a string for text files and a parsed object for JSON files.
mime_type
string
The MIME type of the extracted content.