For AI Agents
Give your AI agent the ability to upscale images. Three ways to integrate — pick the one that fits your stack.
How It Works
MCP Server
Drop-in tool for Claude, Cursor, and any MCP-compatible agent. One config line.
x402 Payments
No account needed. Agent pays $0.05 USDC per image via HTTP 402. Zero friction.
API Key
Traditional auth. Sign up, get a key, call the REST API. Monthly plans from $9.
MCP Server
The fastest way to add image upscaling to any MCP-compatible agent. Works with Claude Desktop, Claude Code, Cursor, Windsurf, and more.
Setup (with API key)
{
"mcpServers": {
"keen": {
"command": "npx",
"args": ["-y", "@keenimg/mcp"],
"env": { "KEEN_API_KEY": "kn_live_YOUR_KEY" }
}
}
}Setup (x402 — no account needed)
{
"mcpServers": {
"keen": {
"command": "npx",
"args": ["-y", "@keenimg/mcp"]
}
}
}Available tool: upscale_image
| Parameter | Type | Default | Description |
|---|---|---|---|
| url | string | required | Image URL to upscale |
| scale | "2" | "4" | "2" | Scale factor |
| format | string | "jpeg" | jpeg, png, or webp |
| mode | string | "photo" | photo or illustration |
x402 Payments (No Account Needed)
The x402 protocol lets agents pay per-request with USDC on Base. No signup, no API key, no subscription.
Endpoint
POST /api/v1/agent/upscaleFlow
- Agent POSTs to
/api/v1/agent/upscalewith image URL - Server responds
402 Payment Requiredwith USDC payment details - Agent pays $0.05 USDC on Base (chain:
eip155:8453) - Server verifies payment, processes image, returns job ID
- Agent polls
/api/v1/agent/upscale/:idfor result
Example with @x402/fetch
import { x402Client } from "@x402/core/client";
import { x402HTTPClient } from "@x402/core/http";
import { ExactEvmScheme } from "@x402/evm/exact/client";
const client = new x402HTTPClient(
new x402Client().register("eip155:*", new ExactEvmScheme(signer))
);
const res = await fetch("https://keenimg.com/api/v1/agent/upscale", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://example.com/photo.jpg", scale: 2 }),
});
// x402 client handles 402 payment automatically
const result = await client.handlePayment(res);API Key Authentication
For agents with a Keen account, use the standard REST API with a Bearer token.
curl -X POST https://keenimg.com/api/v1/upscale \
-H "Authorization: Bearer kn_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/photo.jpg", "scale": 2}'See the full API documentation for all endpoints and options.
Upscaling Models
| Mode | Model | Best for |
|---|---|---|
| photo | SeedVR2 | Photos, textures, real-world images |
| illustration | Real-ESRGAN | Cartoons, anime, flat art, illustrations |
Agent Pricing
| Method | Price | Auth required | Best for |
|---|---|---|---|
| x402 | $0.05/image | None | Autonomous agents, pay-per-use |
| API Key (Pro) | $9/mo (100 images) | API key | Low volume, testing |
| API Key (Ultra) | $29/mo (1,000 images) | API key | Production workloads |
x402 payments settle in USDC on Base (near-zero gas fees). No minimum, no commitment.
Ready to integrate?
Start with the MCP server for the fastest setup, or hit the x402 endpoint directly.