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"
}
Files
Extract File Content
Extract text content from supported file types.
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
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
string | object
The extracted content. Returns a string for text files and a parsed object for JSON files.
string
The MIME type of the extracted content.
