{
  "name": "Medimsight API",
  "version": "2.0.0",
  "status": "online",
  "description": "Cloud platform for medical imaging analysis, AI biomarker extraction, and collaborative diagnostics.",
  "documentation": {
    "swagger_ui": "/api/docs/",
    "redoc": "/api/redoc/",
    "openapi_json": "/api/openapi.json"
  },
  "user": {
    "authenticated": false
  },
  "authentication": {
    "methods": [
      {
        "type": "Service Token",
        "headers": [
          "Authorization: Bearer mms_<token>",
          "Authorization: Token mms_<token>",
          "X-Service-Token: mms_<token>",
          "X-API-Key: mms_<token>"
        ],
        "description": "Long-lived tokens for external scripts, tools, and AI agents. Generate at /api/auth/service-tokens/"
      },
      {
        "type": "JWT Bearer Token",
        "header": "Authorization: Bearer <jwt_access_token>",
        "description": "Short-lived tokens obtained via POST /api/token/ with email and password."
      }
    ],
    "generate_service_token_endpoint": "/api/auth/service-tokens/"
  },
  "mcp": {
    "status": "supported",
    "description": "Connect AI agents (Claude Desktop, Cursor, Gemini, etc.) using the Model Context Protocol.",
    "package": "medimsight-mcp",
    "transports": [
      "stdio",
      "streamable_http"
    ],
    "quickstart_stdio": {
      "mcpServers": {
        "medimsight": {
          "command": "python",
          "args": [
            "-m",
            "mcp_server.server",
            "--stdio"
          ],
          "env": {
            "MMS_SERVICE_TOKEN": "mms_YOUR_TOKEN_HERE",
            "MMS_API_BASE_URL": "https://api.medimsight.com"
          }
        }
      }
    }
  },
  "endpoints": {
    "subjects": {
      "list_or_create": "/api/subjects/",
      "detail_or_update": "/api/subjects/{id}/",
      "images": "/api/subjects/{id}/images/",
      "metatags": "/api/subjects/{id}/metatags/",
      "auto_label": "/api/subjects/{id}/auto-label/"
    },
    "studies": {
      "list_or_create": "/api/study/",
      "detail": "/api/study/{id}/"
    },
    "volumes": {
      "list": "/api/volume/",
      "detail": "/api/volume/{id}/",
      "request_upload_url": "/api/volume/upload-url/",
      "get_download_url": "/api/volume/{id}/download-url/",
      "file_acknowledge": "/api/files/{file_id}/acknowledge/",
      "file_readiness": "/api/files/{file_id}/readiness/"
    },
    "tasks": {
      "list_or_create": "/api/tasks/",
      "detail_and_output": "/api/tasks/{id}/",
      "types": "/api/tasktypes/",
      "type_detail": "/api/tasktypes/{id}/",
      "type_xml": "/api/tasktypes/{id}/xml/"
    },
    "agent": {
      "chat": "/api/agent/chat/",
      "update_narrative": "/api/agent/subjects/{id}/update-narrative/",
      "viewer_analyze": "/api/agent/viewer/analyze/"
    },
    "auth": {
      "token_obtain": "/api/token/",
      "token_refresh": "/api/token/refresh/",
      "service_tokens": "/api/auth/service-tokens/"
    }
  }
}