REST & gRPC · v1

API Reference

The WhiteBox API exposes a single decision endpoint. POST a prompt and options; receive a consensus verdict, confidence score, and full run trace. All requests require a Bearer token.

Authentication

All API requests must include an Authorization header with your API key as a Bearer token. Keys are issued on account creation and can be rotated from your dashboard.

Authorization: Bearer wb_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Keys prefixed wb_live_ hit production. Keys prefixed wb_test_ run against the sandbox — decisions are simulated and not billed.

POST

/v1/decide

Submits a decision prompt to the consensus engine. WhiteBox fans out the request across models and runs, scores agreement and log-probability mass, and returns a verdict envelope. If confidence falls below your configured threshold the decision is also routed to your human-review queue.

Request
{
  "prompt": "Classify this product: rose-scented dish brush, bamboo handle, 250g",
  "options": [
    "household_cleaning",
    "personal_care",
    "kitchen"
  ],
  "runs": 7,
  "models": [
    "openai/gpt-4o-mini",
    "anthropic/claude-3-haiku"
  ],
  "threshold": 0.75,
  "metadata": {}
}
Response 200
{
  "id": "dec_9f3a21d8b4c7",
  "verdict": "household_cleaning",
  "confidence": 0.831,
  "above_threshold": true,
  "escalated": false,
  "distribution": {
    "household_cleaning": 0.831,
    "personal_care": 0.124,
    "kitchen": 0.045
  },
  "runs": 7,
  "latency_ms": 1243,
  "cost_usd": 0.0061
}
python
typescript
curl

gRPC

For latency-sensitive applications a gRPC endpoint is available. Use the same Bearer token in the authorization metadata header.

grpc.whiteboxhq.ai:443

Proto definitions and generated client stubs for Python, TypeScript, and Go are available on github.com/whiteboxhq.