Skip to main content
AI Agent IntegrationUse the Maestro skill file below to teach your agent how to query Maestro APIs and pay with x402.

Provide the Maestro skill directly

https://raw.githubusercontent.com/maestro-org/maestro-skill/refs/heads/main/SKILL.md

Install the Maestro skill with npx

npx skills add maestro-org/maestro-skill

What is x402?

x402 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

1

1. Request an endpoint

Send a Maestro API request. If authentication or credits are missing, the gateway returns HTTP 402.
2

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.
3

3. Get JWT and purchase guidance

The gateway returns Authorization: Bearer <jwt> (valid for about 1 hour) and, when needed, purchase details.
4

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.

Payment Requirements and Limits

Supported chains: Ethereum, Base
Supported currency: USDC
Single credit cost: $0.000025 per credit
Purchase limits
  • Min purchase: $0.10 = 4,000 credits
  • Max purchase: $50.00 = 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

x402 Protocol Specification

Read the full x402 specification, explore SDKs (TypeScript, Python, Go), and view integration guides.