简体中文
cURL
curl --request POST \ --url https://geekai.co/api/v1/files \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file='@example-file' \ --form purpose=file-extract \ --form format=text
{ "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "name": "<string>", "status": "pending", "size": 123, "type": "<string>", "md5": "<string>", "content": "<string>" }
上传并处理各种格式的文件,支持文本提取、格式转换等功能。
curl --location --request POST 'https://geekai.co/api/v1/files' \ --header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \ --form 'file=@"/E:/文档/geekai/test.pdf"'
API认证token
上传的文件,目前支持PDF/DOCX/XLSX/PPTX/PNG/JPG/JPEG/CSV/TXT/MD/MP3/MP4等格式
"@/E:/文档/test.pdf"
上传目的,目前仅支持文件提取
"file-extract"
返回文件内容格式,目前仅支持文本格式
"text"
成功响应
文件唯一ID,可通过该ID获取文件内容
文件名称
文件状态: pending(待处理)/reading(读取中)/failed(读取失败)/done(已读取)
pending
reading
processing
failed
done
文件大小
文件MIME类型
文件MD5值
文件内容(只有status=done时,才会填充该字段)
此页面对您有帮助吗?