v4
latestOpenAPI 3.1.02026-08-0143190206.8 KBv1
Upload a file to xAI's storage. Returns the file's metadata. Files can be referenced by ID anywhere a `file_id` is accepted (e.g. chat attachments). Maximum file size: 50 MB. Files are kept until you delete them, or until `expires_after` elapses if set at upload time.
post/v1/files
Response
Success