Files
You can use the files endpoint to upload files directly to Chariot using a pre-signed URL. Chariot uses Amazon S3 to securely store your files so you don't have to manage storage in your own application.
Alternatively, if you want to host your files elsewhere, you can provide your own file URLs via the content
parameter when adding a source.
If you don't need to upload files programmatically, you can upload your files in the Chariot dashboard.
We currently support the following file types (more coming soon):
.pdf
.doc
.docx
.ppt
.pptx
.md
.json
.eml
.html
.txt
The file object
- Name
id
- Type
- string
- Description
Unique identifier for the file.
- Name
name
- Type
- string
- Description
Name of the file (includes file extension).
- Name
uploaded_at
- Type
- string
- Description
Timestamp of when the file was uploaded.
List files
Returns a list of all files uploaded for your account.
Request
curl https://api.chariotai.com/files \
-H "Authorization: Bearer {YOUR_API_KEY}"
Response
[
{
"id": "string",
"name": "string",
"uploaded_at": "2019-08-24T14:15:22Z"
}
]
Get pre-signed url
Generates a presigned Amazon S3 URL that can be used to upload a file. The URL expires after 15 minutes.
Returns an object containing the presigned_url
to use for uploading the file (see guide) and the file_id
that can be used to add the file as a source.
Request
curl https://api.chariotai.com/files/presigned-url \
-H "Authorization: Bearer {YOUR_API_KEY}"
Response
{
"file_id": "string",
"presigned_url": "string"
}