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 and qrcode-generate, 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.flashcode.live/` 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
API_BASE_URL=https://www.flashcode.live/
```
## Currently available features
1. QR code generation
2. Image hosting
## Available endpoints
...$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.
Uses withX402 so settlement happens only for successful API responses.
Upload one image and get an online URL back, with a strict 10MB limit.
Simple JSON payloads, stable request IDs, and predictable error shapes.
QR generation is live now, with image/video capability slots already reserved.
Health checks, capability endpoint, and endpoint-level pricing are ready.
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
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.