Skip to main content
OpenAI compatible

Nebula API

Access Nebula through a familiar OpenAI-compatible API. Drop-in replacement with enhanced security capabilities.

Models
Available models & pricing
Auth
API key setup
Tools
Function calling guide
MCP
Model Context Protocol

Model family

Available models

Choose the right model for your use case. Pricing per 1M tokens.

Default
Nebula 4.5Text
nebula-4.5

Adaptive intelligence. Every request is routed across the engine matrix by meaning, cost and learned reputation — you do not pick a tier.

ChatReasoningTool CallingSecurity Analysis
Input£10.00/1M
Output£20.00/1M
Context256K tokens
SpeedAdaptive
Nebula VMultimodal
nebula-v

Vision, image and audio understanding — screenshots, documents, video frames and speech in one context.

VisionImage AnalysisTranscriptionAudio
Input£10.00/1M
Output£20.00/1M
Context1M tokens
SpeedFast
Nebula RealtimeRealtime
nebula-realtime

Low-latency bidirectional voice, vision and screen over a WebSocket. The engine behind live calls and meetings.

VoiceVisionScreenAudio
Input£10.00/1M
Output£20.00/1M
Context1M tokens
SpeedRealtime
Nebula EmbedEmbeddings
nebula-embed

Text embeddings for retrieval and RAG.

EmbeddingsRetrieval
Input£10.00/1M
Output£20.00/1M
Context8K tokens
SpeedUltra Fast
Nebula ImageImage
nebula-image

Text-to-image generation.

Image Generation
Input£10.00/1M
Output£20.00/1M
Contextn/a
SpeedFast

Security

Authentication

Secure your API requests with API keys

Getting an API key

  1. 1Log in to your BreachLine dashboard and go to Settings
  2. 2Navigate to API Keys section
  3. 3Click "Create API Key"
  4. 4Select "LLM API" scope (llm:*)
  5. 5Copy and securely store your key

Using your API key

Include your API key in the X-API-Key header:

X-API-Key: bl_live_xxxxxxxxxxxx
Security: Never expose your API key in client-side code or public repositories.

Getting started

Quick start

Get started with Nebula in minutes

cURL

curl -X POST https://api.breachline.io/api/v1/llm/v1/chat/completions \
  -H "X-API-Key: bl_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nebula-4.5",
    "messages": [
      {"role": "system", "content": "You are a security analyst."},
      {"role": "user", "content": "Analyze this SQL injection: SELECT * FROM users WHERE id = \'" + input + "\'"}
    ],
    "max_tokens": 2048,
    "temperature": 0.3
  }'

Python (OpenAI SDK)

from openai import OpenAI

# Initialize client with Nebula endpoint
client = OpenAI(
    api_key="bl_live_xxxxxxxxxxxx",
    base_url="https://api.breachline.io/api/v1/llm/v1"
)

# Chat completion
response = client.chat.completions.create(
    model="nebula-4.5",
    messages=[
        {"role": "system", "content": "You are a security expert."},
        {"role": "user", "content": "Analyze this vulnerability report..."}
    ],
    max_tokens=2048,
    temperature=0.3
)

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

JavaScript / TypeScript

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'bl_live_xxxxxxxxxxxx',
  baseURL: 'https://api.breachline.io/api/v1/llm/v1'
});

async function analyzeVulnerability(finding: string) {
  const response = await client.chat.completions.create({
    model: 'nebula-4.5',
    messages: [
      { role: 'system', content: 'You are a security analyst.' },
      { role: 'user', content: `Analyze: ${finding}` }
    ]
  });

  return response.choices[0].message.content;
}

Functions

Tool calling

Enable Nebula to execute functions and interact with external systems

Supported models
Tool calling is available on nebula-4.5, and is routed to a tool-capable engine automatically.

Tool calling example

from openai import OpenAI

client = OpenAI(
    api_key="bl_live_xxxxxxxxxxxx",
    base_url="https://api.breachline.io/api/v1/llm/v1"
)

# Define security tools
tools = [
    {
        "type": "function",
        "function": {
            "name": "scan_target",
            "description": "Perform a security scan on a target",
            "parameters": {
                "type": "object",
                "properties": {
                    "target": {"type": "string", "description": "URL or IP to scan"},
                    "scan_type": {"type": "string", "enum": ["quick", "full", "stealth"]}
                },
                "required": ["target"]
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "lookup_cve",
            "description": "Look up CVE details",
            "parameters": {
                "type": "object",
                "properties": {
                    "cve_id": {"type": "string", "description": "CVE ID (e.g., CVE-2024-1234)"}
                },
                "required": ["cve_id"]
            }
        }
    }
]

response = client.chat.completions.create(
    model="nebula-4.5",
    messages=[{"role": "user", "content": "Scan example.com for vulnerabilities"}],
    tools=tools,
    tool_choice="auto"
)

# Handle tool calls
if response.choices[0].message.tool_calls:
    for tool_call in response.choices[0].message.tool_calls:
        print(f"Tool: {tool_call.function.name}")
        print(f"Args: {tool_call.function.arguments}")

Real-time

WebSocket streaming

Get real-time responses via WebSocket connection

Streaming example

from openai import OpenAI

# Streaming is server-sent events on the standard endpoint — set stream=True.
# (There is no separate socket for chat; the only WebSocket we expose is the
# realtime voice/vision plane at /api/v1/llm/v1/realtime.)
client = OpenAI(
    api_key="bl_live_xxxxxxxxxxxx",
    base_url="https://api.breachline.io/api/v1/llm/v1",
)

stream = client.chat.completions.create(
    model="nebula-4.5",
    messages=[
        {"role": "user", "content": "Write a security audit report for example.com"}
    ],
    stream=True,
)

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

Integration

MCP protocol

Integrate Nebula with MCP-compatible clients

What is MCP?
Model Context Protocol enables seamless integration between Nebula and tools. Use Nebula with Claude Desktop, VS Code, and other MCP-compatible clients.

MCP configuration

// MCP client configuration (add to your MCP client's config file)
{
  "mcpServers": {
    "nebula": {
      "command": "npx",
      "args": ["-y", "@breachline/mcp-server"],
      "env": {
        "NEBULA_API_KEY": "bl_live_xxxxxxxxxxxx",
        "NEBULA_BASE_URL": "https://api.breachline.io/api/v1/llm/v1"
      }
    }
  }
}

// Use with MCP SDK
import { Client } from "@modelcontextprotocol/sdk/client/index.js";

const client = new Client({ name: "my-app", version: "1.0.0" });
await client.connect(transport);

const result = await client.callTool({
  name: "nebula_chat",
  arguments: {
    model: "nebula-4.5",
    message: "Analyze security headers for example.com"
  }
});

Usage

Rate limits

Usage limits per API key

60
req/min
1K
req/hour
10K
req/day
100K
tokens/min

Need higher limits? Contact us for enterprise plans.

Reference

API endpoints

Full API reference

POST/api/v1/llm/v1/chat/completions

Create a chat completion (OpenAI compatible)

POST/api/v1/llm/v1/completions

Simple text completion endpoint

GET/api/v1/llm/v1/models

List available models and pricing

GET/api/v1/llm/v1/usage/current

Get current usage statistics

Get started

Ready to build?

Create an API key and start building with Nebula