subsix.ai · Documentation

Build on the subsix.ai API

One OpenAI-compatible gateway for chat at /v1, and a platform API at /api for projects, sessions, missions and billing.

Instead of choosing a model and managing prompts, teams define the outcome. subsix.ai plans the work, assembles a specialized AI workforce, selects the right models and compute, executes the mission, verifies the result and continuously learns from the organization.

Install

Two installs, one wire format. The VS Code extension puts the agent in your editor and the SDK lets your own service call the same fabric the app does. Everything that speaks the OpenAI wire format needs no SDK at all — the gateway at /v1 takes your existing client unchanged, with the base URL and the key swapped.

npm install openai
# or
pip install openai

VS Code extension

The extension is the agent in your editor: it bundles the engine for your platform, so a chat runs against your repository with no server anywhere. Install it from a gallery, or from the VSIX file when the machine has no gallery.

code --install-extension subsix.subsix

subsix.ai 0.27.10 is assembled for , one package per platform because the engine inside it is native. Sizes and sha256 digests are on the download page, each read from the package file itself.

With no account the extension runs the whole agent on your own provider keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, DEEPSEEK_API_KEY), read from ~/.subsix/.env. Signing in instead points it at the hosted server with the subsix.cloudUrl setting and one credit balance across every provider.

Open the Marketplace listing

SDK

The SDK is a typed client for a fabric: one client class, and a transport behind an interface you never name, so the same code runs against the hosted lane, a worker on your machine over stdio, or a fabric in your own process. Cost, timing and every rate come back as a measure with its presence flag, because a zero nobody measured is not a number this product prints — the SDK returns null and the caller says unknown.

npm install @sonicore/sdk
# or, for the same surface in Go:
import "sonicore.ai/sonicore/sdk/go"

@sonicore/sdk: 13 methods on the client, one wire format shared with the Go SDK at sonicore.ai/sonicore/sdk/go. The method names below are read from the package’s own Method enum at build time.

AdoptMissionAccountRegisterHeartbeatOfferReportDrainFleetStateDeclarePublishFetchSubscribe
The wire calls the client makes. A refusal is a value ( REFUSAL_KIND…), never an exception, for every reason but a transport that failed.
import { Fabric, ConnectTransport, headline, unknownReason } from "@sonicore/sdk";

// One client, and a transport behind it: the hosted lane here, stdio or in-process replace it.
const fabric = new Fabric(new ConnectTransport({ baseUrl: "https://subsix.ai" }));

const account = await fabric.account("mission-124");
const figure = headline(account);
// A missing measure is null, never 0: the rule this SDK was built to keep.
console.log(figure ? figure.microPerVerified + " micro$ / verified unit" : unknownReason(account));
Read the SDK source

Quickstart

1. Get an API key

An organisation admin mints keys with POST /api/apikeys. The raw key is returned once; the server keeps only a hash.

curl https://subsix.ai/api/apikeys \
  -H "Authorization: Bearer $SUBSIX_SESSION" \
  -H "Content-Type: application/json" \
  -d '{"name":"quickstart"}'

# → { "id": "key_…", "name": "quickstart", "prefix": "sk_live_…", "key": "sk_live_…" }
2. Set the base URL

Point your client at https://subsix.ai/v1 for chat, and https://subsix.ai/api for the control API.

3. Make your first chat call

Any model id returned by GET /v1/models works. Streaming is supported with stream: true.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.SUBSIX_API_KEY,
  baseURL: "https://subsix.ai/v1",
});

const chat = await client.chat.completions.create({
  model: "gpt-4o", // any id from GET /v1/models
  messages: [{ role: "user", content: "Say hello in one word." }],
  max_tokens: 16,
});

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

Or with curl:

curl https://subsix.ai/v1/chat/completions \
  -H "Authorization: Bearer $SUBSIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Say hello in one word."}],"max_tokens":16}'

API reference

Two surfaces, one credential model. Both authenticate with Authorization: Bearer <token> — the gateway takes an API key or a sandbox token, and the platform API takes a session token.

OpenAI-compatible gateway · /v1
GET/v1/models
List the models this gateway can relay.
POST/v1/chat/completions
Chat completions, streaming included; metered and capped per organisation.
Platform API · /api
Projects & files
GET/api/projects
List the organisation's projects.
POST/api/projects
Create a project.
PATCH/api/projects/:id
Update a project.
DELETE/api/projects/:id
Delete a project (admin).
POST/api/projects/:id/sandbox-token
Mint a token for a sandbox.
GET/api/projects/:id/files
List project files.
PUT/api/projects/:id/files/*path
Upload a file.
GET/api/projects/:id/files/*path
Download a file.
DELETE/api/projects/:id/files/*path
Delete a file.
POST/api/projects/:id/files-presign/*path
Presign an upload/download.
Sessions & missions

JSON-RPC methods on the WebSocket at /ws, not REST paths.

RPCsession.list
List sessions.
RPCsession.create
Start a session.
RPCsession.open
Reopen a session.
RPCsession.send
Send a message.
RPCsession.edit
Edit a turn.
RPCsession.stop
Stop a running session.
RPCsession.approve
Approve or deny an action.
RPCsession.delete
Delete a session.
RPCmission.list
List missions.
RPCmission.get
Get one mission.
RPCmission.create
Create a mission.
RPCmission.cancel
Cancel a mission.
RPCmission.reset
Reset a mission.
RPCworkforce.list
List workforces.
RPCestimate.propose
Propose an estimate.
Billing & usage
GET/api/billing
Current balance and spend.
POST/api/billing/checkout
Start a Stripe checkout (admin).
POST/api/billing/webhook
Stripe webhook (signature-authenticated).
GET/api/usage
Metered usage.
POST/api/usage/limit
Set the org spend cap (admin).
Identity & orgs
GET/api/me
The current account.
GET/api/me/export
Export account data.
DELETE/api/me
Delete the account.
GET/api/orgs
List organisations.
POST/api/orgs
Create an organisation.
GET/api/orgs/members
List members.
POST/api/orgs/members
Add a member.
PATCH/api/orgs/members/:userId
Set a member's role.
DELETE/api/orgs/members/:userId
Remove a member.
POST/api/apikeys
Create an API key (admin).
GET/api/apikeys
List API keys (admin).
DELETE/api/apikeys/:id
Revoke an API key (admin).
Auth
POST/api/auth/signup
Create an account.
POST/api/auth/signin
Sign in.
POST/api/auth/refresh
Refresh a session.
POST/api/auth/signout
Sign out.
POST/api/auth/switch-org
Switch organisation.
POST/api/waitlist
Join the waitlist (no auth).
Events, analytics & more
GET/api/events
SSE stream of project events.
GET/api/analytics
Aggregated usage analytics.
GET/api/decisions
Routing decisions.
GET/api/audit
Audit log (admin).
GET/api/healthz
Liveness probe.
POST/api/ws/ticket
Mint a WebSocket upgrade ticket.
GET/api/personal
Personal context.
GET/api/hf/search
Search Hugging Face models.
GET/api/hf/models/:id
Hugging Face model info.
POST/api/projects/:id/hf/download
Download a model into a project.