# Mazza Group — AI APIs (x402) # Agent-facing documentation for AI assistants and autonomous agents. ## Overview Mazza Group exposes 23 AI API endpoints (22 paid + 1 free smoke test) on the x402 protocol. - Base URL: https://mazzagrp.com - Payment: x402 v2 (HTTP 402) — USDC on Base mainnet - Network: eip155:8453 (Base mainnet) - USDC token: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 - Pay to: 0xD98b6969fab0bA4D4BB086fF273ff7ccD284CEe8 - No API key, no account, no signup. Every endpoint takes one JSON field: {"prompt": "..."} - Model: Llama 3.3 70B via Cloudflare Workers AI - Free smoke test: POST /api/demo — one real LLM answer, no payment ## Free utilities in Rust (no payment, no key) A separate service, same company: five free endpoints and an MCP server written in Rust. - Base URL: https://rust.mazzagrp.com - No auth, no payment, no signup. - GET /v1/health -> status, version, uptime - POST /v1/tokens {"text","model"} -> exact GPT token count (tiktoken BPE, o200k_base for gpt-4o/o3/o4) - POST /v1/hash {"text"} -> SHA-256 - POST /v1/extract {"text"} -> emails, urls, phones, hashtags - GET /v1/uuid?n=N -> 1..1000 UUID v4 - MCP server: https://rust.mazzagrp.com/mcp (Streamable HTTP, JSON-RPC 2.0, protocol 2025-06-18) Tools: tokens, hash, extract, uuid, health — all free, no payment envelope. - Measured: 0.6 ms median internal, 147 ms public via Cloudflare. ## MCP Server (recommended for agents) Endpoint: https://mazzagrp.com/mcp (Streamable HTTP, JSON-RPC) Server card: https://mazzagrp.com/.well-known/mcp/server-card.json All 23 endpoints are exposed as MCP tools (22 paid + demo_free). tools/list and initialize are free; tools/call returns an MCP isError envelope containing the x402 payment requirements — sign the USDC transfer and retry the same HTTP request with the PAYMENT-SIGNATURE header. ## Payment Flow (x402 v2) 1. POST to any endpoint. You receive HTTP 402 with "accepts[0]": { scheme: "exact", network: "eip155:8453", amount: "", asset: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", payTo: "0xD98b6969fab0bA4D4BB086fF273ff7ccD284CEe8", maxTimeoutSeconds: 300 } 2. Produce an EIP-3009 `transferWithAuthorization` signature for that exact amount (amount is in atomic units: $1.00 = 1000000). 3. Retry the identical request with header: PAYMENT-SIGNATURE: <0x signature> 4. Response: 200 with the AI result. ## Endpoints (23, all POST, all x402) Format: path | price per call (USDC on Base) /api/demo | FREE — one real LLM answer, no payment (smoke test, no signature needed) /api/recall | $0.20 — Verified knowledge recall / memory lookup /api/character | $0.10 — Character-consistent roleplay generation /api/storyforge | $0.60 — Multi-arc story generation /api/puzzles | $0.80 — Logic puzzle generation /api/design | $0.80 — UI/UX design specifications /api/temporal | $0.80 — Time-series / temporal analysis /api/sheets | $1.00 — Spreadsheet formulas & automation /api/chatbot | $1.00 — Chatbot flows and system prompts /api/longqa | $1.00 — Long-form verified Q&A /api/sql | $1.20 — Natural language to optimized SQL /api/arena | $1.20 — Competitive model benchmarking /api/rag | $1.50 — Retrieval-augmented generation /api/autoflow | $1.50 — Workflow automation plans /api/negotiator | $1.50 — Negotiation strategy & simulation /api/desktop | $1.50 — Desktop automation / RPA planning /api/simulation | $2.00 — Monte Carlo & decision simulation /api/mcp-eval | $2.00 — MCP tool-chain security evaluation /api/worldbuilder | $2.00 — Worldbuilding with consistent lore /api/webagent | $1.80 — Web agent execution planning /api/event-ops | $2.50 — Event planning & ops: run-of-show, staffing, risk, vendor negotiation /api/consultation | $5.00 — AI strategy consultation with decision traces /api/automation | $15.00 — Full agent workflow design (most expensive) /api/x402bench | $0.50 — Agent commerce leaderboard + benchmark spec (x402 Agent Commerce Bench) ## x402bench (flagship data product) POST https://mazzagrp.com/api/x402bench | $0.50 - mode=leaderboard (default): live agent-commerce leaderboard, services + volumes - mode=spec: benchmark spec for running your own agent commerce benchmarks - Repo: https://github.com/itsmeadamdamroma/x402bench ## Quick Example (curl) curl -X POST https://mazzagrp.com/api/recall \ -H "Content-Type: application/json" \ -d '{"prompt": "what is the x402 protocol?"}' # -> HTTP 402 (payment requirements) -> sign -> retry with PAYMENT-SIGNATURE ## Error Handling - 402: payment required/invalid — follow the accepts[] instructions, do not retry without a valid PAYMENT-SIGNATURE. - 429: rate limited — exponential backoff. - 5xx: upstream model error — retry once, then surface to the user. ## Links - API docs: https://mazzagrp.com/api-docs - Per-endpoint docs: https://mazzagrp.com/api-docs/ (e.g. /api-docs/rag) - Agent card: https://mazzagrp.com/.well-known/agent-card.json - OpenAPI spec: https://mazzagrp.com/openapi.json - x402bench page: https://mazzagrp.com/x402bench - Contact: hello@mazzagrp.com | Telegram: t.me/Mazza_Group_