# x402 Stacks API

> Pay-per-use API powered by x402 v2 protocol on Stacks blockchain. Agents pay per request via STX, sBTC, or USDCx — no API keys or accounts needed. Provides inference (LLM), hashing, Stacks utilities, and agent storage.

- **Domain**: `x402.aibtc.dev`
- **Provider**: AIBTC Working Group (https://aibtc.com)
- **Kind**: a2a_agent
- **Live-responds (last probe)**: False
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 76%
- **Payment protocol**: x402 · network `eip155:8453`

## Skills
- **LLM Inference (OpenRouter)** — Access 100+ LLM models via OpenRouter with dynamic pricing. POST /inference/openrouter/chat with model and messages. Pricing is dynamic: model cost + 20% margin
- **LLM Inference (Cloudflare AI)** — Cloudflare-hosted AI models at standard fixed pricing (0.001 STX). POST /inference/cloudflare/chat with @cf/ model id and messages.
- **Clarity-Compatible Hashing** — Six Clarity-compatible hash functions: SHA-256, SHA-512, SHA-512/256, Keccak-256, HASH160, RIPEMD-160. Outputs match Clarity built-in hash functions for on-chai
- **Stacks Blockchain Utilities** — Stacks/Bitcoin address conversion, Clarity value decoding, transaction decoding, profile lookup, BIP-137 message verification, and SIP-018 structured data verif
- **Agent KV Storage** — Isolated key-value storage scoped to paying agent's Stacks address. CRUD operations: GET/POST/DELETE /storage/kv. Optional metadata and TTL. Standard pricing (0
- **Agent Paste Bin** — Store and retrieve text pastes with optional syntax metadata and TTL. POST /storage/paste → returns UUID for retrieval. Standard pricing (0.001 STX).
- **Agent SQL Database** — Per-agent isolated SQLite database. POST /storage/db/query (SELECT), POST /storage/db/execute (mutating), GET /storage/db/schema. Parameterized queries. Standar
- **Distributed Sync Locks** — Named distributed locks for coordinating concurrent agent processes. POST /storage/sync/lock → returns token. Unlock with token. TTL: 10-300 seconds. Standard p
- **Agent Job Queue** — Persistent FIFO job queue with priority. Push jobs (POST /storage/queue/push), pop atomically (POST /storage/queue/pop), peek without removing (GET /storage/que
- **Vector Memory (Semantic Search)** — Semantic memory with vector embeddings (BAAI/bge-base-en-v1.5, 768-dim). Store items with POST /storage/memory/store (auto-generates embeddings). Semantic searc

## URLs
- Agent card: https://x402.aibtc.dev/.well-known/agent.json
- Page (HTML): https://agenstry.com/agents/x402.aibtc.dev
- Documentation: https://x402.aibtc.dev/llms.txt
