Space Bunny Alpha TypeScript quickstart
Space Bunny Alpha speaks the OpenAI Chat Completions API, so the official `openai` npm SDK just works — point its baseURL at our endpoint, drop in an sb_live_ key, and call model "space-bunny-alpha". Here's the whole path: install, key, a chat call, and a streaming call.
Every example needs a free sb_live_ key. Get one free →
Because Space Bunny Alpha is OpenAI Chat Completions-compatible, you don't need a bespoke client — the standard `openai` SDK talks to it once you override the base URL. You get the 1,000,000-token context window, adjustable reasoning, and native multimodal input through the same message shape you already know, so an existing OpenAI codebase moves over by changing two fields.
1. Install
npm i openai2. Set your key
Grab a free sb_live_ key at /get-jev and put it in your environment. The SDK reads it from the client config, so nothing sensitive lands in your source.
export SPACE_BUNNY_API_KEY=sb_live_...3. A chat completion
Construct the client with our base URL and your key, then call the model like any OpenAI chat model:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://spacebunnymodel.com/api/v1",
apiKey: process.env.SPACE_BUNNY_API_KEY,
});
const resp = await client.chat.completions.create({
model: "space-bunny-alpha",
messages: [
{ role: "system", content: "You are a concise coding assistant." },
{ role: "user", content: "Refactor this function to be pure." },
],
});
console.log(resp.choices[0].message.content);That's the whole call — the request lands on POST https://spacebunnymodel.com/api/v1/chat/completions and comes back in the standard OpenAI response shape.
4. Streaming
Set stream: true and iterate the deltas as they arrive — useful for long, reasoning-heavy answers:
const stream = await client.chat.completions.create({
model: "space-bunny-alpha",
messages: [{ role: "user", content: "Explain event loops step by step." }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}Tips
- Lean on the 1M-token context window to pass whole files or long transcripts in a single request.
- It's a reasoning model — allow a generous max_tokens on hard problems so it has room to think (up to 524,288 output tokens).
- Multimodal input (text, image, audio, video) is supported through the standard content-parts message format.
- Free during the preview, with a free tier plus credit packs on our endpoint for higher limits.
Prefer no SDK?
It's a plain HTTP call — hit the endpoint directly with fetch and a Bearer key:
const r = await fetch("https://spacebunnymodel.com/api/v1/chat/completions", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.SPACE_BUNNY_API_KEY}`,
},
body: JSON.stringify({
model: "space-bunny-alpha",
messages: [{ role: "user", content: "Hello!" }],
}),
});
const data = await r.json();
console.log(data.choices[0].message.content);Need the full field reference, streaming details, or multimodal payloads? The docs cover the whole surface.
FAQ
Do I need a special SDK to use Space Bunny Alpha from TypeScript?
No — it's OpenAI Chat Completions-compatible, so the official `openai` npm SDK works. Just set baseURL to https://spacebunnymodel.com/api/v1, use an sb_live_ key, and call model "space-bunny-alpha".
What's the model name and base URL?
The model is space-bunny-alpha and the base URL is https://spacebunnymodel.com/api/v1 (endpoint POST /api/v1/chat/completions). Authenticate with an Authorization: Bearer sb_live_... header.
Does streaming work?
Yes — pass stream: true and iterate the chunks exactly as you would with any OpenAI-compatible model. Deltas arrive on chunk.choices[0].delta.content.
What does it cost?
There's a free tier plus credit packs on our endpoint, and the underlying model is free during the OpenRouter preview. Grab a key at /get-jev.
Can I send images or audio?
Yes — Space Bunny Alpha accepts native multimodal input (text, image, audio, video) through the standard OpenAI content-parts message format.
See also: API docs & reference · How to use the API · Get a free API key
Start using Space Bunny Alpha
Try it free in the browser, then grab a key and drop it into your setup.