For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
预约演示登录免费开始
  • 概览
    • 什么是 API 定义?
    • 项目结构
      • 概览
      • 身份验证
      • 类型
        • 概览
        • HTTP JSON 端点
        • 多部分表单上传
        • 字节
        • 服务器发送事件
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
预约演示登录免费开始
在本页
  • 文件列表
Fern 定义端点

多部分文件上传

||以 Markdown 格式查看|
此页面是否有帮助?
在仪表板中编辑
上一个

HTTP JSON 端点

下一个

二进制数据和文件

Fern 中的端点定义在 endpoints 键下。如果您的端点请求包含文件上传,您可以使用 file 类型来指示请求是 multiform 内容类型。下面的示例演示了一个在请求体中包含文件的端点。

document.yml
1service:
2 base-path: /documents
3 auth: false
4 endpoints:
5 uploadDocument:
6 path: /upload
7 method: POST
8 request:
9 name: UploadDocumentRequest
10 body:
11 properties:
12 file: file

在给定的多部分请求中,带有 format:binary 的字符串参数将表示任意文件。

文件列表

如果您的端点支持文件列表,那么您的请求体必须指明这一点。

document.yml
1service:
2 base-path: /documents
3 auth: false
4 endpoints:
5 uploadDocuments:
6 path: /upload
7 method: POST
8 request:
9 name: UploadDocumentsRequest
10 body:
11 properties:
12 files: list<file>