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. Add it.Pick Groq in the app and paste the key into API key, or from the CLI:
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

Fireworks and Fireworks Nexus in Claude Code, Codex and other agents

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.