Step 1
Call the protected endpoint
Your agent sends a request to /api/v1/qrcode/generate.
Built for AI agents
Monetize pay-per-call endpoints without login. Ship agent-ready APIs with x402 payment flow and clean developer ergonomics.
---
name: x402-agent-api-skill
description: AI agent skill for x402 paid APIs with live image-hosting, qrcode-generate, and news-search, plus planned image/video/vision APIs (colorize, super-resolution, enhance, smart-redact, smart-crop, inpaint, qrcode-decode, tags, game-scene-detect, quality-score, face/human/pet/plate-detect, OCR, idcard-ocr, background-remove, video object-detection, portrait-segmentation).
version: 1.2.0
---
# x402 Agent API Skill
Use this skill to let your AI agent call paid endpoints on `https://www.x402api.app/` with x402.
## Quick start for AI agents
1. Place this file in your OpenClaw, Codex, or Claude project root.
2. Tell your AI agent: "Help me convert this text into a QR code." or "Help me upload this image and return an online URL."
3. The agent should follow x402 payment flow automatically.
## Install dependencies
```bash
npm install @x402/core @x402/evm viem
```
## Required environment variables
```bash
EVM_PRIVATE_KEY=0x_your_private_key
```
Only `EVM_PRIVATE_KEY` is required for buyer usage.
`API_BASE_URL` is optional because this skill defaults to `https://www.x402api.app/`.
## Out-of-the-box usage
1. Put this `SKILL.md` in your project root (OpenClaw, Codex, or Claude).
2. Set only one env var:
...$0.0001
Per image upload request (10MB max)
No auth
Payment-gated access for agents
Capability-first
One payment rail across image and video endpoints
Step 1
Your agent sends a request to /api/v1/qrcode/generate.
Step 2
The server responds with x402 requirements for settlement.
Step 3
Client signs payment, retries request, and receives the API result.
Native x402 monetization for agent API calls.
Predictable request/response shapes designed for AI agents.
Pay only for what you use, per call.
Minimal configuration with clear payment and response lifecycle.
API pricing cards
Image hosting
$0.0001
POST /api/v1/image/upload
Per upload, max 10MB
QR code generation
$0.01
POST /api/v1/qrcode/generate
Per successful call
News search
$0.1
POST /api/v1/news/search
Per query, raw upstream result
QR code recognition
TBD
POST /api/v1/image/qrcode/decode
Image OCR
TBD
POST /api/v1/image/ocr
Image enhancement
TBD
POST /api/v1/image/enhance
Image super-resolution
TBD
POST /api/v1/image/super-resolution
Intelligent redaction
TBD
POST /api/v1/image/smart-redact
Smart crop
TBD
POST /api/v1/image/smart-crop
Image inpainting
TBD
POST /api/v1/image/inpaint
Image tagging
TBD
POST /api/v1/image/tags
Game scene recognition
TBD
POST /api/v1/image/game-scene-detect
Image quality scoring
TBD
POST /api/v1/image/quality-score
Face recognition
TBD
POST /api/v1/vision/face-detect
Human body detection
TBD
POST /api/v1/vision/human-detect
Pet recognition
TBD
POST /api/v1/vision/pet-detect
Vehicle and plate recognition
TBD
POST /api/v1/vision/plate-detect
ID document recognition
TBD
POST /api/v1/image/idcard-ocr
Intelligent background removal
TBD
POST /api/v1/image/background-remove
Video object detection
TBD
POST /api/v1/video/object-detection
Video portrait segmentation
TBD
POST /api/v1/video/portrait-segmentation
Your buyer wallet is usually missing USDC on Base mainnet or using the wrong chain.
No. x402 handles economic access control so your AI agent can call the API directly.