Skip to main content
PUT
Upload a File

Overview

Uploads a file’s raw bytes. The returned object_uri is what you pass to Ingest File as uri, or to Chat (Streaming) as an attachment’s image. There’s no size limit on this route. For small files, you can skip it and send the file to Ingest File inline as content_b64.
Requires a key that isn’t read-only. Member keys can’t upload.

Authorization

string
required
Your Composer API key

Path

string
required
The file’s name, such as menu.pdf.

Body

The file’s raw bytes.

Response

string
Where the file is stored. Pass it to Ingest File as uri.
integer
The file’s size.

Example cURL

cURL
Then ingest it:
cURL

Error Codes