diff --git a/site/public/docs/groq.html b/site/public/docs/groq.html new file mode 100644 index 000000000..91b44052b --- /dev/null +++ b/site/public/docs/groq.html @@ -0,0 +1,268 @@ + + + + + +Groq in Claude Code and Codex: Groq's fast inference with one key · magpie + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

Docs · Guide

+

Groq in Claude Code, Codex and other agents

+

Groq runs open models on its own LPU chips and is known for speed. It serves OpenAI's gpt-oss and other makers' open models. magpie's groq preset brings it to Claude Code, Codex, OpenCode and other agents: one Groq key, with the model list Groq gives.

+

Add it

+
    +
  1. Get a key.Create an API key at console.groq.com/keys.
  2. +
  3. Add it.Pick Groq in the app and paste the key into API key, or from the CLI:
  4. +
+
Terminal
magpie provider add groq 
+magpie provider test groq
+

The preset points Chat Completions and Responses at https://api.groq.com/openai/v1, so there is no address to type. A Groq provider set up in OpenCode or another app becomes the groq preset when imported.

+

Use it in an agent

+

Model ids are groq/<Groq's model id>:

+
Terminal
magpie claude groq/openai/gpt-oss-120b
+magpie codex groq/openai/gpt-oss-120b
+

Claude Code and other Anthropic agents have their requests translated by magpie to Chat Completions for Groq: Groq's Chat API reports its cache, so Usage shows what was read from it.

+

Most of Groq's models are other makers', and models.dev lists them under Groq, so magpie doesn't take Groq's list as a maker's word on theirs.

+

Rate limits and context

+ +

Speech to text and text to speech

+

The gateway's /v1/audio/transcriptions and /v1/audio/speech take Groq too: the form and the audio go to Groq as sent, with only the model set to Groq's own id, and the answer comes back in Groq's own format. Text to speech works the same way, with model groq/playai-tts.

+
Terminal
curl http://127.0.0.1:3425/v1/audio/transcriptions \
+  -H 'Authorization: Bearer magpie' \
+  -F model=groq/whisper-large-v3 -F file=@meeting.m4a
+

Notes

+ + +

FAQ

+

Does magpie support Groq?

+

Yes, with the groq preset. Give a Groq API key; Chat Completions and Responses are set, the models come from Groq's list, and a model id is groq/.

+

Can Claude Code use Groq's models?

+

Yes. magpie translates Claude Code's Anthropic requests to Chat Completions for Groq, whose Chat API reports its cache, so Usage shows it.

+

What happens when Groq rate-limits me?

+

When Groq's 429 names the model, magpie rests only that model on that key and the others go on; in a routing group with other providers, the request goes to the next one.

+

Can I use Groq's Whisper?

+

Yes. Send an OpenAI-style form to magpie's /v1/audio/transcriptions with model groq/whisper-large-v3; text to speech goes to /v1/audio/speech.

+ +

Related: Mistral in Claude Code, Codex, Gemini CLI and OpenCode, OpenAI in Claude Code, Codex, Gemini CLI and OpenCode. If something fails, see Fixing common errors: 401, 429, 502, 504 and more or ask on Discord.

+
+
+ + + + + + + diff --git a/site/public/docs/ja/groq.html b/site/public/docs/ja/groq.html new file mode 100644 index 000000000..2c80822ea --- /dev/null +++ b/site/public/docs/ja/groq.html @@ -0,0 +1,268 @@ + + + + + +Groq を Claude Code・Codex で使う:1 つのキーで Groq の高速推論 · magpie + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+

ドキュメント · ガイド

+

Groq を Claude Code・Codex などのエージェントで使う

+

Groq は自社の LPU チップでオープンモデルを動かし、速さで知られています。OpenAI の gpt-oss やほかの提供元のオープンモデルがあります。magpie の groq プリセットは、それを Claude Code・Codex・OpenCode などにつなぎます。Groq のキー 1 つで、モデル一覧は Groq が返すものです。

+

追加する

+
    +
  1. キーを作る。console.groq.com/keys で API キーを作成します。
  2. +
  3. 追加する。アプリで Groq を選び、APIキー にキーを貼り付けるか、CLI で追加します。
  4. +
+
ターミナル
magpie provider add groq 
+magpie provider test groq
+

