Axiom Stack

Axiom Stack Themra · Public API

MULTI-PROTOCOL PAYMENT LIVE

Curl + Bearer in 5 minutes

REST endpoints at api.axiomstack.dev/v1/* return verifiable on-chain attestations. Equity (real-time + audit) and crypto (real-time instant tier; audit ships next sprint) live today; other asset classes follow.

  1. 1. Issue an API key

    In the dashboard → Keys. Copy the axm_live_… token; treat it like a password. Set it as an env var:

    export AXIOM_API_KEY="axm_live_…"
  2. 2. Smoke-test

    No auth needed for /health:

    curl https://api.axiomstack.dev/v1/health
  3. 3. Get an attestation — equity

    curl -X POST https://api.axiomstack.dev/v1/attestation/instant \
      -H "Authorization: Bearer $AXIOM_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"asset_class": 2, "asset_id": "AAPL"}'

    Returns {data, meta} with price + volume + attestation_pda (the on-chain record) + write_tx_sig in under 2 seconds.

  4. 4. …or crypto

    curl -X POST https://api.axiomstack.dev/v1/attestation/instant \
      -H "Authorization: Bearer $AXIOM_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"asset_class": 6, "asset_id": "BTC"}'

    Whitelist: BTC, ETH, SOL, USDC, USDT.

x402 — agent-autonomous payment

live — devnet

Agents with a Solana wallet can pay per call in USDC — no API key, no signup, no human-mediated Stripe top-up. Coexists with Bearer auth on the same endpoint; we prefer Bearer when both are present (predictable enterprise margin) and fall through to x402 for spot agent traffic.

Pricing (USDC, devnet)

  • • Equity instant — $0.02
  • • Equity audit — $0.20
  • • Crypto instant — $0.02
  • • Real estate instant — $0.05

Settlement

Solana devnet. Facilitator: Coinbase Developer Platform. Treasury wallet: 6pPcyDr…A3B3. USDC mint: Circle devnet. You pay 0 gas — facilitator covers Solana fees.

Hit any priced endpoint without auth to see the payment requirements:

curl -X POST https://api.axiomstack.dev/v1/attestation/instant \
  -H "Content-Type: application/json" \
  -d '{"asset_class": 6, "asset_id": "BTC"}'

# → HTTP 402 Payment Required
# Response body (V1-compat) + PAYMENT-REQUIRED response header (V2):
# {
#   "x402Version": 1,
#   "accepts": [{
#     "scheme": "exact",
#     "network": "solana-devnet",
#     "asset": "<USDC mint>",
#     "maxAmountRequired": "20000",          # $0.02 in 6-decimal atomic units
#     "payTo": "6pPcyDr…",                   # treasury OWNER, not ATA
#     "resource": "https://api.axiomstack.dev/v1/attestation/instant",
#     "extra": { "feePayer": "<facilitator pubkey>", "decimals": 6, "symbol": "USDC" }
#   }],
#   "error": "X-PAYMENT header is required"
# }

Sign a Solana transferChecked instruction with the facilitator as fee payer, Base64-encode the payload, and resend with the payment header:

# After signing (use @x402/svm + x402-fetch on Node, or solders on Python):
curl -X POST https://api.axiomstack.dev/v1/attestation/instant \
  -H "Content-Type: application/json" \
  -H "PAYMENT-SIGNATURE: <base64(PaymentPayload)>" \
  -d '{"asset_class": 6, "asset_id": "BTC"}'

# → HTTP 200 with the attestation + PAYMENT-RESPONSE header
# Response envelope includes meta.payment.tx_hash for explorer lookup.

Protocol version

Server emits V2 PAYMENT-REQUIRED response header + V1 JSON body simultaneously, and accepts BOTH V2 PAYMENT-SIGNATURE and V1 X-PAYMENT inbound headers. V1 back-compat sunsets 2026-Q3.

Discovery

api.axiomstack.dev/v1/.well-known/x402 serves the static manifest: endpoints, pricing per asset class, facilitator URLs, both auth modes. Also indexed at Coinbase Bazaar (automatic via CDP) + x402scan + x402-list + x402.direct.

Operational contracts

Idempotency

Optional Idempotency-Key: <uuid> header makes POSTs safely retryable. Server caches 24h + replays byte-for-byte. Same key with different body → 422 idempotency-replay-mismatch.

Rate limits

X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and RateLimit-Policy on every response. 429 carries Retry-After.

Request IDs

Every response echoes X-Request-ID (req_<26-char-base32>). The same id appears in meta.request_id and in every error envelope — include it in support requests.

Errors (RFC 7807)

All errors are application/problem+json with stable type URIs at https://docs.axiomstack.dev/errors/<slug>. Pattern-match on the URI, not on prose.

SDKs + MCP server

Three packages at 0.5.0. Pick the one that matches your stack. SDKs are thin typed wrappers over the REST API — RFC 7807 errors map to typed exceptions, idempotency keys are first-class, 429s auto-retry once with Retry-After.

All SDKs include x402 (Bearer + agent-autonomous payment) + AP2 mandate passthrough + MPP-charge typed exceptions, plus the standalone pay() + discover() primitives, in 0.5.0.

TypeScript / Node

live on npm
npm install @axiom-stack/sdk

Quickstart:

import { AxiomClient } from "@axiom-stack/sdk";

const client = new AxiomClient({ apiKey: process.env.AXIOM_API_KEY });
const res = await client.attestInstant({ assetClass: 2, assetId: "AAPL" });
console.log(res.data.price_micros, res.attestation_pda);

Dual ESM + CJS · TypeScript types bundled · Node 18.3+ (native fetch) · zero runtime deps.

0.5.0 live on npm — real-API roundtrip verified through the SDK boundary. Versions: 0.1.0, 0.3.0, 0.5.0 (0.2.0 skipped per Path A; same capability arrived faster).

Python

live on PyPI
pip install axiom-stack

Quickstart (sync + async clients):

import os
from axiom_stack import AxiomClient

client = AxiomClient(api_key=os.environ["AXIOM_API_KEY"])
res = client.attest_instant(asset_class=2, asset_id="AAPL")
print(res.data.price_micros, res.attestation_pda)

Python 3.9+ · pydantic v2 models · httpx sync + async · CLI axiom query AAPL --class 2.

axiom-stack 0.5.0 live on PyPI —pip install axiom-stack. Real-API roundtrip verified through the SDK boundary. Versions: 0.3.0, 0.5.0.

MCP server (Claude Desktop, Cline, Cursor, &c.)

live on npm

A local stdio Model Context Protocol server — for Cursor, Claude Code, and Claude Desktop. (For claude.ai and other hosted HTTP clients, use the hosted connector at mcp.axiomstack.dev/mcp — see the MCP tools reference.) It exposes five tools to your agent: axiom_health, axiom_list_assets, axiom_attest_instant, axiom_attest_audit, axiom_discover.

Drop this into your Claude Desktop config:

{
  "mcpServers": {
    "axiom-stack": {
      "command": "npx",
      "args": ["-y", "@axiom-stack/mcp-server"],
      "env": { "AXIOM_API_KEY": "axm_live_…" }
    }
  }
}

Then ask Claude: “Get me a verifiable attestation for the current price of AAPL.” The MCP server proxies to the public API; same auth, same RFC 7807 error semantics, same on-chain attestation PDA in the response.

0.5.0 live on npm. Versions: 0.1.0, 0.3.0, 0.5.0 (0.2.0 skipped per Path A). Propagates the full multi-protocol typed-error surface (x402 + AP2 + MPP) from the underlying server + the axiom_discover manifest tool.

Config location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) · %APPDATA%\Claude\claude_desktop_config.json (Windows)

Postman + OpenAPI

Import the Postman collection or hit the OpenAPI 3.1 spec directly for code generation, IDE autocomplete, or your favorite client framework.

API reference

Loading API reference…