Skip to content

Platform API reference

All routes are JSON over HTTPS. Credentials are sent as Authorization: Bearer <token>: an organization key (sk_org_…), a project-scoped platform key (sk_platform_…), or a short-lived session (stk_…) obtained from an Azure DevOps app token. Errors have a stable error.code, a message and a requestId.

Status Meaning
401 Invalid or missing credential
402 Insufficient credits (not retryable)
403 Denied: project, product, feature, cap, frozen wallet, role
409 Conflict, for example a stale version or a replayed idempotency key
429 Rate or concurrency limit; honour Retry-After
Route Purpose
GET /api/v1/pricing The tier table (Pro, Ultimate, Enterprise), annual months, token values, quotesEnabled
POST /api/v1/quotes Create a quote. Body: { organization, email, hostUrl, config: { tier, people, billing }, buyer?, purchaseOrder?, collection? }. Rate limit 5 per hour per address. Returns { id, url } with the private quote link. send_invoice collection requires Enterprise.
GET /api/v1/quotes/:reference?k= Quote summary: lines, total, status, buyer, acceptance, payment.hostedInvoiceUrl, and the sealed organization key once accepted
GET /api/v1/quotes/:reference/pdf?k= Stripe’s quote PDF
POST /api/v1/quotes/:reference/accept?k= Clickwrap acceptance { fullName, title, agreeTerms: true }; creates the workspace, organization and key in one transaction
Route Auth Purpose
POST /api/v1/organizations/activate sk_org_ { extension, appToken, host, hostName, project?, projectName? }. Binds the key to the app token’s collection once; returns { workspace, name, hostName, seats, tier, tierName, premiumPacks, role, project }. Codes: organization_key_required, host_denied, organization_mismatch, host_already_bound.
GET /api/v1/organizations/current any Plan summary: tier, tierName, billing, seats, seatsUsed, hostedModels, userBudgets, includedTokensPerUser, host, canManage, users[] (administrators see everyone; members themselves)
PUT /api/v1/organizations/users/:subject/budget billing admin { monthlyCap: string | null, version? }; Enterprise only (enterprise_required); 409 stale_budget on a concurrent edit
POST /api/v1/organizations/keys billing admin Rotate the organization key; returns { id, key } once
Route Purpose
POST /api/v1/sessions/ado App-token bearer plus { extension, host, project }; returns { token, expiresIn, workspaceId, projectId }. Codes: extension_denied, host_denied, project_unbound, project_denied. Projects of a bound organization bind themselves.
GET /api/v1/workspaces/current/projects Projects this principal may access
GET /api/v1/projects/:binding · PUT /api/v1/projects/:binding Project policy and usage summary; versioned updates of paid access, allowed models and the monthly cap
GET /api/v1/role-features · PUT /api/v1/role-features/:feature Free/Premium/Disabled per pack (publisher authority) and the caller’s access per pack
POST /api/v1/role-features/:feature/analyze Premium analysis executed on the platform after entitlement checks
Route Purpose
GET /api/v1/catalog Offers and supported currencies
GET /v1/billing · GET /api/v1/workspaces/current/billing Wallet units (available, held, included, purchased, frozen), products, subscriptions, role, user budget
GET /api/v1/workspaces/current/entitlements Paid-through features
GET /api/v1/workspaces/current/usage?limit=&before= Wallet ledger; with project= the project’s recent reservations and current-month totals
POST /api/v1/workspaces/current/checkouts { operation, offer, currency } → Stripe Checkout URL
POST /api/v1/workspaces/current/portal-sessions Stripe Customer Portal URL
POST /api/v1/workspaces/current/keys · DELETE …/keys/:id Project-scoped sk_platform_ keys
Route Purpose
GET /v1/models Models this principal may use
GET /v1/access Per-model decisions and the project policy (informational; reservations are still checked)
POST /v1/chat/completions OpenAI-compatible chat with stream: true SSE and tools. Requires Idempotency-Key; retries must reuse it; a completed key replays as 409. Text only.

Upstream model keys never leave the server, and the gateway intentionally rejects images and unsupported request options. The legacy token-quota GET /account contract is not implemented by this service.