Skip to main content
 print this page

Get an upload URL or add files to a dataset

POST 

/ai/playground/files

action=save_to_dataset copies existing files into a dataset (owner on each source chat; DatasetId and Files required, max 5). Any other action value, or omitting action, returns a presigned PUT URL. Upload body requires FileName; optional ChatId (default global files, or global) or ProjectId (editor; max 10 project files; FileSize max 50 MB). Duplicate names get a (n) suffix.

Request

Responses

Upload URL returns PresignedURL. save_to_dataset returns Message with submitted/failed counts.

Response Headers
    Access-Control-Allow-Origin
    Access-Control-Allow-Methods
    Access-Control-Allow-Headers