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 purpose=retrieval \
  --form file=@example-file
{
  "_id": "<string>",
  "object_name": "<string>",
  "purpose": "retrieval",
  "bytes": 123,
  "file_name": "<string>",
  "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created": "2025-10-30T20:19:21.967Z"
}

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
object_name
string
required

path to the file in the storage

purpose
enum<string>
required

The intended purpose of the uploaded file.

Available options:
retrieval,
knowledge_datasource,
batch
bytes
number
required
file_name
string
required
workspace_id
string<uuid>
required

The id of the resource

created
string<date-time>
default:2025-10-30T20:19:21.967Z

The date and time the resource was created