SDK user features

Fern-generated SDKs provide a consistent set of features across all languages to help developers interact with your API. Usage information is auto-generated in your SDK’s README.md, which you can customize.

For a complete example of a generated SDK README, see Intercom’s Python SDK.

Installation and basic usage

Users install SDKs using standard package managers (npm for TypeScript, pip for Python, Maven/Gradle for Java, etc.) from language-specific registries.

Users initialize the client with your API’s base URL and any required authentication, then call methods on the client to interact with your API. Generated SDKs support modern runtimes across languages.

Reference

The README.md file links to an auto-generated reference.md file (example) that lists all available API methods organized by resource, including method signatures with parameter types, usage examples, and request/response structures for each endpoint.

Error handling

When the API returns a 4xx or 5xx status code, the SDK throws an error that includes the status code, error message, response body, and raw response object.

Customization options

Your SDK users can configure individual requests using language-specific options:

OptionDescriptionAvailability
TimeoutsConfigure request timeouts (default: 30 seconds for C# and PHP, 60 seconds for all other languages)All languages
RetriesConfigure maximum retries (default: 2 with exponential backoff for 408, 429, and 5xx responses)All languages except Ruby and Swift
Custom HTTP clientOverride the default HTTP client for unsupported environments or custom requirementsTypeScript, Python, Java, PHP, and Swift
Custom headersSend additional headers with any requestTypeScript, Java, and Swift
Raw response dataAccess response headers alongside parsed dataTypeScript, Python, and Go
Query parametersAdd extra query string parametersTypeScript and Swift
Abort signalsCancel in-flight requestsTypeScript only