SmartconversionAPI
conversion image to webp/avif with 402 payement required, 0.001 and 0.0005 after 1000 requete.
README
<div align="center"> <img src="./public/logo.png" alt="SmartConvert Logo" width="120" style="border-radius: 20px; margin-bottom: 20px;"> <h1>SmartConvert x402</h1> <p><b>The 1st Image Optimization Engine for the Agentic Web</b></p>
<p> <a href="https://api.smartrayon.eu/site">๐ <b>Landing Page</b></a> โข <a href="https://api.smartrayon.eu/public/dashboard/index.html">๐ <b>Live Dashboard</b></a> โข <a href="https://api.smartrayon.eu/public/playground/index.html">๐ฎ <b>Playground</b></a> โข <a href="https://api.smartrayon.eu/public/blog/index.html">โ๏ธ <b>Blog</b></a> โข <a href="https://api.smartrayon.eu/api-docs">๐ <b>Swagger API Docs</b></a> </p>
<p><i>Empower your AI agents with professional image conversion & programmatic M2M payments via x402.</i></p>
<p> <b>English</b> โข <a href="README.fr.md">Franรงais</a> </p> </div>
๐ Overview
SmartConvert x402 is a high-performance Model Context Protocol (MCP) server designed for the autonomous agent economy. It provides a plug-and-play solution for AI assistants (like Claude, Cursor, or AutoGPT) to optimize images while handling payments natively using USDC on Base.
Why it's a Game Changer:
- For AI Agents: Zero-friction image processing. No API keys to manage per userโthe agent pays its own way using the x402 protocol.
- For Developers: Build apps that monetize themselves instantly. Every byte processed generates revenue directly to your wallet.
- Privacy First: High-speed processing using
Sharp(Node.js) with support for WebP, AVIF, PNG, JPEG, and SVG.
<a href="https://glama.ai/mcp/servers/lemaitregabinpro-creator/smartconversion-api"> <img width="380" height="200" src="https://glama.ai/mcp/servers/lemaitregabinpro-creator/smartconversion-api/badge" alt="SmartconversionAPI MCP server" /> </a>
๐ MCP Capabilities
Once connected to your AI assistant, SmartConvert exposes the following tools and intelligence:
๐งฐ Tools
convert_image_to_webp: High-speed conversion to WebP or AVIF. Supports Base64, public URL, or local server path. Triggers the x402 payment lifecycle automatically.convert_batch: ๐๏ธ NEW โ Process up to 5 images in a single parallel call with a discounted group rate.resize_image: ๐ NEW โ Smart resizing with width/height controls and fit/crop strategies.crop_image: โ๏ธ NEW โ Extract precise rectangular regions from any image.compress_image: ๐๏ธ NEW โ Heavy quality optimization without changing the source format.get_image_metadata: ๐ FREE โ Extracts detailed metadata (dimensions, format, DPI, EXIF) via Base64, URL, or local path.
๐ง Prompts (Agentic Intelligence)
smart_optimizer: Fully autonomous workflow: analyze, choose best format, and convert.image_performance_audit: SEO expert that analyzes weight/dimensions and suggests optimizations.format_advisor: Expert advice on choosing between WebP (speed) or AVIF (quality).html_picture_generator: Generates optimized HTML<picture>tags after conversion.technical_troubleshooter: Checks for image corruption and sensitive EXIF data (privacy).image_optimization_agent: Standard autonomous workflow for conversion.x402_payment_help: Interactive guide for the x402 payment flow.
๐ Resources
image-api://capabilities: Overview of all supported tools and formats.image-api://quickstart: Ready-to-use examples for tools and prompts.image-api://pricing: Structured pricing information (USDC on Base).image-api://faq: Frequently asked questions about usage and formats.image-api://usage_statistics: Real-time transparency on platform-wide usage and bytes saved.image-api://instructions: Embedded documentation for the x402 standard.image-api://spec: Full OpenAPI definition for deep integration.
๐ธ The x402 Payment Flow
SmartConvert implements the HTTP 402 Payment Required standard, specifically designed for Machine-to-Machine (M2M) communications.
sequenceDiagram
participant Agent as AI Agent (Cursor/Claude)
participant API as SmartConvert API
participant SDK as x402 EVM SDK (Base)
Agent->>API: POST /convert (No signature)
API-->>Agent: 402 Payment Required + Payment Details
Note over Agent: Agent detects x402 protocol
Agent->>SDK: Sign USDC TransferWithAuthorization
SDK-->>Agent: Cryptographic Payload (Base64)
Agent->>API: POST /convert + payment-signature
API-->>Agent: 200 OK + Optimized Image
โก Quick Start
For Users (Claude Desktop / Cursor)
Simply add the following to your configuration:
{
"mcpServers": {
"smartconvert": {
"url": "https://api.smartrayon.eu/mcp"
}
}
}
Pro Tip: Use localPath or imageUrl instead of Base64 for 10x faster processing.
For Developers (Self-Hosting & Monetization)
- Clone & Config:
cp .env.example .env - Setup Wallet: Enter your
WALLET_RECEIVER_ADDRESSand Coinbase CDP credentials. - Deploy with Docker:
docker compose up -d --build
๐ง Environment Variables
| Variable | Description | Default |
|---|---|---|
PORT |
API Port | 6722 |
WALLET_RECEIVER_ADDRESS |
Where USDC payments are sent | - |
CDP_API_KEY_ID |
Coinbase CDP Key ID | - |
X402_USE_TESTNET |
Toggle Base Sepolia vs Mainnet | true |
๐ค Contributing
We are building the economic primitives of the Agentic Web. Contributions are encouraged!
- Core: TypeScript / Node.js
- Image Engine: Sharp
- Transport: MCP Streamable HTTP (SSE)
<p align="center"> Developed with โค๏ธ by <b>SmartUnityIA</b><br> <i>Empowering the machine economy, one byte at a time.</i> </p>
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.