API reference

API reference

Eleven HTTP endpoints for generating, editing and processing images — each one also an MCP tool and a CLI command. Bearer-token auth, JSON in, JSON out.

Request basics

  • Base URL — https://api.imagemcpserver.com
  • Auth — Authorization: Bearer <IMAGEMCP_API_KEY>, or x-api-key: <key>
  • Content type — application/json on every POST
  • Images in — an https URL or a base64 data URI, in the image field
  • Images out — a hosted URL, or base64 when you pass responseFormat: "b64_json"

Response envelope

Every image endpoint returns the same top-level shape. The tool-specific output lives under result, and the credit fields appear both at the top level and inside result so either is convenient to read.

200 OK
{
  "success": true,
  "message": "…",
  "deductedCredits": 15,
  "userCredits": 2485,
  "result": { "…": "tool-specific output" }
}

get_user_info is the exception

It predates the envelope and returns { "user": { … } } directly.

Account

Generation

Editing

Vector

Optimisation

Batch