Pay‑per‑Answer Endpoints (x402)

First POST returns a 402 quote with Pay + intentId. After paying on‑chain, POST again with { intentId, txHash } to get the result.

Demand Insights (Visitor Chats)

Turn anonymized visitor transcripts into conversion‑ready insights (messaging, pricing, GTM). Endpoint: POST /demand-insights

Step 1 — Quote (402 with Pay + X-Price-Intent)
curl -sS -D /tmp/di.h -o /tmp/di.json -X POST 'https://aiagentstore.ai/demand-insights' \
+  -H 'Content-Type: application/json' \
+  --data-raw '{"query":"Which landing‑page claims resonate most with visitors evaluating AI agents? List top 5 themes with example copy."}'
Step 2 — Redeem after payment (200 with result)
INT1=$(awk '/^X-Price-Intent:/ {print $2}' /tmp/di.h | tr -d '
'); TX=0xYOUR_TX_HASH; \
+curl -sS -i -X POST 'https://aiagentstore.ai/demand-insights' \
+  -H 'Content-Type: application/json' \
+  --data-raw '{"intentId":"'"$INT1"'","txHash":"'"$TX"'","query":"Which landing-page claims resonate most with visitors?"}'

AI Early Adopters’ Goals (1‑Year)

Answers from a live dataset of 12‑month goals by AI‑interested subscribers. Endpoint: POST /ai-early-adopters-goals

Step 1 — Quote (402 with Pay + X-Price-Intent)
curl -sS -D /tmp/goals.h -o /tmp/goals.json -X POST 'https://aiagentstore.ai/ai-early-adopters-goals' \
+  -H 'Content-Type: application/json' \
+  --data-raw '{"query":"What are the top problems people aim to solve in the next 12 months? Rank the top 10 with brief stats and examples."}'
Step 2 — Redeem after payment (200 with result)
INT2=$(awk '/^X-Price-Intent:/ {print $2}' /tmp/goals.h | tr -d '
'); TX2=0xYOUR_OTHER_TX_HASH; \
+curl -sS -i -X POST 'https://aiagentstore.ai/ai-early-adopters-goals' \
+  -H 'Content-Type: application/json' \
+  --data-raw '{"intentId":"'"$INT2"'","txHash":"'"$TX2"'","query":"Top 10 problems with brief stats and examples."}'

Agent Conversions Analytics

Aggregated marketplace conversions grouped by category/industry/agent/country. Endpoint: POST /analytics/agent-conversions. Provide at most one optional filter (country|category|industry). Allowed values: /developer/analytics-filters.

Step 1 — Quote (402 with Pay + X-Price-Intent)
curl -sS -D /tmp/conv.h -o /tmp/conv.json -X POST 'https://aiagentstore.ai/analytics/agent-conversions' \
+  -H 'Content-Type: application/json' \
+  --data-raw '{"filters":{"aggregate":"category","country":"US"}}'
Step 2 — Redeem after payment (200 with result)
INT3=$(awk '/^X-Price-Intent:/ {print $2}' /tmp/conv.h | tr -d '
'); TX3=0xYOUR_THIRD_TX_HASH; \
+curl -sS -i -X POST 'https://aiagentstore.ai/analytics/agent-conversions' \
+  -H 'Content-Type: application/json' \
+  --data-raw '{"intentId":"'"$INT3"'","txHash":"'"$TX3"'","filters":{"aggregate":"category","country":"US"}}'

Payment (x402)

  1. POST → get a 402 with Pay header and intentId.
  2. Send ≥ 0.49 USDC on Base (chainId 8453) to the recipient from the Pay header.
  3. 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 with accepted USDC token contracts.

Errors: intent_required, intent_not_found, tx_required, tx_not_confirmed, transfer_not_found, insufficient_amount, tx_already_used, invalid_filters (analytics), already_consumed.