Muse Spark with Claude Code
bex muse puts Meta's Muse Spark models behind Claude Code's workflow via the Meta Model API. Your key is captured once on first launch — hidden paste, live verification — and Muse keeps its own config dir, history and permissions, apart from your other providers.
bex muse
Quickstart
# Claude Code is the runtime — install it once npm install -g @anthropic-ai/claude-code# first launch opens the provider console and captures your key once bex muse# everything after the provider name goes straight to claude bex muse --continue# rotate or replace the stored key any time bex code keys set muse
How bex muse works
Documented seams, nothing forked
bex muse starts your installed Claude Code with ANTHROPIC_BASE_URL pointed at https://api.meta.ai and your key in ANTHROPIC_AUTH_TOKEN — only Claude Code's documented environment variables, injected at exec time.
An isolated config dir
CLAUDE_CONFIG_DIR is set to ~/.bex/code/claude-muse (base overridable with BEX_CODE_HOME): settings, history and permissions never collide with another provider, your personal ~/.claude is neither read nor modified, and inherited ANTHROPIC_* values are stripped so nothing leaks in.
One hidden paste, verified live
The first bex muse opens the provider's API-key console, takes one hidden paste, and verifies the key live against the provider's Messages endpoint — only an explicit 401/403 fails. The key is stored owner-only in ~/.bex/code/keys.toml and injected at launch, never written into a config file.
The environment always wins
A key already set in META_MODEL_API_KEY / META_API_KEY overrides the stored one — the first set variable wins — so CI jobs and one-off shells can bring their own key without touching keys.toml.
Everything else goes to claude
Arguments after the provider name pass through to claude unchanged: bex muse --continue resumes your last session, bex muse -p "one prompt" runs a single prompt, and Claude Code's own --help works as-is.
Manual env vars vs bex muse
By hand: five exports, every shell
export ANTHROPIC_BASE_URL="https://api.meta.ai"
export ANTHROPIC_AUTH_TOKEN="<api-key>"
export ANTHROPIC_MODEL="muse-spark-1.2"
export ANTHROPIC_SMALL_FAST_MODEL="muse-spark-1.2"
export CLAUDE_CONFIG_DIR="$HOME/.claude-muse"
claudeClaude Code's provider seams are environment variables, so a manual setup exports the endpoint, the key, both model slots and a config dir — in every new shell, for every provider, with nothing checking that the key actually works.
With bex: one command
bex musebex muse injects the same variables at exec time, keeps ~/.bex/code/claude-muse isolated so histories and settings never collide, and verifies your key before Claude Code starts.
Muse Spark (Meta Model API) defaults
| Default model | muse-spark-1.2 |
|---|---|
| Small/fast model | muse-spark-1.2 |
| Base URL | https://api.meta.ai |
| API-key console | https://dev.meta.ai |
| Key environment variables | META_MODEL_API_KEYMETA_API_KEY |
The default model fills ANTHROPIC_MODEL and the opus/sonnet slots; the small/fast model fills ANTHROPIC_SMALL_FAST_MODEL and the haiku slot. Key environment variables are probed in order — the first set value wins, and the environment always beats the stored key.
What's specific to Muse Spark (Meta Model API)
Muse Spark reaches Claude Code through the Meta Model API, and two things set it apart from the rest of the catalog: the endpoint carries no path prefix, and one model id covers every slot.
What is the Meta Model API and where do I get a key?
It is the developer API that serves Meta's Muse Spark models. Keys are issued at https://dev.meta.ai; the first bex muse opens that page, takes one hidden paste, verifies it live against the endpoint, and stores it owner-only, so every later launch is just the command.
Why is Muse's base URL just a hostname?
Claude Code appends /v1/messages to whatever ANTHROPIC_BASE_URL holds, so https://api.meta.ai resolves to https://api.meta.ai/v1/messages. The catalog's other three providers put their Anthropic-compatible surface under a path; Muse's sits at the host root. Either way the launcher copies the value verbatim — there is nothing to configure.
Can I put a different model in the fast slot?
No — the catalog lists one Muse Spark id, muse-spark-1.2, and it fills ANTHROPIC_MODEL, the opus and sonnet slots and ANTHROPIC_SMALL_FAST_MODEL/haiku alike. And since bex muse strips inherited ANTHROPIC_* values before exec, exporting another id in your shell has no effect either.
The other launchers
- GLM (Z.ai coding plan)Use your Z.ai coding plan with Claude Code — GLM's own documented pairing, one command away.
- Kimi (Moonshot platform)Moonshot's Kimi K3 driving Claude Code, with a key from the Moonshot platform console.
- DeepSeekDeepSeek's Anthropic-compatible endpoint inside Claude Code — pay-as-you-go, one console key.