# The SDK generator for your API Generate idiomatic SDKs in 9 languages from one OpenAPI spec. Retries, pagination, and tests come built in, and Fern publishes to every registry on autopilot. Shipping production SDKs with Fern: Square, Auth0, ElevenLabs, Adobe, Twilio, Samsara. Works with OpenAPI, AsyncAPI, OpenRPC, and gRPC. ## Why teams generate SDKs with Fern - **Open source generators.** Every generator is Apache-2.0 licensed on GitHub. Fork it, audit it, or self-host the whole pipeline. You pay Fern for hosted CI, registry publishing, and dedicated SDK engineers. - **Idiomatic in every language.** Each SDK reads like a language expert wrote it, with native naming, strong types, inline documentation, and error handling that matches the language. - **Published on autopilot.** Fern detects spec changes, regenerates the SDKs, versions them semantically, and publishes to npm, PyPI, Maven, and more with no manual release step. ## An SDK generator for every language | Language | Published to | |---|---| | TypeScript | npm | | Python | PyPI | | Go | Go modules | | Java | Maven Central | | C# | NuGet | | PHP | Packagist | | Ruby | RubyGems | | Swift | Swift Package Manager | | Rust | crates.io | ## What every generated SDK includes - **REST, WebSockets, and gRPC from one spec.** Generate multi-protocol clients from a single source, with typed streaming helpers for SSE and WebSockets. - **Reliable by default.** Retries with exponential backoff, idempotency keys, and first-class pagination ship on by default. - **Tested before you ship.** Unit tests, mock-server wire tests, and integration tests are generated with every SDK. - **Docs and snippets from the same spec.** Reference docs and always-accurate code snippets generate from the same source, so they never drift from the SDK. - **Runs in your CI, not a dashboard.** Generation lives in a fern/ directory. CI opens a pull request with updated SDKs on every spec change. `fern generate --local` keeps the whole pipeline on your own infrastructure. ## What Merge's CTO says > We used an alternative SDK generator, OpenAPI Generator, for years, and customers constantly complained. Since adopting Fern, customers have migrated rapidly to our new SDKs and have been blown away by the quality. > > — Gil Feig, CTO, Merge ## From your API to published SDKs 1. **Import your spec.** Bring OpenAPI, AsyncAPI, OpenRPC, gRPC, or the Fern Definition. Merge multiple specs into one SDK. 2. **Pick your languages.** Choose from TypeScript, Python, Go, Java, C#, PHP, Ruby, Swift, and Rust. 3. **Add custom code.** Extend the generated client with helpers and logic. Your changes survive every regeneration. 4. **Publish everywhere.** Fern versions and publishes to each registry on every spec change, all on autopilot. ## Common questions about SDK generation **What is an SDK generator?** An SDK generator turns your API specification into client libraries that developers install and call. Fern generates idiomatic SDKs in 9 languages from a single OpenAPI, AsyncAPI, gRPC, or Fern Definition source. **How do I generate an SDK from my API?** Point Fern at your OpenAPI spec, pick your languages, and run `fern generate`. Fern produces a typed client, tests, and a README, then publishes to each package registry. **Which languages does Fern support?** TypeScript, Python, Go, Java, C#, PHP, Ruby, Swift, and Rust. Each SDK follows that language's idioms and publishes to its native registry. **What makes a generated SDK idiomatic?** Each SDK reads like a language expert wrote it: native naming conventions, strong types, discriminated unions, inline documentation, and error handling that matches the language. **Do the generated SDKs handle retries and pagination?** Yes. Retries with exponential backoff, idempotency keys, and first-class pagination are on by default. **Are the generators open source?** Yes. Every generator is Apache-2.0 licensed on GitHub. Fork, audit, or self-host the entire pipeline. **Can I customize the generated code?** Yes. Custom code survives regeneration, and OpenAPI overrides and overlays refine the output without forking your spec. Method and resource names are fully configurable. **Does generation run in CI?** Yes. Generation lives in a fern/ directory and runs in CI, opening a pull request with updated SDKs on every spec change. **What spec formats does Fern support?** OpenAPI 3.1, AsyncAPI, OpenRPC, and gRPC as first-class inputs, plus the native Fern Definition. Multiple specs merge into a single SDK. ## Get started - Book a demo: - Explore every SDK capability: