Upload File
beta.files.upload(**kwargs) -> FileMetadata { id, created_at, filename, 4 more }
/v1/files?beta=true
Upload File
Parameters
file: String
The file to upload
formatbinary
Returns
Upload File
Ruby
require "anthropic"
anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")
file_metadata = anthropic.beta.files.upload(file: Pathname(__FILE__))
puts(file_metadata){
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"filename": "x",
"mime_type": "x",
"size_bytes": 0,
"type": "file",
"downloadable": true
}Returns Examples
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"filename": "x",
"mime_type": "x",
"size_bytes": 0,
"type": "file",
"downloadable": true
}