POST
/
files
curl --request POST \
  --url https://api.openai.com/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form purpose=assistants
{
  "id": "<string>",
  "bytes": 123,
  "created_at": 123,
  "expires_at": 123,
  "filename": "<string>",
  "object": "file",
  "purpose": "assistants",
  "status": "uploaded",
  "status_details": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data

Response

200 - application/json

OK

The File object represents a document that has been uploaded to OpenAI.