Developers

API

API Quickstart

The Nebo API is a drop-in OpenAI-compatible REST API. If your code works with the OpenAI SDK, it works with Nebo — change the base URL and API key, and you're done.

Base URL

https://janus.neboloop.com/v1

All endpoints are served over HTTPS. HTTP requests are upgraded automatically.

Authentication

Every request requires a JWT token in the Authorization header. You get this token from the NeboLoop dashboard after subscribing to a plan.

Authorization: Bearer <your-jwt-token>

The JWT contains your user ID, email, and plan tier. No separate API key registration is needed — your NeboLoop subscription token is your API key.

Your First Request

Using curl

curl https://janus.neboloop.com/v1/chat/completions \
  -H "Authorization: Bearer $NEBO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [
      {"role": "user", "content": "Hello, what can you do?"}
    ]
  }'

Using the OpenAI Python SDK

from openai import OpenAI

client = OpenAI(
    base_url="https://janus.neboloop.com/v1",
    api_key="<your-jwt-token>"
)

response = client.chat.completions.create(
    model="auto",
    messages=[
        {"role": "user", "content": "Hello, what can you do?"}
    ]
)

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

Using the OpenAI Node SDK

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://janus.neboloop.com/v1",
  apiKey: "<your-jwt-token>"
});

const response = await client.chat.completions.create({
  model: "auto",
  messages: [
    { role: "user", content: "Hello, what can you do?" }
  ]
});

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

Model Selection

You have two options for choosing which AI model handles your request:

Model Value Behavior
"auto" or "" Smart routing — Nebo picks the best model based on your message content and plan tier
Specific model ID Direct routing — your request goes to exactly that model (e.g. "deepseek.v3.2", "gpt-5.2")

To see which models are available, call the Models endpoint:

curl https://janus.neboloop.com/v1/models \
  -H "Authorization: Bearer $NEBO_TOKEN"

Streaming

Streaming is supported via Server-Sent Events (SSE), identical to the OpenAI format:

stream = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Write a haiku about APIs"}],
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Endpoints

Method Path Purpose
POST /v1/chat/completions Generate chat completions (streaming or buffered)
GET /v1/models List available models
POST /v1/embeddings Generate text embeddings
GET /v1/usage Check your usage and remaining budget

Rate Limits

Every chat completion response includes rate limit headers so you can track your budget:

X-RateLimit-Session-Limit-Credits: 10000000
X-RateLimit-Session-Remaining-Credits: 8750000
X-RateLimit-Session-Reset: 2026-04-03T10:00:00Z
X-RateLimit-Weekly-Limit-Credits: 50000000
X-RateLimit-Weekly-Remaining-Credits: 41600000
X-RateLimit-Weekly-Reset: 2026-04-07T00:00:00Z

Credits are in microdollars. Your plan determines your session and weekly budgets. See Usage & Limits for details.

Next Steps