AIAgentStore Micro‑Pay APIs
Pay‑per‑answer endpoints using x402 (quote → on‑chain pay → redeem).
Endpoints
POST /demand-insights– insights from anonymized visitor chatsPOST /ai-early-adopters-goals– insights from 1‑year goals datasetPOST /analytics/agent-conversions– aggregated marketplace conversions
Payment (x402)
- POST → get a 402 with
Payheader andintentId. - Send ≥ 0.49 USDC on Base (chainId
8453) to the recipient from the Pay header. - POST again with
{ intentId, txHash }and your body to receive the result.
Note: Step 1 is optional if you already know price/recipient. It returns the Pay details (recipient, chainId, label, expiry) and an intentId required for redemption.
You can also redeem via the x402-payment header (JSON or base64‑JSON). Quotes include X-Payment-Contracts listing accepted USDC contract addresses.
Quick Start (cURL)
Demand Insights (visitor chats)
Returns Markdown insights from anonymized visitor chat transcripts.
curl -i -sS -X POST 'https://aiagentstore.ai/demand-insights' -H 'Content-Type: application/json' --data-raw '{"query":"What are the top 10 problems visitors ask agents to solve? Group by theme and add example quotes."}'curl -sS -X POST 'https://aiagentstore.ai/demand-insights' -H 'Content-Type: application/json' --data-raw '{"intentId":"<intent_id_from_step_1>","txHash":"<0xYOUR_TX_HASH>","query":"What are the top 10 problems visitors ask agents to solve? Group by theme and add example quotes."}'AI Early Adopters’ Goals (1‑year dataset)
Answers from a live dataset of 12‑month goals by AI‑interested subscribers.
curl -i -sS -X POST 'https://aiagentstore.ai/ai-early-adopters-goals' -H 'Content-Type: application/json' --data-raw '{"query":"What will people try to accomplish next year? Group into 10 themes with example quotes."}'curl -sS -X POST 'https://aiagentstore.ai/ai-early-adopters-goals' -H 'Content-Type: application/json' --data-raw '{"intentId":"<intent_id_from_step_1>","txHash":"<0xYOUR_TX_HASH>","query":"What will people try to accomplish next year? Group into 10 themes with example quotes."}'Agent Conversions Analytics
Aggregated marketplace conversions grouped by category/industry/agent/country.
curl -i -sS -X POST 'https://aiagentstore.ai/analytics/agent-conversions' -H 'Content-Type: application/json' --data-raw '{"filters":{"aggregate":"category"}}'curl -sS -X POST 'https://aiagentstore.ai/analytics/agent-conversions' -H 'Content-Type: application/json' --data-raw '{"intentId":"<intent_id_from_step_1>","txHash":"<0xYOUR_TX_HASH>","filters":{"aggregate":"category"}}'Rule: Provide at most one optional filter (country OR category OR industry). Example alternatives: {"filters":{"aggregate":"country"}} or {"filters":{"aggregate":"agent","country":"US"}}. If multiple are sent, the API returns 400 invalid_filters and the purchase is not consumed (you can retry with the same intentId and txHash).
View allowed values (countries, categories, industries).
Errors use short codes: intent_required, intent_not_found, tx_required, tx_not_confirmed, transfer_not_found, insufficient_amount, tx_already_used, invalid_filters (analytics), already_consumed.