Skip to main content
POST
/
v1
/
files
Upload File
curl --request POST \
  --url https://api.shuyou.ai/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form purpose=assistants
{
  "id": "file_abc123",
  "object": "file",
  "bytes": 120000,
  "created_at": 1677610602,
  "filename": "document.pdf",
  "purpose": "assistants",
  "status": "processed"
}

Authorizations

Authorization
string
header
required

Authorization: Bearer YOUR_API_KEY

Body

multipart/form-data
file
file
required

File to upload (PDF, images, etc. depending on purpose and model support)

purpose
enum<string>
required

Intended use of the file

Available options:
assistants,
batch,
fine-tune,
vision,
user_data
Example:

"assistants"

Response

File uploaded

id
string
Example:

"file_abc123"

object
string
Example:

"file"

bytes
integer
Example:

120000

created_at
integer
Example:

1677610602

filename
string
Example:

"document.pdf"

purpose
string
Example:

"assistants"

status
string
Example:

"processed"