# Display HTTP snippets

> Enable HTTP code examples using cURL, Python requests, TypeScript fetch, and more from the request examples documented in your API definition.

HTTP snippets show API request examples using common HTTP clients like cURL, Python's `requests` library, and TypeScript's `fetch` API. These are generic code examples that demonstrate how to call your API directly, without using an SDK.

If you configure [SDK snippets](/learn/docs/api-references/sdk-snippets), those are shown by default. Otherwise, HTTP snippets display automatically in your API Reference language dropdown. See [Hume's API Reference](https://dev.hume.ai/reference/voices/create) for an example.

<Frame caption="Snippets automatically include authentication headers, query parameters, request body formatting, and content type headers.">
  ![HTTP code snippet selector](https://files.buildwithfern.com/fern.docs.buildwithfern.com/learn/5ba6ae76c31b3ee1f8691b00eb0676903db6541d493f42277db846fccad4b230/products/docs/pages/api-references/http-snippets.png)
</Frame>

## Configuration

<Steps>
  <Step title="Add request examples to your API definition">
    HTTP snippets are generated from request examples in your API definition:

    * For Fern Definition, follow the [examples documentation](/learn/api-definition/fern/examples)
    * For OpenAPI, follow the [request/response examples documentation](/learn/api-definition/openapi/extensions/others#request--response-examples)
  </Step>

  <Step title="Choose which languages to display">
    To show only specific languages in the HTTP snippet selector (in addition to cURL), list them in `docs.yml`. Supported values: `csharp`, `curl`, `dotnet`, `go`, `java`, `python`, `ruby`, `typescript`.

    <CodeBlock title="docs.yml">
      ```yaml
      settings:
        http-snippets:
          - python
          - ruby
      ```
    </CodeBlock>

    <Tip>
      Fern development work is driven by customer requests. Request support for languages not listed here by [opening an issue](https://github.com/fern-api/fern/issues/new/choose).
    </Tip>
  </Step>
</Steps>

## Additional options

### Set default snippet language

Use the `default-language` key at the top indentation level of `docs.yml`. This setting applies to both HTTP snippets and SDK snippets.

<CodeBlock title="docs.yml">
  ```yaml {1}
  default-language: python

  navigation:
    - api: API Reference
  ```
</CodeBlock>

### Disable the language dropdown

To disable the HTTP snippet language dropdown and show only cURL examples, set `http-snippets` to `false`:

<CodeBlock title="docs.yml">
  ```yaml
  settings:
    http-snippets: false
  ```
</CodeBlock>

This removes all HTTP snippet languages except cURL from the selector. cURL is always displayed and can't be removed via `docs.yml` configuration. To hide cURL, [use custom CSS](/docs/customization/custom-css-js#custom-css).