> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiIzNzliMjllMC1mMTEwLTRlNmQtYjQ2Mi0xODA5ZTAwYjg4NWYiLCJleHAiOjE3ODQxODg1MTMsImlhdCI6MTc4NDE4ODIxM30.D_IhDkhvibvkYJp7vySN8xGbxW5bzYpjkHcVcWTr7XI
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

# 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.

![HTTP code snippet selector](https://files.buildwithfern.com/fern.docs.buildwithfern.com/5ba6ae76c31b3ee1f8691b00eb0676903db6541d493f42277db846fccad4b230/products/docs/pages/api-references/assets/http-snippets.png)

## Configuration

HTTP snippets are generated from request examples in your API definition. For OpenAPI, follow the [request/response examples documentation](/learn/api-definitions/openapi/extensions/request-response-examples).

To show only specific languages in the HTTP snippet selector (in addition to cURL), list them in `docs.yml`. Supported values: `csharp`, `curl`, `go`, `java`, `javascript`, `php`, `python`, `ruby`, `swift`, `typescript`.

```yaml
settings:
  http-snippets:
    - python
    - ruby
```

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).

## 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.

```yaml {1}
default-language: python

navigation:
  - api: API Reference
```

### Disable the language dropdown

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

```yaml
settings:
  http-snippets: false
```

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).