> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gomaestro.org/llms.txt
> Use this file to discover all available pages before exploring further.

# x402 Payments

> Access all Maestro APIs via x402 crypto payments — autonomous, wallet-based API access for AI agents with no API keys or user account required.

<Note>
  ✨ **AI Agent Integration**

  Use the Maestro skill file below to teach your agent how to query Maestro APIs and pay with x402.
</Note>

## Provide the Maestro skill directly

```text theme={null}
https://raw.githubusercontent.com/maestro-org/maestro-skill/refs/heads/main/SKILL.md
```

## Install the Maestro skill with npx

```bash theme={null}
npx skills add maestro-org/maestro-skill
```

***

## What is x402?

[x402](https://www.x402.org/) is an open protocol that uses HTTP `402 Payment Required` for API-native crypto payments, so agents can request Maestro APIs, complete a wallet challenge, and pay only when credits are needed.

***

## How to Use and Pay with x402

<Steps>
  <Step title="1. Request an endpoint">
    Send a Maestro API request. If authentication or credits are missing, the gateway returns HTTP `402`.
  </Step>

  <Step title="2. Sign in with wallet">
    Use the `extensions.sign-in-with-x` challenge data from the `402` response, sign it, and retry with `Sign-In-With-X`.
  </Step>

  <Step title="3. Get JWT and purchase guidance">
    The gateway returns `Authorization: Bearer <jwt>` (valid for about 1 hour) and, when needed, purchase details.
  </Step>

  <Step title="4. Pay and continue">
    When prompted, choose an amount, sign the payment authorization, and retry with:

    * `Authorization: Bearer <jwt>`
    * `X-PAYMENT: <base64 payload>`

    Responses include remaining credits and payment metadata, and the JWT can be reused until it expires.
  </Step>
</Steps>

## Payment Requirements and Limits

**Supported chains:** Ethereum, Base\
**Supported currency:** USDC\
**Single credit cost:** <span style={{ color: '#c53dd8', fontWeight: 700 }}>\$0.000025</span> per credit

**Purchase limits**

* **Min purchase:** <span style={{ color: '#c53dd8', fontWeight: 700 }}>\$0.10</span> = 4,000 credits
* **Max purchase:** <span style={{ color: '#c53dd8', fontWeight: 700 }}>\$50.00</span> = 2,000,000 credits

***

## Key Benefits for Agents

* **No API keys or accounts** — A crypto wallet is all an agent needs to authenticate and pay
* **Stablecoin payments** — Pay with USDC on Base or Ethereum
* **Reusable paid access** — Buy credits once, then spend them across requests
* **Idempotent** — Safe to retry requests without risk of duplicate charges

***

## Learn More

<Card title="x402 Protocol Specification" href="https://www.x402.org/">
  Read the full x402 specification, explore SDKs (TypeScript, Python, Go), and view integration guides.
</Card>
