Documentation

imagemcpserver documentation

Everything needed to give an AI agent image generation and editing: connect over MCP, install the agent skill, or call the REST API directly. Eleven tools, one API key.

What this is

imagemcpserver is one service that gives any AI agent the ability to make and change images. The same eleven tools are exposed three ways — as an MCP server, as an agent skill with a CLI, and as a plain REST API — and all three bill against one API key and one credit balance.

Nothing here needs a GPU, a model account, or a per-provider integration on your side. You send a prompt or an image, the server routes the call to the right model, uploads the result, and hands back a URL.

Three ways to connect

The eleven tools

Every tool below is a real endpoint and a real MCP tool name. Follow a row through to its reference page for parameters, response fields and copy-paste samples in four languages.

ToolEndpointCreditsWhat it does
get_user_infoGET/auth/user-dataFreeRead the authenticated account's profile, plan and remaining credit balance.
list_modelsGET/playground/modelsFreeList every live image model you can pass as the `model` parameter, with its credit cost.
generate_imagePOST/playground/generateModel costTurn a text prompt — optionally guided by reference images — into a hosted image.
generate_transparent_imagePOST/playground/generate-transparentModel cost + 8Generate an image from a prompt and return it as a cut-out PNG with a transparent background.
edit_imagePOST/playground/editModel costChange an existing image with natural-language instructions.
remove_backgroundPOST/playground/remove-background8 creditsStrip the background from an image and return a transparent PNG.
upscale_imagePOST/playground/upscale15 creditsIncrease an image's resolution while sharpening detail.
text_to_svgPOST/playground/text-to-svg5 creditsGenerate real vector SVG markup — icons, logos and marks — from a prompt.
compress_imagePOST/playground/compress1 creditShrink an image's file size with quality control, and report exactly how much was saved.
convert_formatPOST/playground/convert-format1 creditConvert an image between PNG, JPEG, WebP and other common formats.
multicallPOST/playground/multicallSum of the batchRun several image tools concurrently in a single request.

How a call is shaped

Every image endpoint answers with the same envelope: a success flag, the credits this call took, your remaining balance, and a result object holding the output. Read result.imageUrl for image tools and result.svgCode for the vector tool.

response envelope
{
  "success": true,
  "message": "Image processed successfully via OpenRouter Images API",
  "deductedCredits": 15,
  "userCredits": 2485,
  "result": {
    "imageUrl": "https://cdn.imagemcpserver.com/gen/gen_91827364.png",
    "model": "google/gemini-2.5-flash-image",
    "latency": "4.21s",
    "deductedCredits": 15,
    "userCredits": 2485
  }
}

Watch the balance in the response

Because userCredits comes back on every call, an agent never needs a separate balance check in a loop — it can read the remaining balance from the response it already has.

Where to go next