POST
/
files
curl --request POST \
  --url https://geekai.co/api/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form purpose=file-extract \
  --form format=text
{
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "size": 123,
  "type": "<string>",
  "status": "pending",
  "md5": "<string>",
  "content": "<string>"
}

极客智坊提供了文件上传与内容提取功能,支持多种文件格式,包括.PDF .DOCX .DOC .XLS .XLSX .PPT .PPTX .PNG .JPG .JPEG .CSV .PY .TXT .MD .BMP .GIF等,你可以通过上传文件接口上传待识别文件,然后通过文件内容提取接口获取文件内容,借助该基础服务,你可以完成AI文件对话/RAG等上层业务场景的功能实现。

cURL 请求示例

curl --location --request POST 'https://geekai.co/api/v1/files' \

--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \

--form 'file=@"/E:/文档/geekai/test.pdf"'

Postman 请求响应示例

Authorizations

Authorization
string
header
required

JWT认证token

Body

multipart/form-data

Response

200
application/json

成功响应

The response is of type object.