プリセットは Chat Completions と Responses を https://api.groq.com/openai/v1 に向けているので、アドレスの入力は不要です。OpenCode などで設定した Groq のプロバイダーも、取り込むと groq プリセットになります。

+

エージェントで使う

+

モデル ID は groq/<Groq のモデル ID> です。

+
ターミナル
magpie claude groq/openai/gpt-oss-120b
+magpie codex groq/openai/gpt-oss-120b
+

Claude Code など Anthropic のエージェントのリクエストは、magpie が Chat Completions に変換して Groq に送ります。Groq の Chat API はキャッシュを報告するので、使用量でキャッシュの読み込みが見えます。

+

Groq のモデルの多くはほかの提供元のもので、models.dev も Groq の下に載せています。そのため magpie は Groq の一覧を提供元自身の情報としては扱いません。

+

レート制限とコンテキスト

+ +

文字起こしと音声合成

+

ゲートウェイの /v1/audio/transcriptions と /v1/audio/speech も Groq に使えます。フォームと音声はそのまま Groq に送り、モデルだけを Groq 自身の ID にして、答えは Groq の形式のまま返します。音声合成も同様で、model は groq/playai-tts です。

+
ターミナル
curl http://127.0.0.1:3425/v1/audio/transcriptions \
+  -H 'Authorization: Bearer magpie' \
+  -F model=groq/whisper-large-v3 -F file=@meeting.m4a
+

補足

+ + +

よくある質問

+

magpie は Groq に対応していますか?

+

対応しています。groq プリセットに Groq の API キーを入れると、Chat Completions と Responses が設定され、モデルは Groq の一覧から取られます。モデル ID は groq/<モデル> です。

+

Claude Code で Groq のモデルを使えますか?

+

使えます。magpie が Claude Code の Anthropic リクエストを Chat Completions に変換して Groq に送り、Groq の Chat API がキャッシュを報告するので使用量に出ます。

+

Groq でレート制限されたら?

+

Groq の 429 がモデルを名指ししていれば、magpie はそのキーのそのモデルだけを休ませ、ほかのモデルは使い続けます。ルーティンググループにほかのプロバイダーがあれば次に回します。

+

Groq の Whisper は使えますか?

+

使えます。magpie の /v1/audio/transcriptions に OpenAI 形式のフォームを送り、model に groq/whisper-large-v3 を指定します。音声合成は /v1/audio/speech です。

+ +

関連ページ:Mistral を Claude Code・Codex・Gemini CLI・OpenCode で使う、OpenAI を Claude Code・Codex・Gemini CLI・OpenCode で使う。エラーが出たら よくあるエラーの直し方:401・429・502・504 など を見るか、Discord で質問してください。

