Skip to main content


You can use models provided by Fireworks AI as follows:

npm install @langchain/community

We're unifying model params across all packages. We now suggest using model instead of modelName, and apiKey for API keys.

import { ChatFireworks } from "@langchain/community/chat_models/fireworks";

const model = new ChatFireworks({
temperature: 0.9,
// In Node.js defaults to process.env.FIREWORKS_API_KEY
apiKey: "YOUR-API-KEY",

API Reference:

Behind the scenes, Fireworks AI uses the OpenAI SDK and OpenAI compatible API, with some caveats:

  • Certain properties are not supported by the Fireworks API, see here.
  • Generation using multiple prompts is not supported.

Was this page helpful?

You can also leave detailed feedback on GitHub.