← Home

How to use the Space Bunny API

Space Bunny Alpha is served through a hosted, OpenAI Chat Completions-compatible API. If you already have code that talks to OpenAI, you only need to change two things — the base URL and your API key — and set the model to space-bunny-alpha.

Get a key

Create a free key to start. New accounts get roughly $1 of credit on signup; after that you top up with credit packs. Keys look like sb_live_... and are sent in the Authorization: Bearer header.

Get a free API key →

Endpoint

The API is a drop-in OpenAI Chat Completions endpoint. Base URL: https://spacebunnymodel.com/api/v1. Send requests to POST /api/v1/chat/completions with the model set to space-bunny-alpha.

curl

The raw HTTP request — useful for a quick smoke test.

curl https://spacebunnymodel.com/api/v1/chat/completions \
  -H "Authorization: Bearer sb_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "space-bunny-alpha",
    "messages": [
      { "role": "user", "content": "In one sentence, what is a space bunny?" }
    ],
    "max_tokens": 4096
  }'

Python (openai SDK)

Install with pip install openai, then point the client at our base URL.

from openai import OpenAI

client = OpenAI(
    base_url="https://spacebunnymodel.com/api/v1",
    api_key="sb_live_...",
)

resp = client.chat.completions.create(
    model="space-bunny-alpha",
    messages=[
        {"role": "user", "content": "In one sentence, what is a space bunny?"},
    ],
    # Reasoning model: it thinks before answering, so give it room.
    max_tokens=4096,
)

print(resp.choices[0].message.content)

JavaScript / TypeScript (openai npm)

Install with npm install openai. The official OpenAI package works unchanged once you set baseURL and apiKey.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://spacebunnymodel.com/api/v1",
  apiKey: "sb_live_...",
});

const resp = await client.chat.completions.create({
  model: "space-bunny-alpha",
  messages: [
    { role: "user", content: "In one sentence, what is a space bunny?" },
  ],
  // Reasoning model: it thinks before answering, so give it room.
  max_tokens: 4096,
});

console.log(resp.choices[0].message.content);

Streaming

Pass stream: true to receive tokens as they are produced. This works exactly like OpenAI streaming.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://spacebunnymodel.com/api/v1",
  apiKey: "sb_live_...",
});

const stream = await client.chat.completions.create({
  model: "space-bunny-alpha",
  messages: [
    { role: "user", content: "Write a short poem about a rabbit in orbit." },
  ],
  max_tokens: 4096,
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Using it in opencode

Because the endpoint is OpenAI-compatible, you can wire Space Bunny Alpha into opencode as a custom provider — set the base URL to https://spacebunnymodel.com/api/v1, your sb_live_ key, and the model space-bunny-alpha. See the step-by-step guide at /integrations/opencode.

Notes

Read the full API docs →

How to use the Space Bunny API — OpenAI-compatible chat completions · Space Bunny Model