№ 0489GitHub
Muse Code with any OpenAI-compatible gateway
A guide and tooling for pointing Muse Code's meta provider at any OpenAI-compatible gateway with API-key auth and no Meta login, including workarounds for 1.0.1's bearer-withholding change.
Muse Code — Custom Provider & No Meta Login
Use Muse Code (muse) with any OpenAI-compatible API without creating a Meta account or using muse login.
Muse Code's meta provider defaults to https://api.meta.ai/v1, but you can point it at your own gateway. The meta label is just a provider name — storing a key with muse auth set --provider meta does not require a Meta OAuth login. muse login is optional and only for Meta's hosted auth; API-key auth is enough.
⚠️ Muse Code 1.0.1 changed things. The old per-invocation
--base-urlflag no longer sends your auth header (the bearer is "withheld" unless the base URL is pinned in settings). If you're on 1.0.1+, use theendpoint_transportsettings method below. The old--base-urlwrapper only works on 0.2.x — see the legacy section.
Why
- Route Muse Spark (
muse-spark-1.2, etc.) through a gateway/proxy (e.g., self-hosted, OpenCode, Helicone, Cloudflare AI Gateway, LiteLLM) - Avoid
muse login/ browser OAuth entirely - Keep the same CLI (
muse exec,museTUI) while swapping the backend
Quick start (no Meta account)
1. Install Muse Code
curl -fsSL https://dev.meta.ai/install.sh | sh
muse --version # Muse Code 1.0.1 (or newer)
2. Store an API key (no browser)
This does NOT create a Meta account. It just saves a key under the
metaprovider name.
# paste your gateway/proxy API key on stdin (never as an argv)
echo -n "YOUR_GATEWAY_API_KEY" | muse auth set --provider meta --api-key-stdin
# verify
cat ~/.config/muse/auth.json # { "schema_version": 1, "providers": { "meta": { "api_key": "..." } } }
# alternative: env var (takes priority over file)
export META_API_KEY="YOUR_GATEWAY_API_KEY"
You never need to run muse login.
3. Pin your gateway in settings (1.0.1+)
Muse Code 1.0.1 hardens endpoint overrides: a bare --base-url flag is treated as "off the sanctioned front door" and your Authorization header will not be sent to it. The sanctioned opt-in is a settings pin — edit ~/.config/muse/settings.json:
{
"schema_version": 1,
"model": "muse-spark-1.2",
"provider": "meta",
"endpoint_transport": {
"base_url": "http://127.0.0.1:8914/v1",
"auth": "bearer"
}
}
base_url— your gateway / proxy root (same valu





