← Home

Space Bunny API Reference

Space Bunny Alpha is served over an OpenAI-compatible Chat Completions API. If your code already talks to OpenAI, point it at our base URL and swap in your key — everything below is standard request and response shapes, with a couple of reasoning extras that stay backward compatible.

Base URL & authentication

All requests go to the following base URL. The only endpoint is POST /api/v1/chat/completions.

https://spacebunnymodel.com/api/v1

Authenticate with a bearer token in the Authorization header. Get a key at /get-jev. Keep the key server-side — never ship it in client code.

Authorization: Bearer sb_live_...

Create a chat completion

Send a list of messages and get back an assistant message. Space Bunny is a reasoning model: it thinks before it answers, and that thinking is returned separately in message.reasoning so your message.content stays clean.

curl https://spacebunnymodel.com/api/v1/chat/completions \
  -H "Authorization: Bearer sb_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "space-bunny-alpha",
    "messages": [
      { "role": "system", "content": "You are a careful reasoning assistant." },
      { "role": "user", "content": "How many r are in strawberry? Think it through." }
    ],
    "reasoning": { "effort": "medium" },
    "max_tokens": 4096
  }'

Request parameters

FieldTypeDescription
modelstringThe model id. Use "space-bunny-alpha". Required.
messagesarrayConversation so far, as { role, content } objects. role is system, user, or assistant; content is a string. Required.
streambooleanWhen true, tokens are streamed as Server-Sent Events. Defaults to false.
max_tokensintegerCap on tokens generated in the response. Note: a reasoning model spends tokens thinking before it replies, so set a generous value or the answer may be cut off.
temperaturenumberSampling temperature. Higher is more random.
top_pnumberNucleus sampling probability mass. An alternative to temperature.
reasoningobjectControls thinking budget. Either { "effort": "low" | "medium" | "high" } or { "max_tokens": N }.

Response

The response follows the standard OpenAI shape. The assistant reply is at choices[].message.content, the model's hidden reasoning at choices[].message.reasoning, and token counts in usage.

{
  "id": "chatcmpl_8a1c...",
  "object": "chat.completion",
  "created": 1758931200,
  "model": "space-bunny-alpha",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "reasoning": "The word strawberry is s-t-r-a-w-b-e-r-r-y. Counting r: position 3, 8, 9 -> three.",
        "content": "There are 3 letter r's in \"strawberry\"."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 38,
    "completion_tokens": 214,
    "total_tokens": 252
  }
}

Streaming

Set stream: true to receive the answer incrementally as Server-Sent Events. Each data: line carries a chunk with partial text at choices[].delta.content (and reasoning tokens at choices[].delta.reasoning). The stream ends with a literal data: [DONE] line.

curl -N https://spacebunnymodel.com/api/v1/chat/completions \
  -H "Authorization: Bearer sb_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "space-bunny-alpha",
    "messages": [{ "role": "user", "content": "Write a haiku about orbital mechanics." }],
    "stream": true
  }'
data: {"id":"chatcmpl_8a1c...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant","reasoning":"Pick a celestial image..."}}]}

data: {"id":"chatcmpl_8a1c...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Silent"}}]}

data: {"id":"chatcmpl_8a1c...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" orbits climb"}}]}

data: {"id":"chatcmpl_8a1c...","object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

data: [DONE]

The model

Pricing

Usage is metered by total tokens (prompt + completion, including reasoning tokens). Every new account starts on a free tier; beyond that you top up with credit packs. Each response reports its own usage so you can track spend per call.

Errors

Errors use the OpenAI-style envelope: { "error": { "message", "type", "code" } }.

StatusMeaning
401Invalid or missing API key.
402Insufficient credits — top up to continue.
429Rate limit exceeded — retry with backoff.
502Upstream error — retry with backoff.

SDKs

Because the API is OpenAI-compatible, any OpenAI SDK works — just set base_url to https://spacebunnymodel.com/api/v1 and api_key to your sb_live_ key. See the how-to-use guide for more examples.

from openai import OpenAI

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

resp = client.chat.completions.create(
    model="space-bunny-alpha",
    messages=[{"role": "user", "content": "Explain a Hohmann transfer in one line."}],
    max_tokens=2048,
)
print(resp.choices[0].message.content)