Skip to main content
POST
/
v2
/
files
Create file
curl --request POST \
  --url https://api.orq.ai/v2/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form purpose=retrieval
{
  "_id": "<string>",
  "bytes": 123,
  "created": "<string>",
  "file_name": "<string>",
  "purpose": "<string>",
  "workspace_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
file
file
required

The file to be uploaded.

purpose
enum<string>
default:retrieval

The intended purpose of the uploaded file.

Available options:
retrieval,
knowledge_datasource,
batch

Response

File uploaded successfully

_id
string
required
bytes
integer<int64>
required
created
string
required
file_name
string
required
purpose
string
required
workspace_id
string
required