{
 "openapi": "3.0.3",
 "info": {
  "title": "Depth, normals and geometry (default): MoGe-2 ViT-L (normal)",
  "version": "2026-11-21",
  "description": "Curated ZeroGPU tool from the ZeroGPU lineup catalog. Calls go straight to the upstream Space Ruicheng/MoGe-2; send your own HF token as a bearer token so the call uses your ZeroGPU quota."
 },
 "servers": [
  {
   "url": "https://ruicheng-moge-2.hf.space"
  }
 ],
 "x-zerogpu": {
  "category": "Image utilities and perception",
  "slot": "Depth, normals and geometry",
  "need": "Depth maps for compositing, ControlNets, parallax and 3D.",
  "role": "default",
  "space": "Ruicheng/MoGe-2",
  "space_url": "https://huggingface.co/spaces/Ruicheng/MoGe-2",
  "model": "MoGe-2 ViT-L (normal)",
  "license": "MIT",
  "license_class": "open",
  "gpu_seconds_booked": "60",
  "notes": "The author's official Space: one stateless call returns metric depth, normals, intrinsics and a mesh. Promoted on 30 October after the official MoGe-3 Space went offline.",
  "caveats": "An older model than MoGe-3, not updated since July 2025.",
  "lineup_call": "/run(image, max_size=800, resolution_level=\"High\", apply_mask=true, remove_edge=true) \u2192 depth, normal, GLB, files, FOV and scale text",
  "api_style": "v1"
 },
 "components": {
  "securitySchemes": {
   "hfToken": {
    "type": "http",
    "scheme": "bearer",
    "description": "Your own Hugging Face token (read scope is enough). It is sent only to the upstream Space and bills that call to your account's ZeroGPU quota. Without it the call runs on the small anonymous quota."
   }
  },
  "schemas": {}
 },
 "paths": {
  "/gradio_api/call/run": {
   "post": {
    "description": "Depth maps for compositing, ControlNets, parallax and 3D. Step 1 of 2: returns {\"event_id\"}; then GET /gradio_api/call/run/{event_id} reads an SSE stream whose `event: complete` data is the JSON output array (`event: error` on failure). Upstream: https://huggingface.co/spaces/Ruicheng/MoGe-2. License: MIT. Caveats: An older model than MoGe-3, not updated since July 2025. \n\nUpstream description: \nReturns, in order: Colorized Depth Map: dict(path: str | None (Path to a local file), url: str | None (Publicly available url or base64 encoded image), size: int | None (Size of image in bytes), orig_name: str | None (Original filename), mime_type: str | None (mime type of image), is_stream: bool (Can always be set to False), meta: dict(str, Any)); Normal Map: dict(path: str | None (Path to a local file), url: str | None (Publicly available url or base64 encoded image), size: int | None (Size of image in bytes), orig_name: str | None (Original filename), mime_type: str | None (mime type of image), is_stream: bool (Can always be set to False), meta: dict(str, Any)); 3D Point Map: filepath; Output Files: filepath; value_19: str; value_17: str; value_21: str",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "data"
        ],
        "properties": {
         "data": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "items": {},
          "description": "Positional inputs, in this order:\n0. image: dict(path: str | None (Path to a local file), url: str | None (Publicly available url or base64 encoded image), size: int | None (Size of image in bytes), orig_name: str | None (Original filename), mime_type: str | None (mime type of image), is_stream: bool (Can always be set to False), meta: dict(str, Any)) (required)\n1. max_size: float (default 800)\n2. resolution_level: Literal['Low', 'Medium', 'High', 'Ultra'] (default \"High\")\n3. apply_mask: bool (default true)\n4. remove_edge: bool (default true)"
         }
        }
       }
      }
     }
    },
    "x-gradio-parameters": [
     {
      "name": "image",
      "schema": {
       "type": "object",
       "required": [
        "path",
        "meta"
       ],
       "description": "A file. Set path to a public https URL (or a path returned by POST /gradio_api/upload on the same Space) and meta to {\"_type\": \"gradio.FileData\"}.",
       "properties": {
        "path": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "orig_name": {
         "type": "string"
        },
        "meta": {
         "type": "object",
         "properties": {
          "_type": {
           "type": "string",
           "enum": [
            "gradio.FileData"
           ]
          }
         }
        }
       }
      },
      "required": true,
      "default": null
     },
     {
      "name": "max_size",
      "schema": {
       "type": "number"
      },
      "required": false,
      "default": 800
     },
     {
      "name": "resolution_level",
      "schema": {
       "type": "string",
       "enum": [
        "Low",
        "Medium",
        "High",
        "Ultra"
       ]
      },
      "required": false,
      "default": "High"
     },
     {
      "name": "apply_mask",
      "schema": {
       "type": "boolean"
      },
      "required": false,
      "default": true
     },
     {
      "name": "remove_edge",
      "schema": {
       "type": "boolean"
      },
      "required": false,
      "default": true
     }
    ],
    "operationId": "image_utils_depth_normals_and_geometry",
    "tags": [
     "Image utilities and perception"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ],
    "summary": "Depth, normals and geometry (default): MoGe-2 ViT-L (normal)",
    "responses": {
     "200": {
      "description": "Job accepted.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "event_id"
         ],
         "properties": {
          "event_id": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/gradio_api/call/run/{event_id}": {
   "get": {
    "summary": "Read the result stream for /run",
    "description": "Server-sent events. The final `event: complete` carries a JSON array of outputs; `event: error` means the call failed.",
    "parameters": [
     {
      "name": "event_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "SSE stream",
      "content": {
       "text/event-stream": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "operationId": "image_utils_depth_normals_and_geometry_result",
    "tags": [
     "Image utilities and perception"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ]
   }
  }
 }
}