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.
预约演示登录免费开始
  • 使用 SDK
    • SDK 概述
    • SDK 如何工作
    • Quickstart
    • Customer showcase
  • 使用 SDK
    • 项目结构
    • 添加自定义代码
    • Migrating to Replay
    • 功能特性
  • 参考
      • Generating an SDK
      • 发布到 PyPI
      • Python 配置
      • 添加自定义代码
      • 动态身份验证
      • aiohttp 支持
      • 变更日志
      • Customer showcase
  • 资源
    • generators.yml
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
预约演示登录免费开始
参考Python

Changelog

February 5, 2026
February 5, 2026
此页面是否有帮助?
编辑此页面
上一个

February 6, 2026

下一个

February 3, 2026

4.55.0

(feat): 添加对使用 OpenAPI 服务器变量的服务器 URL 模板的支持。这使得能够基于用户提供的配置在运行时动态构建基础 URL。

OpenAPI 定义示例:

1servers:
2 - url: https://api.{region}.{environment}.example.com/v1
3 variables:
4 region:
5 default: us-east-1
6 enum: [us-east-1, us-west-2, eu-west-1]
7 environment:
8 default: prod
9 enum: [prod, staging, dev]

生成的构造函数参数: 服务器变量作为可选构造函数参数暴露,带有其默认值:

  • region: typing.Optional[str] - 默认为 "us-east-1"
  • server_url_environment: typing.Optional[str] - 默认为 "prod"(添加前缀以避免遮蔽)

运行时 URL 插值: 当提供服务器变量时,SDK 执行运行时 URL 模板插值:

1from seed import SeedApi
2
3# 使用默认值:https://api.us-east-1.prod.example.com/v1
4client = SeedApi()
5
6# 自定义区域:https://api.eu-west-1.prod.example.com/v1
7client = SeedApi(region="eu-west-1")
8
9# 自定义区域和环境:https://api.us-west-2.staging.example.com/v1
10client = SeedApi(region="us-west-2", server_url_environment="staging")

多个基础 URL 环境: 对于具有多个基础 URL 的 API(如单独的 base 和 auth URL),每个 URL 模板都使用相同的服务器变量独立插值。

x-fern-default-url 扩展: 当在 OpenAPI 规范中存在时,此扩展指定应该使用哪个服务器 URL 作为默认环境,覆盖列表中的第一个服务器。

4.54.4

(fix): use_provided_defaults 配置选项不再对内联请求体属性应用默认值。