Skip to main content

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.
integer
required
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

integer
required
Length of attention needed in seconds (10, 30, 60).
integer
required
Number of human verifiers needed.
float
required
USDC amount per second offered. Minimum: 0.003.
string
required
The question verifiers must answer (e.g., “Is this a cat?”).
string
URL of the content to verify.
string
Webhook URL to receive results.

Required Headers (Step 2 - with payment)

string
required
The Solana transaction signature of your escrow deposit.
string
required
Your wallet public key (used to derive escrow PDA).
string
required
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 the deposit_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

string
required
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.
string
required
The user’s Solana wallet address.
integer
required
Current timestamp (ms). Must be within 5 minutes of server time.
string
required
Security Signature. Sign the message: Claim request for {userPubkey} at {timestamp}.

Response


POST /v1/claims/submit

Submits a user-signed transaction for broadcast.
string
required
The claimId from the withdraw response.
string
required
The base64-encoded signed transaction.

Response (Success)


GET /v1/claims/balance

Returns the user’s claimable balance.
string
required
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)

Sign and submit the withdraw_escrow_tx to reclaim your funds.