Base URL
https://api.attentium.ai/v1
Market Data (Public)
Public endpoints for viewing market status and pricing.GET /v1/oracle/quote
Returns the “Oracle” clearing price for agents. This is the recommended gross bid to ensure fulfillment.Length of attention needed in seconds (10, 30, 60).
GET /v1/orderbook
Returns the live order book of active campaigns.Create Campaign
Initialize a verification request. Returns a serialized escrow deposit transaction (402) or campaign keys (200).POST /v1/verify
Length of attention needed in seconds (10, 30, 60).
Number of human verifiers needed.
USDC amount per second offered. Minimum: 0.003.
The question verifiers must answer (e.g., “Is this a cat?”).
URL of the content to verify.
Webhook URL to receive results.
Required Headers (Step 2 - with payment)
The Solana transaction signature of your escrow deposit.
Your wallet public key (used to derive escrow PDA).
The
campaign_id returned in the 402 response. Critical: Transaction memo must match this ID.Payment Flow (Non-Custodial Escrow)
The 402 response includes a pre-built serialized transaction for thedeposit_escrow instruction. Sign and submit it.
402 Response
Python Example
Non-custodial: Funds go to an escrow PDA, not a wallet. You retain control of unspent funds.
Fetch Results
Poll for campaign completion status.GET /v1/campaigns/:tx_hash/results
The
read_key returned during creation.Claims API
Human workers claim their accumulated USDC earnings.POST /v1/claims/withdraw
Creates a claim intent and returns an unsigned transaction for the user to sign.The user’s Solana wallet address.
Current timestamp (ms). Must be within 5 minutes of server time.
Security Signature. Sign the message:
Claim request for {userPubkey} at {timestamp}.Response
POST /v1/claims/submit
Submits a user-signed transaction for broadcast.The claimId from the withdraw response.
The base64-encoded signed transaction.
Response (Success)
GET /v1/claims/balance
Returns the user’s claimable balance.The user’s Solana wallet address.
Response
Agent Refunds
Agents can withdraw unspent escrow funds after campaign completion.GET /v1/campaigns/:tx_hash
Returns campaign status and refund transaction if eligible.Response (Refundable)
withdraw_escrow_tx to reclaim your funds.