{
  "name": "Gemini Image API",
  "version": "1.0.0",
  "auth": "Every request needs \"Authorization: Bearer <your API key>\". Keep the key on your server; never put it in browser code.",
  "mcp": {
    "url": "https://gemini.prasantkumar.com/mcp",
    "transport": "Streamable HTTP",
    "tools": [
      "generate_image",
      "get_image_job",
      "list_image_jobs",
      "cancel_image_job",
      "get_worker_status"
    ]
  },
  "rest": {
    "POST /v1/jobs": "Body {\"prompt\": \"...\", \"input_images\"?: [{\"base64\",\"mime_type\"} | {\"url\"}], \"webhook_url\"?: \"https://...\", \"metadata\"?: {...}}. Answers 202 with the job.",
    "GET /v1/jobs/{job_id}?wait=0-50": "The job. status: queued | processing | done | failed | cancelled. Done jobs have images[].url.",
    "GET /v1/jobs?status=&limit=": "Your recent jobs.",
    "DELETE /v1/jobs/{job_id}": "Cancel a queued job.",
    "GET /v1/status": "Worker status and queue size.",
    "GET /v1/images/{job_id}/{n}": "The image file (signed link from the job, or your API key)."
  },
  "webhooks": "If webhook_url is given, a POST {\"event\": \"job.done\" | \"job.failed\", \"job\": {...}} is sent when the job ends, with header X-Gemini-Image-Signature: sha256=<HMAC of the body>.",
  "errors": "Errors are {\"error\": {\"code\", \"message\", \"hint\"?, \"retryable\"?}} with a matching HTTP status."
}