---
title: "Agent Subscribe (x402 Gasless Payment)"
method: POST
path: "/api/v1/payments/agent-subscribe"
tags: ["Payments"]
---

# Agent Subscribe (x402 Gasless Payment)

`POST /api/v1/payments/agent-subscribe`

## Request

- Base URL: `https://cryptodataapi.com`
- URL: `https://cryptodataapi.com/api/v1/payments/agent-subscribe`
- Auth: none declared

Gasless one-shot onboarding for AI agents. Pay with USDC on Base via x402 -- no ETH gas needed.

**How it works (2 HTTP calls):**

1. **Call with no payment header** -- receive 402 with payment options (facilitator URL, price, networks).
2. **Sign the USDC payment with your wallet** (off-chain EIP-712 signature, zero gas).
3. **Call again with `x-payment` header** -- facilitator settles on-chain, you get an API key + PRO subscription.

**Supported networks:** Base (USDC), Ethereum (USDC), Solana (USDC).
Recommended: **Base** for lowest settlement cost.

**Plans:**
- Pro:      monthly (real-time data, derivatives, on-chain analytics)
- Pro Plus: monthly (adds quant/regime engine, historical data & Parquet downloads)
Current pricing: the 402 response carries the exact USDC amount, or see https://cryptodataapi.com/pricing
Always list price: discount codes are not accepted here (400) — they apply only to
card or crypto checkout from the logged-in dashboard.

**Key resolution on repeat calls:**
- Include `X-API-Key` header to renew that key's subscription.
- No key header: looks up existing key by your wallet address, or creates a new one.
- New API keys are returned **once** -- save it immediately.

## Request body

- AgentSubscribeRequest: Request body for agent subscription (no API key required).
  - `plan` 'monthly' | 'monthly_plus' | 'annual' | 'annual_plus' | 'pass_1h' | 'pass_1d' | 'pass_7d' | 'pass_1h_plus' | 'pass_1d_plus' | 'pass_7d_plus', required
  - `discount_code` string, nullable

## Response `200`

API key and PRO subscription details

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cryptodataapi/apis/crypto-data-api.md) · [All operations](https://skmtc.dev/cryptodataapi/apis/crypto-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cryptodataapi/apis/crypto-data-api/revisions/8628b754ca81?raw)
