Membuat File
Mengunggah file
API Files memungkinkan Anda mengunggah dan mengelola file untuk digunakan dengan API Anthropic tanpa harus mengunggah ulang konten pada setiap permintaan. Untuk informasi lebih lanjut tentang API Files, lihat panduan pengembang untuk files.
API Files saat ini dalam tahap beta. Untuk menggunakan API Files, Anda perlu menyertakan header fitur beta: anthropic-beta: files-api-2025-04-14
.
Silakan hubungi kami melalui formulir umpan balik untuk berbagi pengalaman Anda dengan API Files.
Headers
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like beta1,beta2
or specify the header multiple times for each beta.
The version of the Anthropic API you want to use.
Read more about versioning and our version history here.
Body
The file to upload
Response
RFC 3339 datetime string representing when the file was created.
Original filename of the uploaded file.
1 - 500
Unique object identifier.
The format and length of IDs may change over time.
MIME type of the file.
1 - 255
Size of the file in bytes.
x >= 0
Object type.
For files, this is always "file"
.
file
Whether the file can be downloaded.