# SDK Overview

> Python, TypeScript and Go side by side: packages and minimum versions, the constructor options under each language's names, and where each client hangs the shared resources.

Source: https://docs.levelfour.ai/sdks


Python, TypeScript and Go, each generated from the same OpenAPI specification with [Fern](https://buildwithfern.com). Method and option names follow the conventions of the language you are working in. The API underneath is the same one.

| SDK                            | Package                               | Min Version  |
| ------------------------------ | ------------------------------------- | ------------ |
| [Python](/sdks/python)         | `levelfour`                           | Python 3.11+ |
| [TypeScript](/sdks/typescript) | `levelfour`                           | Node.js 22+  |
| [Go](/sdks/go)                 | `github.com/LevelFourAI/levelfour-go` | Go 1.24+     |

> **Tip**
>
> Working in another language? The SDKs sit on the same REST API. [API reference](/api-reference) has the endpoints, and [`l4 api`](/cli/commands/api) sends an authenticated request to any of them from a shell.

The behavior all three share lives on the page that owns it:

* The API key goes in the constructor, and falls back to the `LEVELFOUR_API_KEY` environment variable when you leave it out. [Authentication](/authentication) has key formats, scopes and rotation.
* A typed error hierarchy maps HTTP status codes to specific exception classes. [Error handling](/error-handling) has the status table, and the failures each client retries before you ever see them.
* Auto-pagination iterators walk large result sets. [Pagination](/pagination) has the response envelope and the iteration forms.
* Webhook signature verification using HMAC-SHA256 (Standard Webhooks). [Webhooks](/webhooks) has the header contract, the algorithm and the timestamp tolerance.

## Constructor options

The same settings in every SDK, under each language's own name.

| Option      | Python        | TypeScript         | Go                           | Default                     |
| ----------- | ------------- | ------------------ | ---------------------------- | --------------------------- |
| API Key     | `api_key`     | `apiKey`           | 1st positional arg           | `LEVELFOUR_API_KEY` env var |
| Base URL    | `base_url`    | `baseURL`          | `levelfour.WithBaseURL()`    | `https://api.levelfour.ai`  |
| Timeout     | `timeout`     | `timeoutInSeconds` | `levelfour.WithHTTPClient()` | 30s                         |
| Max Retries | `max_retries` | `maxRetries`       | `levelfour.WithMaxRetries()` | 2                           |
| HTTP Client | `http_client` | `fetch`            | `levelfour.WithHTTPClient()` | Built-in                    |

> **Note**
>
> Go has no standalone timeout option, which is why two rows name the same function. Set `Timeout` on the `http.Client` you hand to `levelfour.WithHTTPClient()`. The [Go SDK](/sdks/go) page has the example.

## Sub-clients

Each client hangs the resources off a sub-client. The names follow the language.

| Sub-Client               | Python                         | TypeScript                     | Go                             |
| ------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
| Recommendations          | `client.recommendations`       | `client.recommendations`       | `client.Recommendations`       |
| Recommendations Audit    | `client.recommendations.audit` | `client.recommendations.audit` | `client.Recommendations.Audit` |
| Costs                    | `client.costs`                 | `client.costs`                 | `client.Costs`                 |
| Providers                | `client.providers`             | `client.providers`             | `client.Providers`             |
| Webhooks                 | `client.webhooks`              | `client.webhooks`              | `client.Webhooks`              |
| Auth                     | `client.auth`                  | `client.auth`                  | `client.Auth`                  |
| Cost alerts              | `client.cost_alerts`           | `client.costAlerts`            | `client.CostAlerts`            |
| Realized savings detail  | -                              | -                              | `client.Audit`                 |
| Commitments              | -                              | -                              | `client.Commitments`           |
| Google Cloud             | -                              | -                              | `client.GoogleCloud`           |
| Tags                     | -                              | -                              | `client.Tags`                  |
| Cost views               | -                              | -                              | `client.CostViews`             |
| Anomalies                | -                              | -                              | `client.Anomalies`             |
| Accounts                 | -                              | -                              | `client.Accounts`              |
| Integrations             | -                              | -                              | `client.Integrations`          |
| Automated Savings grants | -                              | -                              | `client.SavingsGrants`         |
| Repository binding       | -                              | -                              | `client.RepoBinding`           |

A row with only a Go name is in the Go SDK today. Every one of them is also plain REST, so any language reaches it through the [API reference](/api-reference).

API keys are created and rotated in the dashboard, not through an SDK. [API keys](/account/api-keys) has the steps.

## Next

* [Python](/sdks/python), [TypeScript](/sdks/typescript) and [Go](/sdks/go) each carry the install command, the full constructor and the per-request options
* [API Quickstart](/api-quickstart) is install, key, first call
* [Resources](/resources) is every method with its parameters and response shapes, in Python, TypeScript and Go
* [API reference](/api-reference) is the REST surface the clients are generated from
* [CLI](/cli) is the same data from the terminal
