Space Bunny Alpha in opencode
opencode is the open-source coding agent everyone's pairing with Space Bunny Alpha right now — a fast, 1M-context model that's free during the OpenRouter preview. Here's the exact config for both routes.
Every example needs a free sb_live_ key. Get one free →
opencode lets you plug in any OpenAI-compatible model, and Space Bunny Alpha is one of the most capable free options available while it's in preview: a 1,000,000-token context window, strong coding, and blazing-fast inference. That combination — free, huge context, good at code — is exactly why it's trending in the opencode community. Below are two setups: the quickest (OpenRouter) and the most convenient (our hosted endpoint, no OpenRouter account and one less rate limit to worry about).
Option A — via OpenRouter (quickest)
opencode has built-in OpenRouter support. Log in with an OpenRouter key, then select the stealth Space Bunny model.
# 1. authenticate opencode with OpenRouter
opencode auth login
# → choose "OpenRouter", paste your OpenRouter API key
# 2. run opencode and pick the model
opencode
/models
# → search: space-bunny → select openrouter/stealth/space-bunny-alphaOr pin it in your opencode config so every session starts on Space Bunny:
{
"$schema": "https://opencode.ai/config.json",
"model": "openrouter/stealth/space-bunny-alpha"
}That's it — you're coding on a 1M-context model for free. Note that OpenRouter's stealth preview has its own rate limits and the model id can change when it graduates; Option B insulates you from both.
Option B — via our hosted endpoint (no OpenRouter account)
Prefer one key that just works — no OpenRouter signup, and a stable model name we keep pointed at the live Space Bunny even if the upstream id changes? Add our OpenAI-compatible endpoint as a custom provider. Grab a free sb_live_ key on the API page first.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"spacebunny": {
"npm": "@ai-sdk/openai-compatible",
"name": "Space Bunny",
"options": {
"baseURL": "https://spacebunnymodel.com/api/v1",
"apiKey": "{env:SPACE_BUNNY_API_KEY}"
},
"models": {
"space-bunny-alpha": { "name": "Space Bunny Alpha" }
}
}
},
"model": "spacebunny/space-bunny-alpha"
}# put your key in the environment (or opencode's auth store)
export SPACE_BUNNY_API_KEY=sb_live_...Now opencode routes every request to spacebunnymodel.com/api/v1/chat/completions — the same OpenAI-compatible surface as OpenRouter, but on one key with a stable model name. Restart opencode and Space Bunny is in your model list.
Getting the best out of it in opencode
- Lean on the 1M context: point opencode at the whole repo instead of a handful of files — Space Bunny can hold it.
- It's a reasoning model: it spends output tokens thinking before answering, so give it room (a higher max output) on hard tasks.
- Free during preview means no per-token bill today — great for high-volume, iterative agent loops.
- Multimodal input (text, image, audio, video) is supported upstream if your opencode workflow sends it.
Which route should you pick?
Use Option A if you already have an OpenRouter key and just want to try Space Bunny in five seconds. Use Option B if you want a signup-free key, a model name that won't break when the stealth preview graduates or renames, and higher, more predictable limits. Both hit the same model — the only difference is who sits in front of it.
FAQ
How do I use Space Bunny in opencode?
Two ways. Fastest: run `opencode auth login`, choose OpenRouter, paste your key, then `/models` and select openrouter/stealth/space-bunny-alpha. Or add our OpenAI-compatible endpoint as a custom provider (baseURL https://spacebunnymodel.com/api/v1, model space-bunny-alpha) with a free sb_live_ key — no OpenRouter account needed.
Is Space Bunny free in opencode?
Yes — Space Bunny Alpha is free during the OpenRouter preview, so coding with it in opencode costs nothing today. Our hosted endpoint has a free tier too, with paid plans for higher limits when the model graduates to paid.
What's the model id for Space Bunny?
On OpenRouter it's stealth/space-bunny-alpha (in opencode: openrouter/stealth/space-bunny-alpha). Through our endpoint it's simply space-bunny-alpha, and we keep that name pointed at the live model even if the upstream id changes.
Why use your endpoint instead of OpenRouter directly?
No OpenRouter signup, one key, higher and more predictable rate limits, and a stable model name that won't break your opencode config when the stealth preview is renamed or graduated. It's the same underlying model.
Does the 1M context work in opencode?
Yes — Space Bunny Alpha's 1,000,000-token context window is available through both routes, so you can load a whole codebase into a single opencode session.
See also: Get a free API key · OpenRouter setup · How to call the API
Start using Space Bunny Alpha
Try it free in the browser, then grab a key and drop it into your setup.