v2
latestOpenAPI 3.1.02026-08-06276982.8 KBfiles
Create or overwrite file
Create a non-empty file or overwrite an existing file.
If the parent folder of the path parameter doesn't exist, the file system creates it before creating the file.
<Info>This acts on files in the AI Hub filesystem, not your local filesystem.</Info>
<Note>Ensure the path is accessible within the context defined by the IB-Context header.</Note>
Not all filesystem types support this operation.
| Filesystem | Supported |
|---|---|
| Instabase | ✓ |
| Amazon S3 | ✓ |
| Azure Blob Storage | ✓ |
| Google Cloud Storage | ✓ |
| Google Drive | - |
put/v2/files/{path}
Path parameters
pathstring required
Full path to the file.
Headers
Authorizationstring required
Bearer HTTP authentication.
IB-Contextstring
Typically your organization ID. See Authorization and context identification for details.
Response
The request succeeded and a new file was created at the target location. AI Hub returns this status code only when the request includes an If-None-Match header with a value of *.
FilesWriteFileResponse201 required
Empty response body