AGENT-READY

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)

claude_desktop_config.json
{
  "mcpServers": {
    "keen": {
      "command": "npx",
      "args": ["-y", "@keenimg/mcp"],
      "env": { "KEEN_API_KEY": "kn_live_YOUR_KEY" }
    }
  }
}

Setup (x402 — no account needed)

claude_desktop_config.json
{
  "mcpServers": {
    "keen": {
      "command": "npx",
      "args": ["-y", "@keenimg/mcp"]
    }
  }
}

Available tool: upscale_image

ParameterTypeDefaultDescription
urlstringrequiredImage URL to upscale
scale"2" | "4""2"Scale factor
formatstring"jpeg"jpeg, png, or webp
modestring"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/upscale

Flow

  1. Agent POSTs to /api/v1/agent/upscale with image URL
  2. Server responds 402 Payment Required with USDC payment details
  3. Agent pays $0.05 USDC on Base (chain: eip155:8453)
  4. Server verifies payment, processes image, returns job ID
  5. Agent polls /api/v1/agent/upscale/:id for result

Example with @x402/fetch

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

ModeModelBest for
photoSeedVR2Photos, textures, real-world images
illustrationReal-ESRGANCartoons, anime, flat art, illustrations

Agent Pricing

MethodPriceAuth requiredBest for
x402$0.05/imageNoneAutonomous agents, pay-per-use
API Key (Pro)$9/mo (100 images)API keyLow volume, testing
API Key (Ultra)$29/mo (1,000 images)API keyProduction 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.