Claude Platform Docs

파일

파일 업로드
$client->files->upload(string file, ?int expiresInSeconds, ?string workspaceID): FileMetadata
POST/v1/files
파일 목록 조회
$client->files->list(?list<string> ids, ?int limit, ?string page, ?string workspaceID): PageCursor<FileMetadata>
GET/v1/files
파일 다운로드
$client->files->download(string fileID, ?string workspaceID): download
GET/v1/files/{file_id}/content
파일 메타데이터 조회
$client->files->retrieveMetadata(string fileID, ?string workspaceID): FileMetadata
GET/v1/files/{file_id}
파일 삭제
$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.