POST /paas/v4/files

Changed on

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.

Request

  • Base URL
    https://api.z.ai/api
  • URL
    https://api.z.ai/api/paas/v4/files
  • Auth
    HTTP bearer

Request body multipart/form-data

purpose'user_data' | 'agent' required

Upload purpose

filestring binary required

File to upload. agent limit to 100MB, user_data limit to 1T. agent allowed formats: pdf, doc, xlsx, ppt, txt, jpg, png, user_data allowed formats: pptx, ppt, docx, doc, xlsx, xls, pdf.

Response

Processing successful

idstring

Unique identifier of the uploaded file.

objectstring

Object type.

bytesinteger

File size in bytes.

filenamestring

Name of the uploaded file.

purposestring

Purpose of the uploaded file.

created_atinteger

Timestamp of file creation.

Changes

    • info

      the request property default value changed from agent to user_data

    • info

      added the new user_data enum value to the request property