Back

API Reference

Cero Labs API

Expert escalation infrastructure for agentic AI. Route edge cases to matched human experts and receive structured, schema-validated responses.

Avg. Response

< 30s

standard SLA

Expert Network

4 domains

and growing

Uptime

99.9%

Railway + Supabase

Quick Start

Get from zero to your first escalation in 3 commands.

1. Register and get your API key
curl -X POST https://web-production-2dece.up.railway.app/auth/register \
  -H "Content-Type: application/json" \
  -d '{"name": "My Agent", "email": "dev@example.com"}'
2. Send an escalation
curl -X POST https://web-production-2dece.up.railway.app/escalations \
  -H "X-API-Key: cero_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "healthcare.rcm",
    "query": "CPT code review for E/M level mismatch",
    "context": {"claim_id": "CLM-1234", "diagnosis": "M79.3"},
    "priority": "standard"
  }'
3. Poll for the resolution
curl https://web-production-2dece.up.railway.app/escalations/{escalation_id} \
  -H "X-API-Key: cero_your_key_here"

SDK Usage

TypeScript / Node.js
import { Cero, z } from '@cerolab/sdk';

const cero = new Cero(process.env.CERO_API_KEY);

const schema = z.object({
  action: z.enum(['approve', 'reject', 'escalate']),
  reason: z.string(),
  priority: z.number()
});

const result = await cero.escalate({
  context: "Claim denied — code mismatch on E/M level.",
  domain: "rcm_review",
  schema: schema,
  timeoutMs: 30000
});

// result.data is fully typed
console.log(result.data.action);  // "approve"
console.log(result.data.reason);  // "Codes align with documentation"

Authentication

All API requests (except registration) require an API key passed via the X-API-Key header. Keys use the format cero_ followed by 48 hex characters.

API keys are shown only once at creation. Store them securely. Keys are SHA-256 hashed before storage.

Tier Limits

TierPer DayPer Month
free10100
pro50010,000
enterpriseUnlimited

Escalations

Escalations are the core primitive. When your agent hits an edge case, create an escalation with the domain, query, and optional schema. Cero routes it to a matched expert and returns a structured response.

Status Lifecycle

pendingroutedin_reviewresolved

Also: expired (SLA breached) and cancelled (caller cancelled)

SLA Deadlines

PriorityDeadline
urgent5 minutes
standard30 minutes
batch24 hours

Experts

Register domain experts in your tenant pool. Cero routes escalations to the best-matched expert based on domain, quality score, and availability.

Expert Tiers

TierDescription
standardGeneral domain knowledge
seniorDeep expertise, priority routing
principalTop-tier, complex edge cases

Webhooks

When you include a callback_url in your escalation, Cero delivers the resolution via webhook when the expert responds.

Webhook Payload

POST to your callback_url
{
  "event": "escalation.resolved",
  "escalation_id": "uuid",
  "domain": "healthcare.rcm",
  "status": "resolved",
  "resolution": {
    "answer": { "approved_cpts": ["99213", "99214"] },
    "confidence": 0.95,
    "reasoning": "Based on diagnosis M79.3...",
    "expert_id": "uuid",
    "resolved_at": "2026-04-13T14:01:00Z"
  }
}

Timeout: 30 seconds. If your endpoint doesn't respond, check delivery status below.

Error Codes

CodeMeaning
200Success
201Created (escalation, expert, API key)
400Validation error or missing fields
401Missing or invalid API key
404Resource not found or unauthorized
Error response format
{
  "detail": "Invalid API key"
}

Need help? Reach out at support@cerolabs.ai or check the interactive Swagger docs.