Skip to main content

Create file

POST 

/v1/files

Upload an image, a video or an audio clip (MP3, WAV, M4A or AAC) in one step: POST its bytes as multipart/form-data (the file field). The server sniffs the real type from the bytes (not the declared content-type), enforces the per-type size ceiling, stores it, and returns the stored file — attach an image or a video to a message later by its id, or pass any of them to a generation as input. The file expires at its expires_at unless it is sent in a message or used by a generation first.

Request​

Responses​

Successful Response