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

# Minimax integration

> Integrate with the Minimax embedding model using LangChain JavaScript.

The `MinimaxEmbeddings` class uses the Minimax API to generate embeddings for a given text.

# Setup

To use Minimax model, you'll need a Minimax account, an API key, and a Group ID.

# Usage

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { MinimaxEmbeddings } from "@langchain/classic/embeddings/minimax";

export const run = async () => {
  /* Embed queries */
  const embeddings = new MinimaxEmbeddings();
  const res = await embeddings.embedQuery("Hello world");
  console.log(res);
  /* Embed documents */
  const documentRes = await embeddings.embedDocuments([
    "Hello world",
    "Bye bye",
  ]);
  console.log({ documentRes });
};
```

## Related

* Embedding model [conceptual guide](/oss/javascript/integrations/embeddings)
* Embedding model [how-to guides](/oss/javascript/integrations/embeddings)

***

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

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