> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-cbfron-1772840960-d2a2597.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fireworks AI integrations

> Integrate with Fireworks AI using LangChain Python.

> [Fireworks AI](https://fireworks.ai) is a generative AI inference platform to run and
> customize models with industry-leading speed and production-readiness.

## Installation and setup

* Install the Fireworks integration package.

  ```bash theme={null}
  pip install langchain-fireworks
  ```

* Get a Fireworks API key by signing up at [fireworks.ai](https://fireworks.ai).

* Authenticate by setting the FIREWORKS\_API\_KEY environment variable.

### Authentication

There are two ways to authenticate using your Fireworks API key:

1. Setting the `FIREWORKS_API_KEY` environment variable.

   ```python theme={null}
   os.environ["FIREWORKS_API_KEY"] = "<KEY>"
   ```

2. Setting `api_key` field in the Fireworks LLM module.

   ```python theme={null}
   llm = Fireworks(api_key="<KEY>")
   ```

## Chat models

See a [usage example](/oss/python/integrations/chat/fireworks).

```python theme={null}
from langchain_fireworks import ChatFireworks
```

## LLMs

See a [usage example](/oss/python/integrations/llms/fireworks).

```python theme={null}
from langchain_fireworks import Fireworks
```

## Embedding models

See a [usage example](/oss/python/integrations/text_embedding/fireworks).

```python theme={null}
from langchain_fireworks import FireworksEmbeddings
```

***

<div className="source-links">
  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/oss/python/integrations/providers/fireworks.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>

  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>
</div>
