{"openapi": "3.1.0", "info": {"title": "COSMOL HydroGeo Studio™ API", "version": "2.0.0", "summary": "Unified Cloud GIS, 2D SWE Flood, MODFLOW 6 Groundwater, Sediment & Urban Stormwater Platform.", "description": "Five multi-physics engineering modules (M00 GlobalGeo CRS/Mesh, M01 2D SWE Flood & Earthwork, M02 Coupled 2D SWE + 3D MODFLOW 6, M03 2D Erosion & HESB SESC, M04 Urban LID/SuDS & 1D/2D Sewer). Free trial: 2 anonymous runs + 3 email/GitHub bonus credits = 5 total free runs. Paid USD packs ($39/$99/$299) and subscriptions ($79/mo, $249/mo Team White-Label; $759/$2,390 annual)."}, "servers": [{"url": "https://hydro.cosmolsesc.com", "description": "COSMOL HydroGeo Studio™"}], "components": {"securitySchemes": {"bearerAuth": {"type": "http", "scheme": "bearer", "bearerFormat": "GLBH-token"}}, "schemas": {"GlobalRunReq": {"type": "object", "properties": {"module_id": {"type": "string", "enum": ["m00", "m01", "m02", "m03", "m04"], "default": "m01", "description": "M00 GIS/Mesh, M01 2D SWE Flood, M02 Coupled SWE+MODFLOW 6, M03 Erosion/SESC, M04 Urban LID/Sewer"}, "upload_id": {"type": "string", "description": "Upload identifier up_xxxx from /api/global/upload"}, "case_id": {"type": "string", "description": "Optional legacy benchmark identifier"}, "site_name": {"type": "string"}, "scenario": {"type": "string"}, "return_period": {"type": "integer", "default": 100, "description": "Design ARI in years (10-1000)"}, "storm_pattern": {"type": "string", "default": "chicago"}, "duration_min": {"type": "integer", "default": 180}, "rainfall_mm": {"type": "number", "default": 144.0}, "inflow_m3s": {"type": "number", "default": 0.0}, "has_dam": {"type": "boolean", "default": false}, "cutoff_depth_m": {"type": "number", "default": 18.0, "description": "M02 cutoff wall depth (m)"}, "no_dosing": {"type": "boolean", "default": false, "description": "M03 disable HESB chemical flocculation"}, "no_lid": {"type": "boolean", "default": false, "description": "M04 disable LID/SuDS/WSUD controls"}, "lon": {"type": "number", "description": "WGS84 longitude (-180..180)"}, "lat": {"type": "number", "description": "WGS84 latitude (-90..90)"}, "place": {"type": "string", "description": "Global city, watershed, or region name"}, "elev_units": {"type": "string", "enum": ["auto", "m", "ft", "us_survey_ft"], "default": "auto", "description": "Vertical elevation units of uploaded survey"}, "white_label_company": {"type": "string", "description": "Custom report branding for Team subscribers"}, "async_mode": {"type": "boolean", "default": false}}}}}, "security": [{"bearerAuth": []}, {}], "paths": {"/api/global/showcase": {"get": {"operationId": "getGlobalShowcase", "summary": "List pre-rendered M00-M04 international showcase KPIs & media URLs", "responses": {"200": {"description": "Successful JSON response", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/api/global/plans": {"get": {"operationId": "getGlobalPlans", "summary": "List active USD Stripe credit packs ($39/$99/$299) and subscriptions ($79/$249/mo)", "responses": {"200": {"description": "Successful JSON response", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/api/global/session": {"get": {"operationId": "getGlobalSession", "summary": "Inspect quota (2+3=5 free), 5 modules & 7 USD plans", "security": [{"bearerAuth": []}, {}], "responses": {"200": {"description": "Successful JSON response", "content": {"application/json": {"schema": {"type": "object"}}}}}}, "post": {"operationId": "initGlobalSession", "summary": "Inspect quota (2+3=5 free), 5 modules & 7 USD plans", "security": [{"bearerAuth": []}, {}], "requestBody": {"required": false, "content": {"application/json": {"schema": {"type": "object", "properties": {"guest_token": {"type": "string"}, "api_token": {"type": "string"}}}}}}, "responses": {"200": {"description": "Successful JSON response", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/api/global/billing/claim_email_bonus": {"post": {"operationId": "claimEmailBonusCredits", "summary": "Claim +3 bonus free credits (2 -> 5 total) with email or GitHub handle", "security": [{"bearerAuth": []}, {}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"email": {"type": "string"}, "contact": {"type": "string"}}}}}}, "responses": {"200": {"description": "Successful JSON response", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/api/global/upload": {"post": {"operationId": "uploadGlobalTerrain", "summary": "Upload terrain/CAD/GIS file and shift local metric coordinates", "security": [{"bearerAuth": []}, {}], "parameters": [{"name": "filename", "in": "query", "required": false, "schema": {"type": "string"}}], "requestBody": {"required": true, "content": {"application/octet-stream": {"schema": {"type": "string", "format": "binary"}}, "multipart/form-data": {"schema": {"type": "object", "properties": {"file": {"type": "string", "format": "binary"}}}}, "application/json": {"schema": {"type": "object", "properties": {"filename": {"type": "string"}, "content_base64": {"type": "string"}, "content_text": {"type": "string"}}, "required": ["filename"]}}}}, "responses": {"200": {"description": "Successful JSON response", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/api/global/run": {"post": {"operationId": "runGlobalMultiPhysics", "summary": "Execute M00-M04 multi-physics simulation", "security": [{"bearerAuth": []}, {}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"module_id": {"type": "string", "enum": ["m00", "m01", "m02", "m03", "m04"], "default": "m01", "description": "M00 GIS/Mesh, M01 2D SWE Flood, M02 Coupled SWE+MODFLOW 6, M03 Erosion/SESC, M04 Urban LID/Sewer"}, "upload_id": {"type": "string", "description": "Upload identifier up_xxxx from /api/global/upload"}, "case_id": {"type": "string", "description": "Optional legacy benchmark identifier"}, "site_name": {"type": "string"}, "scenario": {"type": "string"}, "return_period": {"type": "integer", "default": 100, "description": "Design ARI in years (10-1000)"}, "storm_pattern": {"type": "string", "default": "chicago"}, "duration_min": {"type": "integer", "default": 180}, "rainfall_mm": {"type": "number", "default": 144.0}, "inflow_m3s": {"type": "number", "default": 0.0}, "has_dam": {"type": "boolean", "default": false}, "cutoff_depth_m": {"type": "number", "default": 18.0, "description": "M02 cutoff wall depth (m)"}, "no_dosing": {"type": "boolean", "default": false, "description": "M03 disable HESB chemical flocculation"}, "no_lid": {"type": "boolean", "default": false, "description": "M04 disable LID/SuDS/WSUD controls"}, "lon": {"type": "number", "description": "WGS84 longitude (-180..180)"}, "lat": {"type": "number", "description": "WGS84 latitude (-90..90)"}, "place": {"type": "string", "description": "Global city, watershed, or region name"}, "elev_units": {"type": "string", "enum": ["auto", "m", "ft", "us_survey_ft"], "default": "auto", "description": "Vertical elevation units of uploaded survey"}, "white_label_company": {"type": "string", "description": "Custom report branding for Team subscribers"}, "async_mode": {"type": "boolean", "default": false}}}}}}, "responses": {"200": {"description": "Successful JSON response", "content": {"application/json": {"schema": {"type": "object"}}}}, "402": {"description": "Stripe Checkout URL ($39/$99/$299 packs or $79/$249 subs)", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/api/global/jobs/{job_id}": {"get": {"operationId": "getGlobalJob", "summary": "Retrieve simulation KPIs and deliverable URLs", "security": [{"bearerAuth": []}, {}], "parameters": [{"name": "job_id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "Successful JSON response", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/api/global/billing/create_checkout_session": {"post": {"operationId": "createGlobalCheckoutSession", "summary": "Create Stripe Checkout session for USD packs or subscriptions", "security": [{"bearerAuth": []}, {}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"plan_id": {"type": "string", "enum": ["global_starter4", "global_pro15", "global_consult60", "global_sub_pro", "global_sub_pro_yr", "global_sub_team", "global_sub_team_yr"]}}, "required": ["plan_id"]}}}}, "responses": {"200": {"description": "Successful JSON response", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/api/global/billing/redeem_token": {"post": {"operationId": "redeemGlobalToken", "summary": "Redeem a signed GLBH-* Bearer token", "security": [{"bearerAuth": []}, {}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"token": {"type": "string"}, "api_token": {"type": "string"}}}}}}, "responses": {"200": {"description": "Successful JSON response", "content": {"application/json": {"schema": {"type": "object"}}}}}}}}}