> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. # Configure global headers > Learn how to configure global headers in Fern SDKs. Set up API headers once as constructor parameters for automatic inclusion in all requests. If your API requires certain headers on every request (or most requests), you can configure them as **global headers**. Fern will generate an SDK that accepts these headers once in the client constructor and automatically includes them in all API calls. ## Generated SDK behavior Once you configure a global header, Fern generates an SDK that accepts the header value as a constructor parameter: ```python import os class Client: def __init__(self, *, apiKey: str): ``` SDK users provide the value once, and the generated SDK automatically includes the header in all requests. ## Setting up global headers Fern automatically identifies headers used in every request, or the majority of requests, and marks them as global. You can manually configure additional global headers in your API definition: **`openapi.yml`** ```yaml title="openapi.yml" x-fern-global-headers: - header: custom_api_key name: api_key - header: userpool_id optional: true ``` You can also pin a [default value](/learn/api-definitions/openapi/extensions/default-values) on a global header so the SDK sends it automatically when the caller doesn't provide one. For full configuration details, see [Global headers in OpenAPI](/learn/api-definitions/openapi/extensions/global-headers). > Learn how to configure global headers in Fern SDKs. Set up API headers once as constructor parameters for automatic inclusion in all requests.