+
+
+ + + + + + + diff --git a/site/public/docs/ja/mistral.html b/site/public/docs/ja/mistral.html index 3e2ce5176..efd840031 100644 --- a/site/public/docs/ja/mistral.html +++ b/site/public/docs/ja/mistral.html @@ -285,6 +285,8 @@ magpie provider fallback mistral deepseek/deepseek-v4-pro
  • キーの確認。magpie provider test mistral は各エンドポイントに、または指定した各モデルに小さなリクエストを送ります。--as codex や --as claude-code を付けると、そのツールと同じ形で送ります。
  • +

    Groq を Claude Code・Codex などのエージェントで使う

    +

    よくある質問

    Claude Code で Mistral を使うには?

    magpie に Mistral の API キーを追加し(プロバイダ、プロバイダを追加、Mistral)、Claude Code の行で mistral-large-4 などの Mistral モデルを選ぶか、magpie claude mistral/mistral-large-4 を実行します。Mistral は Chat Completions しか提供していないので、magpie が Claude Code の Anthropic Messages リクエストを変換して https://api.mistral.ai/v1 に送り、返答を戻します。思考内容も含みます。

    diff --git a/site/public/docs/mistral.html b/site/public/docs/mistral.html index bd279488f..f1c1b173c 100644 --- a/site/public/docs/mistral.html +++ b/site/public/docs/mistral.html @@ -285,6 +285,8 @@ magpie provider fallback mistral deepseek/deepseek-v4-pro
  • Checking a key. magpie provider test mistral sends a tiny request through each endpoint, or to each model you name. Add --as codex or --as claude-code to send it the way that agent would.
  • +

    Groq in Claude Code, Codex and other agents

    +

    FAQ

    How do I use Mistral in Claude Code?

    Add your Mistral API key in magpie (Providers, Add provider, Mistral), then pick a Mistral model such as mistral-large-4 on Claude Code’s row, or run magpie claude mistral/mistral-large-4. Mistral serves Chat Completions only, so magpie translates Claude Code’s Anthropic Messages requests to https://api.mistral.ai/v1 and the replies back, thinking included.

    diff --git a/site/public/docs/zh/groq.html b/site/public/docs/zh/groq.html new file mode 100644 index 000000000..cdaf854d9 --- /dev/null +++ b/site/public/docs/zh/groq.html @@ -0,0 +1,268 @@ + + + + + +Groq 接入 Claude Code、Codex:一把 Key 用 Groq 的高速推理 · magpie + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    +

    文档 · 指南

    +

    Groq 接入 Claude Code、Codex 等 Agent

    +

    Groq 用自家的 LPU 芯片跑开源模型,以速度快出名,上面既有 OpenAI 的 gpt-oss,也有其他厂商的开源模型。magpie 的 groq 预设把它接到 Claude Code、Codex、OpenCode 等 Agent:一把 Groq 的 Key,模型列表由 Groq 自己给出。

    +

    添加

    +
      +
    1. 拿一把 Key。在 console.groq.com/keys 创建一把 API Key。
    2. +
    3. 添加。在应用里选 Groq,把 Key 填进 API 密钥,或者在命令行:
    4. +
    +
    终端
    magpie provider add groq 
    +magpie provider test groq
    +

    预设里 Chat Completions 和 Responses 都指向 https://api.groq.com/openai/v1,不用自己填地址。在 OpenCode 等其他应用里配过的 Groq 供应商,导入时也会变成 groq 预设。

    +

    给 Agent 用

    +

    模型 id 写成 groq/<Groq 的模型 id>:

    +
    终端
    magpie claude groq/openai/gpt-oss-120b
    +magpie codex groq/openai/gpt-oss-120b
    +

    Claude Code 这类说 Anthropic 协议的 Agent,请求由 magpie 转成 Chat Completions 发给 Groq:Groq 的 Chat 接口会报告缓存命中,所以用量页能看到读了多少缓存。

    +

    Groq 上的模型大多来自其他厂商,models.dev 也把它们列在 Groq 名下,所以 magpie 不把 Groq 的列表当作模型厂商自己的说法。

    +

    限速和上下文

    + +

    语音转文字和语音合成

    +

    magpie 网关的 /v1/audio/transcriptions 和 /v1/audio/speech 也能用 Groq:表单和音频原样发给 Groq,只把模型换成 Groq 自己的 id,返回 Groq 的原始格式。语音合成同理,model 写 groq/playai-tts。

    +
    终端
    curl http://127.0.0.1:3425/v1/audio/transcriptions \
    +  -H 'Authorization: Bearer magpie' \
    +  -F model=groq/whisper-large-v3 -F file=@meeting.m4a
    +

    几点说明

    + + +

    常见问题

    +

    magpie 支持 Groq 吗?

    +

    支持,用 groq 预设。填一把 Groq 的 API Key,Chat Completions 和 Responses 接口都已配好,模型由 Groq 的列表给出,模型 id 写成 groq/<模型>。

    +

    Claude Code 能用 Groq 上的模型吗?

    +

    能。magpie 把 Claude Code 的 Anthropic 请求转成 Chat Completions 发给 Groq,Groq 的 Chat 接口会报告缓存命中,用量里能看到。

    +

    Groq 限速了怎么办?

    +

    Groq 的 429 写明了模型时,magpie 只让这个模型在这把 Key 上休息,其他模型照常用;路由组里还有别的供应商时,请求会交给下一个。

    +

    能用 Groq 的 Whisper 吗?

    +

    能。向 magpie 的 /v1/audio/transcriptions 发 OpenAI 格式的表单,model 写 groq/whisper-large-v3;语音合成用 /v1/audio/speech。

    + +

    相关页面:Mistral 接入 Claude Code、Codex、Gemini CLI 和 OpenCode、OpenAI 接入 Claude Code、Codex、Gemini CLI 和 OpenCode。遇到错误请看 常见错误排查:401、429、502、504 等,或者到 Discord 提问。

    +
    +
    + + + + + + + diff --git a/site/public/docs/zh/mistral.html b/site/public/docs/zh/mistral.html index 9536da8dd..0b63004a1 100644 --- a/site/public/docs/zh/mistral.html +++ b/site/public/docs/zh/mistral.html @@ -285,6 +285,8 @@ magpie provider fallback mistral deepseek/deepseek-v4-pro
  • 检查 Key。magpie provider test mistral 会向每个接口发一个很小的请求,或者发给你指定的每个模型。加上 --as codex 或 --as claude-code,就按那个工具的方式发送。
  • +

    Groq 接入 Claude Code、Codex 等 Agent

    +

    常见问题

    怎么在 Claude Code 里用 Mistral?

    在 magpie 里添加 Mistral API Key(供应商、添加供应商、Mistral),然后在 Claude Code 那一行选一个 Mistral 模型,比如 mistral-large-4,或者运行 magpie claude mistral/mistral-large-4。Mistral 只提供 Chat Completions 接口,所以 magpie 把 Claude Code 的 Anthropic Messages 请求转换后发到 https://api.mistral.ai/v1,再把回复转换回来,思考内容也一样。

    diff --git a/site/public/llms-full.txt b/site/public/llms-full.txt index 19e8f489f..4a37f6eda 100644 --- a/site/public/llms-full.txt +++ b/site/public/llms-full.txt @@ -2936,6 +2936,8 @@ magpie provider fallback mistral deepseek/deepseek-v4-pro - **No Vibe card..** magpie shows the month only for a key Mistral says is a Vibe key or a Studio key, and only when its budget is more than zero. - **Checking a key..** `magpie provider test mistral` sends a tiny request through each endpoint, or to each model you name. Add `--as codex` or `--as claude-code` to send it the way that agent would. +[Groq in Claude Code, Codex and other agents](https://usemagpie.ai/docs/groq) + ## FAQ ### How do I use Mistral in Claude Code? @@ -9628,6 +9630,80 @@ Related: [OpenAI in Claude Code, Codex, Gemini CLI and OpenCode](https://usemagp --- +Source: https://usemagpie.ai/docs/groq + +# Groq in Claude Code, Codex and other agents + +Groq runs open models on its own LPU chips and is known for speed. It serves OpenAI's gpt-oss and other makers' open models. magpie's `groq` preset brings it to Claude Code, Codex, OpenCode and other agents: one Groq key, with the model list Groq gives. + +## Add it + +1. **Get a key..** Create an API key at console.groq.com/keys. +2. **Add it..** Pick Groq in the app and paste the key into API key, or from the CLI: + +``` +magpie provider add groq +magpie provider test groq +``` + +The preset points Chat Completions and Responses at `https://api.groq.com/openai/v1`, so there is no address to type. A Groq provider set up in OpenCode or another app becomes the `groq` preset when imported. + +## Use it in an agent + +Model ids are `groq/`: + +``` +magpie claude groq/openai/gpt-oss-120b +magpie codex groq/openai/gpt-oss-120b +``` + +Claude Code and other Anthropic agents have their requests translated by magpie to Chat Completions for Groq: Groq's Chat API reports its cache, so Usage shows what was read from it. + +Most of Groq's models are other makers', and models.dev lists them under Groq, so magpie doesn't take Groq's list as a maker's word on theirs. + +## Rate limits and context + +- Groq's 429 names the model it limits (for model `…`). magpie rests that model on that key alone and asks the other models straight; a 429 that names no model rests the key whole. +- When Groq says "reduce the length of the messages", magpie reads it as an overflow and gives the agent the error it knows (OpenAI's `context_length_exceeded`, say), so the agent compacts instead of asking again. +- Groq turns away a field it doesn't take with a 400 saying "unsupported". For a field magpie adds, such as its cache key, magpie asks again without it and doesn't send it to Groq again. + +## Speech to text and text to speech + +The gateway's `/v1/audio/transcriptions` and `/v1/audio/speech` take Groq too: the form and the audio go to Groq as sent, with only the model set to Groq's own id, and the answer comes back in Groq's own format. Text to speech works the same way, with model `groq/playai-tts`. + +``` +curl http://127.0.0.1:3425/v1/audio/transcriptions \ + -H 'Authorization: Bearer magpie' \ + -F model=groq/whisper-large-v3 -F file=@meeting.m4a +``` + +## Notes + +- Groq takes its turn in a routing group like any provider: when it fails, the group's next member answers. +- When one key isn't enough, add another as a second account of the same provider. + +## FAQ + +### Does magpie support Groq? + +Yes, with the groq preset. Give a Groq API key; Chat Completions and Responses are set, the models come from Groq's list, and a model id is groq/. + +### Can Claude Code use Groq's models? + +Yes. magpie translates Claude Code's Anthropic requests to Chat Completions for Groq, whose Chat API reports its cache, so Usage shows it. + +### What happens when Groq rate-limits me? + +When Groq's 429 names the model, magpie rests only that model on that key and the others go on; in a routing group with other providers, the request goes to the next one. + +### Can I use Groq's Whisper? + +Yes. Send an OpenAI-style form to magpie's /v1/audio/transcriptions with model groq/whisper-large-v3; text to speech goes to /v1/audio/speech. + +Related: [Mistral in Claude Code, Codex, Gemini CLI and OpenCode](https://usemagpie.ai/docs/mistral), [OpenAI in Claude Code, Codex, Gemini CLI and OpenCode](https://usemagpie.ai/docs/openai). If something fails, see [Fixing common errors: 401, 429, 502, 504 and more](https://usemagpie.ai/docs/troubleshooting) or ask on [Discord](https://discord.gg/vGSnD3ZKQF). + +--- + Source: https://usemagpie.ai/docs/library # Library diff --git a/site/public/llms.txt b/site/public/llms.txt index 302fc5f0c..1320c0259 100644 --- a/site/public/llms.txt +++ b/site/public/llms.txt @@ -145,6 +145,7 @@ DeepSeek, Kimi (Moonshot), GLM (Zhipu), Qwen, MiniMax, Anthropic (Claude), OpenA - [Google Vertex AI in Claude Code, Codex and other agents](https://usemagpie.ai/docs/vertex): Gemini, Claude and partner models (DeepSeek, GLM, gpt-oss) from your own Google Cloud project, signed with gcloud credentials or a service account, no API key; models per location, Model Garden, PayGo headers and common errors. - [Amazon Bedrock in Claude Code, Codex and other agents](https://usemagpie.ai/docs/bedrock): the bedrock and bedrock-mantle presets with one Bedrock API key and no SigV4; regions, global inference profiles for Claude and GPT, other makers' in-region ids, Mantle's own model list, and CLAUDE_CODE_USE_BEDROCK. - [Azure OpenAI in Codex, Claude Code and other agents](https://usemagpie.ai/docs/azure): the azure preset at your own resource, its v1 API under /openai/v1, the key in api-key, deployments as model ids, API Management gateways and headers. +- [Groq in Claude Code, Codex and other agents](https://usemagpie.ai/docs/groq): the groq preset with one key, Claude Code translated to Chat with the cache counted, per-model rate limits, overflows that make the agent compact, Whisper and speech. - [Library](https://usemagpie.ai/docs/library): instructions, MCP servers, skills, hooks and subagents for each agent. - [MCP router](https://usemagpie.ai/docs/mcp-router): one magpie MCP server per agent. - [Remote magpie](https://usemagpie.ai/docs/remote): use one magpie from several computers. diff --git a/site/public/sitemap.xml b/site/public/sitemap.xml index a9978fa0a..159a4a306 100644 --- a/site/public/sitemap.xml +++ b/site/public/sitemap.xml @@ -97,6 +97,7 @@ https://usemagpie.ai/docs/vertex https://usemagpie.ai/docs/bedrock https://usemagpie.ai/docs/azure +https://usemagpie.ai/docs/groq https://usemagpie.ai/docs/local-models https://usemagpie.ai/docs/opencode-models https://usemagpie.ai/docs/alternatives @@ -215,6 +216,7 @@ https://usemagpie.ai/docs/zh/vertex https://usemagpie.ai/docs/zh/bedrock https://usemagpie.ai/docs/zh/azure +https://usemagpie.ai/docs/zh/groq https://usemagpie.ai/docs/zh/local-models https://usemagpie.ai/docs/zh/opencode-models https://usemagpie.ai/docs/zh/alternatives @@ -332,6 +334,7 @@ https://usemagpie.ai/docs/ja/vertex https://usemagpie.ai/docs/ja/bedrock https://usemagpie.ai/docs/ja/azure +https://usemagpie.ai/docs/ja/groq https://usemagpie.ai/docs/ja/local-models https://usemagpie.ai/docs/ja/opencode-models https://usemagpie.ai/docs/ja/alternatives