> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# MiniMax API

> 1 つの BeatAPI キーで MiniMax M3 を呼び出せます。512K を境に変わる長いコンテキストの料金も説明します。

# MiniMax API

MiniMax のテキストモデル 1 種を、標準の Text API パススルーで利用できます。Video API を使用する MiniMax H3 動画モデルとは別のモデルです。Text API が対応する 4 つすべてのリクエスト形式で呼び出せます。

| モデル          | 適した用途                                   |
| ------------ | --------------------------------------- |
| `MiniMax-M3` | テキスト・画像・動画入力に対応し、最大 1M トークンのコンテキストを利用可能 |

## OpenAI Chat Completions

`POST https://api.beatapi.io/v1/chat/completions`

```typescript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.BEATAPI_API_KEY,
  baseURL: "https://api.beatapi.io/v1"
});

const completion = await client.chat.completions.create({
  model: "MiniMax-M3",
  max_tokens: 2000,
  messages: [
    { role: "user", content: "Given this changelog, draft release notes grouped by user-visible impact." }
  ]
});

console.log(completion.choices[0].message.content);
```

```bash
curl --request POST \
  --url https://api.beatapi.io/v1/chat/completions \
  --header 'Authorization: Bearer <BEATAPI_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "MiniMax-M3",
  "messages": [
    {
      "role": "user",
      "content": "Given this changelog, draft release notes grouped by user-visible impact."
    }
  ]
}'
```

## 長いコンテキストの料金

`MiniMax-M3` はプロンプトが **512,000 トークン**を超えると上位の料金に切り替わり、リクエスト全体に適用されます。入力、キャッシュ入力、出力がすべて 2 倍になります。段階的に増えるのではなく、しきい値を 1 トークンでも超えると、リクエスト全体に上位の料金が適用されます。

モデル名は大文字と小文字を区別します。`minimax-m3` ではなく、`MiniMax-M3` を指定してください。

## その他の SDK 形式

同じモデルを `/v1/responses`、`/v1/messages`、Gemini 互換エンドポイントでも利用できます。各形式のリクエストとレスポンスの構造はテキストモデル間で共通のため、[Text API](/text-api) ページでまとめて説明しています。

## 認証と利用可能なモデル

このページの全モデルを 1 つの BeatAPI キーで利用できます。ベンダーごとのキー、ベース URL、個別の登録は不要です。`https://api.beatapi.io` へのリクエストに `Authorization: Bearer <BEATAPI_API_KEY>` を付けてください。