Claude Platform Docs

Dateien

Datei hochladen
$client->files->upload(string file, ?int expiresInSeconds, ?string workspaceID): FileMetadata
POST/v1/files
Dateien auflisten
$client->files->list(?list<string> ids, ?int limit, ?string page, ?string workspaceID): PageCursor<FileMetadata>
GET/v1/files
Datei herunterladen
$client->files->download(string fileID, ?string workspaceID): download
GET/v1/files/{file_id}/content
Dateimetadaten abrufen
$client->files->retrieveMetadata(string fileID, ?string workspaceID): FileMetadata
GET/v1/files/{file_id}
Datei löschen
$client->files->delete(string fileID, ?string workspaceID): DeletedFile
DELETE/v1/files/{file_id}
Models
class DeletedFile { $type; $id; }
?Type type

Deleted object type.

For file deletion, this is always "file_deleted".

string id

ID of the deleted file.

class FileMetadata { $type = 'file'; $id; $createdAt; /* 5 more */ }
"file" type

Object type.

For files, this is always "file".

string id

Unique object identifier.

The format and length of IDs may change over time.

\Datetime createdAt

RFC 3339 datetime string representing when the file was created.

string filename

Original filename of the uploaded file.

string mimeType

MIME type of the file.

int sizeBytes

Size of the file in bytes.

?bool downloadable

Whether the file can be downloaded.

?\Datetime expiresAt

RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with expires_in_seconds, this is the upload time plus that value.