> ## Documentation Index
> Fetch the complete documentation index at: https://fireworks.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Python SDK

> Overview of the Fireworks Python SDK, including installation, authentication, and calling chat and completion endpoints from a Python project.

The official Python SDK for the Fireworks AI API is available on [GitHub](https://github.com/fw-ai-external/python-sdk) and [PyPI](https://pypi.org/project/fireworks-ai/).

## Fireworks vs. OpenAI SDK

Fireworks is [OpenAI-compatible](https://fireworks.ai/docs/tools-sdks/openai-compatibility.md), so you can use the OpenAI SDK with Fireworks. The Fireworks SDK offers additional benefits:

* **Better concurrency defaults** — Optimized connection pooling for high-throughput workloads
* **Fireworks-exclusive features** — Access parameters and response fields not available in the OpenAI API
* **Platform automation** — Manage datasets, evals, training, and deployments programmatically

## Installation

Requires Python 3.9+ and an API key. See [Getting your API key](https://fireworks.ai/docs/api-reference/introduction.md#getting-your-api-key) for instructions.

```bash pip theme={null}
python -m pip install --upgrade fireworks-ai
```

```bash poetry theme={null}
poetry add fireworks-ai
```

```bash uv theme={null}
uv add fireworks-ai
```

For Training API recipes and utilities, install `fireworks-training-cookbook` on Python 3.11 or newer. See [Cookbook installation](https://fireworks.ai/docs/fine-tuning/training-api/cookbook/overview.md#installation) for PyPI releases and editable source checkouts. To use the Training API SDK directly, install `fireworks-ai[training]`.

For detailed usage instructions, see the
[README.md](https://github.com/fw-ai-external/python-sdk#readme). To quickly get
started with serverless, see our [Serverless
Quickstart](https://fireworks.ai/docs/getting-started/quickstart.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.