🚀 GLM Coding Plan — built for devs: 3× usage, 1/7 cost • Limited-Time Offer ➞
cURL
curl --request POST \ --url https://api.z.ai/api/paas/v4/files \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form purpose=agent \ --form file='@example-file'
{ "id": "<string>", "object": "<string>", "bytes": 123, "filename": "<string>", "purpose": "<string>", "created_at": 123 }
This API is designed for uploading auxiliary files (such as glossaries, terminology lists) to support the translation service. It allows users to upload reference materials that can enhance translation accuracy and consistency.
Use the following format for authentication: Bearer
Upload purpose (agent)
agent
File to upload. Limit to 100MB. Allowed formats: pdf, doc, xlsx, ppt, txt, jpg, png.
100MB
pdf
doc
xlsx
ppt
txt
jpg
png
Processing successful
Unique identifier of the uploaded file.
Object type.
File size in bytes.
Name of the uploaded file.
Purpose of the uploaded file.
Timestamp of file creation.
Was this page helpful?