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.
Book a demoLog inStart for free
  • Overview
    • Introduction
    • How it works
    • Quickstart
    • Customer showcase
  • Working with SDKs
    • Project structure
    • Adding custom code
    • Migrating to Replay
    • Capabilities
  • Generators
      • Generating an SDK
      • Publishing to PyPI
      • Configuration
      • Adding custom code
      • Dynamic authentication
      • aiohttp support
      • Changelog
      • Customer showcase
  • Reference
    • 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
Book a demoLog inStart for free
GeneratorsPython

Changelog

February 12, 2026
February 12, 2026
Was this page helpful?
Edit this page
Previous

February 13, 2026

Next

February 11, 2026

4.57.1

(fix): Only copy custom_pagination.py into generated SDKs when custom pagination endpoints are present, and only copy pagination.py when standard pagination endpoints are present.

4.57.0

(feat): Add custom_transport: true generator config option that exposes an http_client parameter on generated client constructors for custom httpx transport injection.

Primary use case: Enables PKCE (Proof Key for Code Exchange) OAuth flows and other authentication schemes that require request interception at the transport layer.

Configuration:

1generators:
2 - name: fernapi/fern-python-sdk
3 config:
4 custom_transport: true

Generated parameter types:

  • Sync client: http_client: typing.Optional[httpx.BaseTransport]
  • Async client: http_client: typing.Optional[httpx.AsyncBaseTransport]

Use cases:

  • PKCE OAuth authentication flows requiring code challenge/verifier injection
  • Custom request signing or authentication header manipulation
  • Request/response interception and modification
  • Mock transports for testing without network calls
  • Custom retry logic beyond the built-in exponential backoff

Example pattern (Twilio SDK style):

1# SDK developer provides a factory method in custom code
2class ValidationClient:
3 @classmethod
4 def create(cls, account_sid: str, auth_token: str) -> httpx.BaseTransport:
5 # Custom transport with PKCE or validation logic
6 return CustomValidationTransport(account_sid, auth_token)
7
8# End-user usage
9from myapi import MyClient, ValidationClient
10
11validation_transport = ValidationClient.create("account_sid", "auth_token")
12client = MyClient(http_client=validation_transport, base_url="https://api.example.com")

This feature allows SDK developers to defer transport-specific logic to custom code while the generator simply threads the transport through to httpx.Client/httpx.AsyncClient.