InkRoom API and MCP documentation

Batch API and MCP protocol reference

Asynchronous image batches: preview, then confirm

These are field examples, not a live quote or task receipt. Authenticate with a Bearer API Key authorized for the model. Review quoteId, expiresAt and estimatedChargeMillis from preview before submitting confirmed and a stable requestId. Preview again after quote expiry; do not blindly repeat creation.

curl -X POST 'https://api.inkroom.ai/api/async/image-batches/preview' \
  -H 'Authorization: Bearer $INKROOM_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Autumn product scenes",
    "mode": "immediate",
    "items": [
      {"model": "YOUR_IMAGE_MODEL", "prompt": "A skincare bottle by a sunlit window"},
      {"model": "YOUR_IMAGE_MODEL", "prompt": "A skincare bottle in a quiet botanical studio"}
    ]
  }'

Example success response (selected fields)

{"code":0,"data":{"quoteId":"QUOTE_ID","estimatedChargeMillis":0,"expiresAt":"EXAMPLE_EXPIRY"},"msg":"ok"}
curl -X POST 'https://api.inkroom.ai/api/async/image-batches' \
  -H 'Authorization: Bearer $INKROOM_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"quoteId":"QUOTE_ID","requestId":"YOUR_STABLE_REQUEST_ID","confirmed":true}'
curl 'https://api.inkroom.ai/api/async/image-batches/JOB_ID' \
  -H 'Authorization: Bearer $INKROOM_API_KEY'

Query final status using the task ID. To continue, call continue/preview before confirming continue. HTTP 200 does not mean image completion. Results, permissions and charges follow the task receipt.

Errors return code, data and msg: 401 means invalid identity, 403 means forbidden, and 410 means an expired quote or result. Resolve the cause before retrying.

Example error response

{"code":410,"data":null,"msg":"费用预估已过期,请重新预览"}
Open the full dynamic reference

MCP: Streamable HTTP

MCP uses an MCP Token; standard model APIs and asynchronous batches use an API Key. Do not interchange them. Discover tools, review permissions and costs, and resume through receipt nextAction. Do not repeat accepted paid requests.

{
  "mcpServers": {
    "inkroom": {
      "type": "http",
      "url": "https://mcp.inkroom.ai",
      "headers": {
        "Authorization": "Bearer <MCP_TOKEN_REQUIRED>",
        "Accept-Language": "en-US",
        "X-InkRoom-Continuation": "receipt-v1"
      }
    }
  }
}
Open the full dynamic reference