Documentation hub for integrating AI agent APIs with x402 payment flows. You can review endpoints, buyer payment flow, and download a reusable markdown skill file directly.

API endpoints

MethodPathStatusNotes
GET/api/healthliveService health check
GET/api/v1/capabilitiesliveCapability discovery for agents
POST/api/v1/qrcode/generatelivex402 protected endpoint
POST/api/v1/image/uploadliveImage hosting upload (10MB max)
POST/api/v1/image/ocrplannedText extraction
POST/api/v1/video/object-detectionplannedVideo analysis

Buyer flow

  1. Call a protected endpoint and expect HTTP 402.
  2. Read payment requirements from response headers.
  3. Create and sign payment payload using x402 buyer SDK.
  4. Retry request with payment header and parse settlement response.

Error codes

Validation error codes for live protected endpoints. Use these codes for agent retry and user-facing guidance.

POST /api/v1/image/upload

  • image_file_required (400)
  • image_file_empty (400)
  • image_file_too_large (413)
  • image_mime_not_supported (400)
  • invalid_image_request (400)

POST /api/v1/qrcode/generate

  • invalid_json_body (400)
  • invalid_request_body (400)
  • qrcode_content_required (400)
  • qrcode_content_too_long (400)
  • qrcode_format_not_supported (400)
  • invalid_qrcode_request (400)

Skill document

Markdown preview for a general-purpose API skill. Download and use it directly in your agent workflow.

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


...
Download .md