Overview
To query an AI agent, subscribers need to:- Have an active subscription to a plan associated with the agent
- Generate an x402 access token
- Include the token in requests to the agent
Get X402 Access Token
The x402 access token authorizes requests to agents and enables credit verification/settlement.Token Generation Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
plan_id | str | Yes | The payment plan ID |
agent_id | str | No | Target agent ID (recommended) |
redemption_limit | int | No | Max number of redemptions |
order_limit | str | No | Max spend in wei |
expiration | str | No | ISO 8601 expiration date |
Advanced Token Options
Make Requests to Agents
Using the x402 Payment Header
Include the access token in thepayment-signature header (per x402 v2 HTTP transport spec):