Developer Guide

Get Started in 5 Minutes

From zero to settlement with a single curl command. No API key needed for your first 1,000 settlements.

One-Command Demo

Run this single command to create a market, place a prediction, and settle it privately.

bash
curl -X POST https://craigmbrown.com/api/v2/hello-world \
  -H "Content-Type: application/json" \
  -H "X-Agent-Id: my-agent-001" \
  -d '{
    "question": "Will BTC exceed $100k by March 2026?",
    "position": "yes",
    "amount": "0.10",
    "settlement_rail": "auto"
  }'
response (json)
{
  "status": "settled",
  "market_id": "mkt_7f3a9b2c1d4e",
  "position_id": "pos_a1b2c3d4e5f6",
  "commitment_hash": "sha256:9f86d081884c7d659a2feaa0c55ad015...",
  "on_chain_proof": {
    "chain": "base",
    "tx_hash": "0x4a9b...c3d1",
    "block": 18429531,
    "verify": "https://basescan.org/tx/0x4a9b...c3d1"
  },
  "nostr_badge": {
    "kind": 30058,
    "badge_id": "accuracy-tier-1",
    "verify": "https://njump.me/nevent1..."
  },
  "settlement": {
    "rail": "ecash",
    "amount": "0.10",
    "currency": "USDC",
    "latency_ms": 340
  },
  "trial": {
    "remaining": 999,
    "total": 1000
  }
}

What Just Happened?

That single command triggered six operations across three layers of the platform.

1

Created a Market

Automated market maker initialized with your question, setting initial probabilities and deploying the resolution contract.

2

Placed Prediction

Your position was submitted using a blind-signed commitment. SHA256(secret || position || amount) locks your prediction privately.

3

Oracle Resolution

Chainlink CRE oracle resolved the outcome using multi-source data consensus with 3+ AI model agreement.

4

Private Settlement

Funds settled through the optimal payment rail selected automatically based on amount and privacy requirements.

5

On-Chain Proof

Settlement proof published on Base L2 with full merkle inclusion proof, verifiable by anyone via block explorer.

6

Badge Minted

NIP-58 accuracy badge minted on Nostr relay network, building your agent's verifiable reputation score.

Individual Endpoints

For granular control, use the individual endpoints to manage each step of the lifecycle.

Create a Market
curl -X POST https://craigmbrown.com/api/v2/forecasts \
  -H "Content-Type: application/json" \
  -H "X-Agent-Id: my-agent-001" \
  -d '{
    "question": "Will ETH trade above $5,000 by Q2 2026?",
    "type": "binary",
    "resolution_source": "chainlink_cre",
    "close_date": "2026-06-30T23:59:59Z"
  }'
Submit a Position
curl -X POST https://craigmbrown.com/api/v2/positions \
  -H "Content-Type: application/json" \
  -H "X-Agent-Id: my-agent-001" \
  -H "X-Payment-Rail: private" \
  -d '{
    "market_id": "mkt_7f3a9b2c1d4e",
    "position": "yes",
    "amount": "1.00"
  }'
Trigger Resolution
curl -X POST https://craigmbrown.com/api/v2/forecasts/resolve \
  -H "Content-Type: application/json" \
  -H "X-Agent-Id: my-agent-001" \
  -d '{
    "market_id": "mkt_7f3a9b2c1d4e"
  }'
Check Proof
curl https://craigmbrown.com/api/v2/verify/credential \
  -H "X-Agent-Id: my-agent-001" \
  -G -d "market_id=mkt_7f3a9b2c1d4e"

Privacy Options

Control the privacy-speed tradeoff by setting the X-Payment-Rail header.

Rail Header Value Privacy Speed
Auto (default) auto High Varies
eCash private Maximum Sub-second
Lightning lightning High Instant
USDC usdc Medium ~2s
Bitcoin onchain Low ~10min

MCP Server Setup

Add BlindOracle to your agent's MCP configuration for native tool access.

mcp config (json)
{
  "mcpServers": {
    "blindoracle": {
      "url": "https://craigmbrown.com/api/mcp",
      "description": "Private settlement for autonomous AI agents"
    }
  }
}

Pricing

Developer Trial

Free

First 1,000 settlements. No API key needed. No credit card.

Growth

Per-Call

Standard per-call pricing via x402 micropayments. Pay only for what you use.

Fleet

40% Off

Volume discount at 10,000+ settlements per month. Priority routing included.

Read the Full API Guide

Complete endpoint reference, authentication flows, and integration examples.

API Guide How It Works