> This page is for SDK, version Legacy.
> For other versions, use one of these documentation indexes:
> - Current (default): https://buildwithfern.com/learn/sdks/current/llms.txt
> - Legacy: https://buildwithfern.com/learn/sdks/legacy/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

# Filter your endpoints (audiences)

> Learn how to filter API endpoints using audiences in Fern SDKs. Generate tailored client libraries for internal teams, beta testers, and customers.

> **You're viewing the legacy SDK docs**
>
> These pages cover SDK generation configured with `generators.yml`. New projects use `sdk-config.yml`, so see [the Current version of this page](/learn/sdks/deep-dives/audiences) for up-to-date guidance. To move an existing project, follow the [SDK Config migration guide](/learn/sdks/legacy/generators/migration-guides/sdk-config), which walks through `fern sdk migrate`, and review the [`sdk-config.yml` reference](/learn/sdks/reference/sdk-config).

> **Enterprise feature**
>
> This feature is available only for the [Enterprise plan](https://buildwithfern.com/pricing). To get started, reach out to [support@buildwithfern.com](mailto:support@buildwithfern.com).

Use audiences to generate tailored SDKs for different groups of API consumers, such as internal teams, beta testers, or customers. Tag API elements with an audience in your spec, then filter each SDK group to the audiences you want in `generators.yml`.

> **Info**
>
> For OpenAPI, you can also [filter by URL path](/learn/api-definitions/openapi/extensions/audiences#path-based-filtering) instead of by tag.

#### Tag elements in your spec

Tag endpoints, schemas, and properties with [`x-fern-audiences`](/learn/api-definitions/openapi/extensions/audiences). Here, an `internalNotes` property is tagged `internal`:

**`openapi.yml`**

```yaml title="openapi.yml" {7-8}
components:
  schemas:
    Plant:
      properties:
        internalNotes:
          type: string
          x-fern-audiences:
            - internal
```

#### Filter your SDKs

Set the [`audiences` field](/learn/sdks/legacy/reference/generators-yml#audiences) on an SDK group in `generators.yml`. The following group generates only elements tagged `public`:

**`generators.yml`**

```yaml title="generators.yml" {3-4}
groups:
  sdks:
    audiences:
      - public
    generators:
      - name: fern-typescript-sdk
        version: 0.8.8
```

Elements tagged with a matching audience are included, and elements tagged only with other audiences are dropped. Untagged elements aren't scoped to any audience, so they're always included. If you don't set `audiences`, every element is included regardless of its tags.