Skip to main content
REST API

Platform API

Inference, memory, usage and account management over one authenticated REST surface. Build Breachline into your own tooling and CI.

Auth
Keys and tokens
Inference
Chat, voice, vision
Memory
Recall and write
Usage
Spend and limits

Security

Authentication

Authenticate with an API key or a JWT bearer token

Getting an API key

  1. 1Sign in to your Breachline console and open Settings
  2. 2Go to the API Keys section
  3. 3Create a key and select only the scopes it needs
  4. 4Copy the secret — it is shown once and never again
  5. 5Store it in your secret manager, never in source

Common scopes

llm:chatChat and responses
llm:embeddingsEmbeddings and rerank
llm:realtimeRealtime voice and vision
memory:readRecall from memory
memory:writeWrite to memory
usage:readRead your usage and spend
integrations:useUse connected integrations

Authentication headers

# Authenticate with an API key
curl -X GET "https://api.breachline.io/api/v1/llm/v1/models" \
  -H "X-API-Key: bl_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json"

# Or with a JWT bearer token
curl -X GET "https://api.breachline.io/api/v1/auth/me" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json"

Auth endpoints

POST/api/v1/auth/register

Register a new user account

POST/api/v1/auth/login

Authenticate and receive JWT tokens

POST/api/v1/auth/refresh

Exchange a refresh token for a new access token

POST/api/v1/auth/logout

Revoke the current session

GET/api/v1/auth/me

Get the authenticated principal

GET/api/v1/auth/sessions

List active sessions

DELETE/api/v1/auth/sessions/{session_id}

Revoke a specific session

POST/api/v1/auth/mfa/enroll

Begin multi-factor enrolment

GET/api/v1/auth/mfa/status

Get multi-factor status

POST/api/v1/auth/verify-email

Verify an email address with a one-time code

POST/api/v1/auth/forgot-password

Start a password reset

POST/api/v1/auth/reset-password

Complete a password reset

Management

API keys

Create, rotate and revoke keys programmatically

POST/api/v1/keys/create

Create a new API key (returned once, never again)

GET/api/v1/keys/list

List your API keys and their scopes

POST/api/v1/keys/refresh/{key_id}

Rotate a key, invalidating the old secret

DELETE/api/v1/keys/{key_id}

Revoke an API key immediately

Create an API key

curl -X POST "https://api.breachline.io/api/v1/keys/create" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "CI/CD Pipeline Key",
    "scopes": ["llm:chat", "memory:read", "usage:read"],
    "expires_in_days": 90
  }'

# Response — the secret is shown ONCE and is not recoverable
{
  "id": "key_abc123",
  "name": "CI/CD Pipeline Key",
  "key": "bl_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "scopes": ["llm:chat", "memory:read", "usage:read"],
  "created_at": "2026-01-15T10:00:00Z",
  "expires_at": "2026-04-15T10:00:00Z"
}

Nebula

Inference

An OpenAI-compatible gateway. Point any OpenAI SDK at our base URL — there is no separate package to install.

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

Chat completions — streaming and tool calling

POST/api/v1/llm/v1/responses

Responses API — the modern OpenAI-compatible surface

GET/api/v1/llm/v1/models

List the available Nebula models

POST/api/v1/llm/v1/embeddings

Generate embeddings for retrieval

POST/api/v1/llm/v1/rerank

Rerank candidate documents against a query

POST/api/v1/llm/v1/audio/transcriptions

Transcribe audio to text

POST/api/v1/llm/v1/audio/speech

Synthesise speech from text

POST/api/v1/llm/v1/images/generations

Generate an image from a prompt

POST/api/v1/llm/v1/batches

Submit an asynchronous batch job

GET/api/v1/llm/v1/batches/{batch_id}

Retrieve batch status

GET/api/v1/llm/v1/batches/{batch_id}/results

Download batch results

POST/api/v1/llm/v1/realtime/ticket

Mint a short-lived ticket for the realtime socket

Chat completion

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": "user", "content": "Summarise the OWASP Top 10 for an API team."}
    ],
    "stream": false
  }'

# Response
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "model": "nebula-4.5",
  "choices": [
    {"index": 0, "message": {"role": "assistant", "content": "..."}, "finish_reason": "stop"}
  ],
  "usage": {"prompt_tokens": 24, "completion_tokens": 512, "total_tokens": 536}
}

Full model reference, streaming and tool calling live in the Nebula API docs.

Cognition

Memory

One op-dispatched endpoint for recall, write, linking and search

POST/api/v1/memory

The unified memory surface — recall, write, link and search, selected by the op field

Recall from memory

curl -X POST "https://api.breachline.io/api/v1/memory" \
  -H "X-API-Key: bl_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "op": "recall",
    "query": "What did we learn about the staging login flow?",
    "limit": 10
  }'

# The memory surface is op-dispatched: one endpoint, many operations.
# Every result is scoped to your organisation and never crosses tenants.

Cost

Usage and budget

Read your consumption and set your own spend caps

GET/api/v1/usage/me

Your own token usage

GET/api/v1/usage/me/logs

Your per-request activity log (metadata only)

GET/api/v1/usage/me/budget

Budget burn and error-rate signal

GET/api/v1/usage/me/budget/cap

Read your self-service spend cap

PUT/api/v1/usage/me/budget/cap

Set a spend cap in GBP per window

DELETE/api/v1/usage/me/budget/cap

Remove your spend cap

GET/api/v1/usage/org/{org_id}

An organisation's usage (members only)

Account

Account and organisation

Profile, settings, audit log, data rights and org membership

GET/api/v1/users/me

Get your profile

PUT/api/v1/users/me

Update your profile

GET/api/v1/users/me/export

Export all of your data

DELETE/api/v1/users/me

Delete your account

GET/api/v1/settings/notifications

Read notification preferences

PUT/api/v1/settings/notifications

Update notification preferences

GET/api/v1/settings/audit-logs

Read the tamper-evident audit log

GET/api/v1/settings/audit-logs/verify-chain

Verify the audit log hash chain

POST/api/v1/gdpr/deletion-requests

Raise a GDPR Article 17 erasure request

GET/api/v1/organizations

List organisations you belong to

GET/api/v1/organizations/{org_id}/members

List an organisation's members

POST/api/v1/organizations/{org_id}/invites

Invite someone to an organisation

Integration

Python example

Streaming a completion with the official OpenAI SDK

Streaming with the OpenAI SDK

from openai import OpenAI

# The gateway is OpenAI-compatible, so the official SDK IS the SDK.
# There is no separate Breachline package to install.
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": "Review this Terraform plan for exposure."}],
    stream=True,
)

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

Usage

Rate limits

Applied per key, and more strictly on authentication

100
requests/min — general API
5
requests/min — authentication

Inference is additionally governed by your own spend cap. Need higher limits? Contact us.

Get started

Ready to automate?

Create an API key and build Breachline into your workflow