{"openapi":"3.1.0","info":{"title":"GeoSpark API","description":"The Open-Source Geospatial Intelligence Engine. Give any AI model a spatial mind.","version":"0.10.0"},"paths":{"/health":{"get":{"tags":["System"],"summary":"Health","description":"Health check.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/status":{"get":{"tags":["System"],"summary":"Status","description":"System status with uptime, memory, and tool information.","operationId":"status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/info":{"get":{"tags":["System"],"summary":"Info","description":"System information.","operationId":"info_api_v1_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/geocode":{"post":{"tags":["Spatial"],"summary":"Geocode","description":"Geocode an address or place name.","operationId":"geocode_api_v1_geocode_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(json|geojson)$"},{"type":"null"}],"description":"'geojson' returns an RFC 7946 FeatureCollection","title":"Format"},"description":"'geojson' returns an RFC 7946 FeatureCollection"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeocodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpatialResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/query":{"post":{"tags":["Spatial"],"summary":"Spatial Query","description":"Execute a spatial query.","operationId":"spatial_query_api_v1_query_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(json|geojson)$"},{"type":"null"}],"description":"'geojson' returns an RFC 7946 FeatureCollection","title":"Format"},"description":"'geojson' returns an RFC 7946 FeatureCollection"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpatialQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpatialResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/check-relationship":{"post":{"tags":["Spatial"],"summary":"Check Relationship","description":"Check topological relationship between two geometries.\n\nThis is GeoSpark's killer feature -- ground-truth spatial reasoning\nthat LLMs get wrong ~80% of the time.","operationId":"check_relationship_api_v1_check_relationship_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ask":{"post":{"tags":["Ask"],"summary":"Ask","description":"Ask a natural language spatial question.\n\nTries local Ollama (Qwen 2.5 7B) first, falls back to OpenRouter.","operationId":"ask_api_v1_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/distance":{"post":{"tags":["Spatial"],"summary":"Distance","description":"Calculate geodesic distance between two points.","operationId":"distance_api_v1_distance_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistanceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/elevation":{"post":{"tags":["Spatial"],"summary":"Elevation","description":"Get elevation at a point (meters above sea level).","operationId":"elevation_api_v1_elevation_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(json|geojson)$"},{"type":"null"}],"description":"'geojson' returns an RFC 7946 FeatureCollection","title":"Format"},"description":"'geojson' returns an RFC 7946 FeatureCollection"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElevationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tools":{"get":{"tags":["System"],"summary":"List Tools","description":"List available GeoSpark tools.","operationId":"list_tools_api_v1_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/models":{"get":{"tags":["System"],"summary":"List Models","description":"List available free LLM models.","operationId":"list_models_api_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/flows/templates":{"get":{"tags":["Flows"],"summary":"Flow List Templates","description":"List available flow templates.","operationId":"flow_list_templates_api_v1_flows_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/flows/templates/{template_name}":{"get":{"tags":["Flows"],"summary":"Flow Get Template","description":"Get a flow template definition.","operationId":"flow_get_template_api_v1_flows_templates__template_name__get","parameters":[{"name":"template_name","in":"path","required":true,"schema":{"type":"string","title":"Template Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/flows/templates/{template_name}/run":{"post":{"tags":["Flows"],"summary":"Flow Run Template","description":"Run a flow template with optional parameter overrides.","operationId":"flow_run_template_api_v1_flows_templates__template_name__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_name","in":"path","required":true,"schema":{"type":"string","title":"Template Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/flows/build":{"post":{"tags":["Flows"],"summary":"Flow Build","description":"Build a Flow from a natural-language goal via incremental LLM tool calling.\n\nUses the chat-to-flow builder (Phase 8B). Each LLM turn invokes one\nbuilder method (add_step, add_route, set_trigger, finish_flow) against\nan internal FlowBuilder; the DAG is validated before the final Flow is\nreturned. The LLM backend is Ollama by default.","operationId":"flow_build_api_v1_flows_build_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowBuildRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/flows":{"get":{"tags":["Flows"],"summary":"Flow List","description":"List saved flows (requires persistence backend).","operationId":"flow_list_api_v1_flows_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Flows"],"summary":"Flow Save","description":"Save a flow definition (requires persistence backend).","operationId":"flow_save_api_v1_flows_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveFlowRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/flows/{flow_id}":{"get":{"tags":["Flows"],"summary":"Flow Get","description":"Get a saved flow by ID.","operationId":"flow_get_api_v1_flows__flow_id__get","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Flows"],"summary":"Flow Delete","description":"Delete a saved flow and its runs.","operationId":"flow_delete_api_v1_flows__flow_id__delete","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/flows/{flow_id}/run":{"post":{"tags":["Flows"],"summary":"Flow Run Saved","description":"Run a saved flow.","operationId":"flow_run_saved_api_v1_flows__flow_id__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/flow-runs":{"get":{"tags":["Flows"],"summary":"Flow Run List","description":"List flow runs, optionally filtered by flow_id.","operationId":"flow_run_list_api_v1_flow_runs_get","parameters":[{"name":"flow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/flow-runs/{run_id}":{"get":{"tags":["Flows"],"summary":"Flow Run Get","description":"Get a specific flow run.","operationId":"flow_run_get_api_v1_flow_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/data/channels":{"get":{"tags":["Live data"],"summary":"Data List Channels","description":"List available data channels.","operationId":"data_list_channels_api_v1_data_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/data/status":{"get":{"tags":["Live data"],"summary":"Data Channel Status","description":"Health check all data channels.","operationId":"data_channel_status_api_v1_data_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/data/{channel_name}":{"post":{"tags":["Live data"],"summary":"Data Query","description":"Query a data channel.","operationId":"data_query_api_v1_data__channel_name__post","parameters":[{"name":"channel_name","in":"path","required":true,"schema":{"type":"string","title":"Channel Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataChannelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/overture/{theme}":{"post":{"tags":["Open map data"],"summary":"Overture","description":"Overture Maps features near a point: places, buildings, transportation, or the\nadministrative divisions containing it. Distances, areas and lengths are geodesic.","operationId":"overture_api_v1_overture__theme__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"theme","in":"path","required":true,"schema":{"type":"string","title":"Theme"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(json|geojson)$"},{"type":"null"}],"description":"'geojson' returns an RFC 7946 FeatureCollection","title":"Format"},"description":"'geojson' returns an RFC 7946 FeatureCollection"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OvertureRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/isochrone":{"post":{"tags":["Routing"],"summary":"Isochrone","description":"Areas reachable on foot, by bike or by car within each number of minutes (Valhalla).","operationId":"isochrone_api_v1_isochrone_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(json|geojson)$"},{"type":"null"}],"description":"'geojson' returns an RFC 7946 FeatureCollection","title":"Format"},"description":"'geojson' returns an RFC 7946 FeatureCollection"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsochroneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/travel-time":{"post":{"tags":["Routing"],"summary":"Travel Time","description":"Travel time and network distance from each origin to each destination (Valhalla).","operationId":"travel_time_api_v1_travel_time_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(json|geojson)$"},{"type":"null"}],"description":"'geojson' returns an RFC 7946 FeatureCollection","title":"Format"},"description":"'geojson' returns an RFC 7946 FeatureCollection"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TravelTimeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/transform":{"post":{"tags":["Geodesy"],"summary":"Transform Coordinates","description":"Convert coordinates as the official transformation does (national grids, never PROJ's ballpark\napproximation), with the operation used and its stated accuracy.","operationId":"transform_coordinates_api_v1_transform_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransformRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/height":{"post":{"tags":["Geodesy"],"summary":"Convert Height","description":"Convert a height between the ellipsoid (GNSS) and a national height datum with its official geoid model.","operationId":"convert_height_api_v1_height_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeightRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/sun":{"post":{"tags":["Sun and terrain"],"summary":"Sun Position","description":"The Sun's apparent elevation and azimuth (true north) at a place and time; with object_height_m,\nthe length and direction of its shadow on level ground (NOAA solar position).","operationId":"sun_position_api_v1_sun_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sun Position Api V1 Sun Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/sun/times":{"post":{"tags":["Sun and terrain"],"summary":"Sun Times","description":"Sunrise, solar noon, sunset and day length on a local date, for a flat horizon.","operationId":"sun_times_api_v1_sun_times_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SunDayRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sun Times Api V1 Sun Times Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/sun/hours":{"post":{"tags":["Sun and terrain"],"summary":"Sunlight Hours","description":"Hours of direct sun on a date, above a flat horizon and above the terrain horizon (Copernicus DEM).","operationId":"sunlight_hours_api_v1_sun_hours_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SunDayRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sunlight Hours Api V1 Sun Hours Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/horizon":{"post":{"tags":["Sun and terrain"],"summary":"Terrain Horizon","description":"The terrain skyline around a point: horizon elevation angle and obstruction distance per azimuth\n(Copernicus GLO-30, Earth curvature and refraction).","operationId":"terrain_horizon_api_v1_horizon_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HorizonRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Terrain Horizon Api V1 Horizon Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/line-of-sight":{"post":{"tags":["Sun and terrain"],"summary":"Line Of Sight","description":"Whether two points see each other over the terrain, the minimum clearance and where it is; with\nfrequency_mhz, the first Fresnel zone clearance of a radio link.","operationId":"line_of_sight_api_v1_line_of_sight_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineOfSightRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Line Of Sight Api V1 Line Of Sight Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agent/run":{"post":{"tags":["Agents"],"summary":"Agent Run","description":"Run the autonomous spatial agent with a goal.","operationId":"agent_run_api_v1_agent_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agent/report":{"post":{"tags":["Agents"],"summary":"Agent Report","description":"Generate a spatial intelligence report for a location.","operationId":"agent_report_api_v1_agent_report_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(json|geojson)$"},{"type":"null"}],"description":"'geojson' returns an RFC 7946 FeatureCollection","title":"Format"},"description":"'geojson' returns an RFC 7946 FeatureCollection"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/site-select":{"post":{"tags":["Agents"],"summary":"Agent Site Select","description":"Find optimal locations based on spatial criteria.","operationId":"agent_site_select_api_v1_agent_site_select_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteSelectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/memory/recall":{"post":{"tags":["Memory"],"summary":"Memory Recall","description":"Recall spatial memories matching a query.","operationId":"memory_recall_api_v1_memory_recall_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRecallRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/memory/fact":{"post":{"tags":["Memory"],"summary":"Memory Add Fact","description":"Store a new spatial fact.","operationId":"memory_add_fact_api_v1_memory_fact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryFactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/memory/episode":{"post":{"tags":["Memory"],"summary":"Memory Add Episode","description":"Store a timestamped spatial observation.","operationId":"memory_add_episode_api_v1_memory_episode_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryEpisodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/memory/contradictions":{"get":{"tags":["Memory"],"summary":"Memory Contradictions","description":"Find contradicting spatial facts.","operationId":"memory_contradictions_api_v1_memory_contradictions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/memory/stats":{"get":{"tags":["Memory"],"summary":"Memory Stats","description":"Spatial intelligence statistics.","operationId":"memory_stats_api_v1_memory_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/memory/compact":{"post":{"tags":["Memory"],"summary":"Memory Compact","description":"Compact old low-importance episodes.","operationId":"memory_compact_api_v1_memory_compact_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/context/save":{"post":{"tags":["Context"],"summary":"Context Save","description":"Save a new geospatial context.","operationId":"context_save_api_v1_context_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextSaveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/context/load":{"get":{"tags":["Context"],"summary":"Context Load","description":"Load a context by URI at a given tier.","operationId":"context_load_api_v1_context_load_get","parameters":[{"name":"uri","in":"query","required":true,"schema":{"type":"string","title":"Uri"}},{"name":"tier","in":"query","required":false,"schema":{"type":"string","default":"L1","title":"Tier"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/context/query":{"post":{"tags":["Context"],"summary":"Context Query Endpoint","description":"Query contexts with text, spatial, and category filters.","operationId":"context_query_endpoint_api_v1_context_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/context/list":{"get":{"tags":["Context"],"summary":"Context List Endpoint","description":"List all contexts, optionally filtered by category.","operationId":"context_list_endpoint_api_v1_context_list_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/context/stats":{"get":{"tags":["Context"],"summary":"Context Stats","description":"Context database statistics.","operationId":"context_stats_api_v1_context_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/context/archive-cold":{"post":{"tags":["Context"],"summary":"Context Archive Cold","description":"Archive contexts with hotness below threshold.","operationId":"context_archive_cold_api_v1_context_archive_cold_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"threshold","in":"query","required":false,"schema":{"type":"number","maximum":1,"minimum":0,"default":0.1,"title":"Threshold"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/context/{uri}":{"delete":{"tags":["Context"],"summary":"Context Delete","description":"Delete a context permanently.","operationId":"context_delete_api_v1_context__uri__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"uri","in":"path","required":true,"schema":{"type":"string","title":"Uri"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/coordinate":{"post":{"tags":["Agents"],"summary":"Agent Coordinate","description":"Route a goal through the multi-agent coordinator.\n\nThe coordinator classifies the goal and dispatches to the right\nspecialist agent (GeoAgent, SiteSelector, or SpatialReport).","operationId":"agent_coordinate_api_v1_agent_coordinate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoordinateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/agent/list":{"get":{"tags":["Agents"],"summary":"Agent List Registered","description":"List registered specialist agents.","operationId":"agent_list_registered_api_v1_agent_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/agent/classify":{"post":{"tags":["Agents"],"summary":"Agent Classify","description":"Classify a goal without actually running it (for debugging routing).","operationId":"agent_classify_api_v1_agent_classify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoordinateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/audit":{"get":{"tags":["Admin"],"summary":"Admin Audit","description":"Query audit log entries for a specific date (or today).","operationId":"admin_audit_api_v1_admin_audit_get","parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/audit/stats":{"get":{"tags":["Admin"],"summary":"Admin Audit Stats","description":"Summary statistics from the audit log.","operationId":"admin_audit_stats_api_v1_admin_audit_stats_get","parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/audit/dates":{"get":{"tags":["Admin"],"summary":"Admin Audit Dates","description":"List all dates that have audit log files.","operationId":"admin_audit_dates_api_v1_admin_audit_dates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/usage":{"get":{"tags":["Admin"],"summary":"Admin Usage","description":"Aggregated API usage statistics.","operationId":"admin_usage_api_v1_admin_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/usage/keys":{"get":{"tags":["Admin"],"summary":"Admin Usage Keys","description":"Usage breakdown per API key.","operationId":"admin_usage_keys_api_v1_admin_usage_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AgentRunRequest":{"properties":{"goal":{"type":"string","maxLength":2000,"minLength":1,"title":"Goal","description":"Natural language spatial goal"}},"type":"object","required":["goal"],"title":"AgentRunRequest"},"AskRequest":{"properties":{"question":{"type":"string","maxLength":2000,"minLength":1,"title":"Question","description":"Natural language spatial question"},"model":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Model","description":"Override LLM model"}},"type":"object","required":["question"],"title":"AskRequest","examples":[{"question":"How far is Federation Square from Melbourne Town Hall?"}],"example":{"question":"How far is Federation Square from Melbourne Town Hall?"}},"AskResponse":{"properties":{"answer":{"type":"string","title":"Answer"},"model":{"type":"string","title":"Model"},"tools_used":{"items":{"type":"string"},"type":"array","title":"Tools Used","default":[]},"tokens_used":{"type":"integer","title":"Tokens Used","default":0},"status":{"type":"string","title":"Status","default":"ok"},"provenance":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Provenance","default":[]},"units":{"additionalProperties":{"type":"string"},"type":"object","title":"Units","default":{}},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]},"quality":{"additionalProperties":true,"type":"object","title":"Quality","default":{}},"features":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Features","description":"Places the tools found (GeoJSON)"}},"type":"object","required":["answer","model"],"title":"AskResponse"},"BBox":{"properties":{"min_lon":{"type":"number","title":"Min Lon"},"min_lat":{"type":"number","title":"Min Lat"},"max_lon":{"type":"number","title":"Max Lon"},"max_lat":{"type":"number","title":"Max Lat"}},"type":"object","required":["min_lon","min_lat","max_lon","max_lat"],"title":"BBox","description":"Bounding box: (min_lon, min_lat, max_lon, max_lat)."},"ContextQueryRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Text query","default":""},"bbox":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Bbox","description":"Spatial filter"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":10},"tier":{"type":"string","title":"Tier","description":"L0, L1, or L2","default":"L0"},"include_archived":{"type":"boolean","title":"Include Archived","default":false}},"type":"object","title":"ContextQueryRequest"},"ContextSaveRequest":{"properties":{"uri":{"type":"string","title":"Uri","description":"Context URI (geospark://category/path)"},"category":{"type":"string","title":"Category","description":"Category: missions, datasets, analysis_history"},"name":{"type":"string","title":"Name","description":"Human-readable name"},"abstract":{"type":"string","title":"Abstract","description":"L0: short summary","default":""},"overview":{"additionalProperties":true,"type":"object","title":"Overview","description":"L1: structured outline"},"full_data":{"additionalProperties":true,"type":"object","title":"Full Data","description":"L2: complete data"},"parent_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Uri"},"bounds_wgs84":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Bounds Wgs84","description":"[min_lon,min_lat,max_lon,max_lat]"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"source":{"type":"string","title":"Source","default":""}},"type":"object","required":["uri","category","name"],"title":"ContextSaveRequest"},"CoordinateRequest":{"properties":{"goal":{"type":"string","maxLength":2000,"minLength":1,"title":"Goal","description":"Natural language goal"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters","description":"Optional structured parameters"}},"type":"object","required":["goal"],"title":"CoordinateRequest"},"DataChannelRequest":{"properties":{"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Location","description":"Location name to geocode"},"lat":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Lat","description":"Latitude"},"lon":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Lon","description":"Longitude"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date","description":"Start date (YYYY-MM-DD)"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date","description":"End date (YYYY-MM-DD)"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"}},"type":"object","title":"DataChannelRequest","examples":[{"location":"Melbourne, Australia"}],"example":{"location":"Melbourne, Australia"}},"DistanceRequest":{"properties":{"lat_a":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Lat A","description":"Latitude of point A"},"lon_a":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lon A","description":"Longitude of point A"},"lat_b":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Lat B","description":"Latitude of point B"},"lon_b":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lon B","description":"Longitude of point B"}},"type":"object","required":["lat_a","lon_a","lat_b","lon_b"],"title":"DistanceRequest","examples":[{"lat_a":-37.818,"lat_b":-37.815,"lon_a":144.9691,"lon_b":144.9666}],"example":{"lat_a":-37.818,"lat_b":-37.815,"lon_a":144.9691,"lon_b":144.9666}},"DistanceResponse":{"properties":{"distance_m":{"type":"number","title":"Distance M"},"distance_km":{"type":"number","title":"Distance Km"},"note":{"type":"string","title":"Note","default":"Geodesic distance on WGS84 ellipsoid"},"units":{"additionalProperties":{"type":"string"},"type":"object","title":"Units"},"provenance":{"items":{"$ref":"#/components/schemas/Provenance"},"type":"array","title":"Provenance"}},"type":"object","required":["distance_m","distance_km"],"title":"DistanceResponse"},"ElevationRequest":{"properties":{"latitude":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Latitude","description":"Latitude"},"longitude":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Longitude","description":"Longitude"}},"type":"object","required":["latitude","longitude"],"title":"ElevationRequest","examples":[{"latitude":-36.4559,"longitude":148.2633}],"example":{"latitude":-36.4559,"longitude":148.2633}},"FlowBuildRequest":{"properties":{"goal":{"type":"string","maxLength":2000,"minLength":1,"title":"Goal","description":"Natural-language goal for the flow"},"model":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Model","description":"Ollama model to drive the builder (default: server model)"},"max_turns":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Max Turns","description":"Max LLM turns","default":20}},"type":"object","required":["goal"],"title":"FlowBuildRequest"},"GeocodeRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query","description":"Address or place name to geocode"},"limit":{"type":"integer","maximum":40.0,"minimum":1.0,"title":"Limit","description":"Max results","default":5}},"type":"object","required":["query"],"title":"GeocodeRequest","examples":[{"limit":3,"query":"Federation Square, Melbourne"}],"example":{"limit":3,"query":"Federation Square, Melbourne"}},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"},"version":{"type":"string","title":"Version","default":"0.10.0"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","default":[]}},"type":"object","title":"HealthResponse"},"HeightRequest":{"properties":{"latitude":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Latitude"},"longitude":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Longitude"},"height_m":{"type":"number","maximum":10000.0,"minimum":-1000.0,"title":"Height M"},"from_reference":{"type":"string","maxLength":40,"title":"From Reference","description":"'ellipsoidal', AHD, ODN, NZVD2016, NAVD88, EGM2008"},"to_reference":{"type":"string","maxLength":40,"title":"To Reference","description":"'ellipsoidal', AHD, ODN, NZVD2016, NAVD88, EGM2008"}},"type":"object","required":["latitude","longitude","height_m","from_reference","to_reference"],"title":"HeightRequest","examples":[{"from_reference":"ellipsoidal","height_m":40.0,"latitude":-37.8177,"longitude":144.9691,"to_reference":"AHD"}],"example":{"from_reference":"ellipsoidal","height_m":40.0,"latitude":-37.8177,"longitude":144.9691,"to_reference":"AHD"}},"HorizonRequest":{"properties":{"latitude":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Latitude"},"longitude":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Longitude"},"observer_height_m":{"type":"number","maximum":500.0,"minimum":0.0,"title":"Observer Height M","default":1.5},"max_distance_m":{"type":"number","maximum":50000.0,"minimum":500.0,"title":"Max Distance M","default":20000},"step_deg":{"type":"number","maximum":10.0,"minimum":0.5,"title":"Step Deg","description":"Azimuth spacing; must divide 360","default":5},"ground_elevation_m":{"anyOf":[{"type":"number","maximum":9000.0,"minimum":-500.0},{"type":"null"}],"title":"Ground Elevation M","description":"True ground height, if known"}},"type":"object","required":["latitude","longitude"],"title":"HorizonRequest","examples":[{"latitude":-36.7297,"longitude":146.9608,"step_deg":5}],"example":{"latitude":-36.7297,"longitude":146.9608,"step_deg":5}},"IsochroneRequest":{"properties":{"lat":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Lat"},"lon":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lon"},"minutes":{"items":{"type":"integer"},"type":"array","maxItems":4,"minItems":1,"title":"Minutes","description":"Contour times, 1-60 minutes","default":[10]},"mode":{"type":"string","pattern":"^(walk|bike|drive)$","title":"Mode","default":"walk"}},"type":"object","required":["lat","lon"],"title":"IsochroneRequest","examples":[{"lat":-37.818,"lon":144.9691,"minutes":[10,20],"mode":"walk"}],"example":{"lat":-37.818,"lon":144.9691,"minutes":[10,20],"mode":"walk"}},"LineOfSightRequest":{"properties":{"lat_a":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Lat A"},"lon_a":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lon A"},"lat_b":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Lat B"},"lon_b":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lon B"},"height_a_m":{"type":"number","maximum":1000.0,"minimum":0.0,"title":"Height A M","description":"Height above the ground at A","default":1.5},"height_b_m":{"type":"number","maximum":1000.0,"minimum":0.0,"title":"Height B M","description":"Height above the ground at B","default":1.5},"frequency_mhz":{"anyOf":[{"type":"number","maximum":300000.0,"minimum":1.0},{"type":"null"}],"title":"Frequency Mhz","description":"Report first Fresnel zone clearance"}},"type":"object","required":["lat_a","lon_a","lat_b","lon_b"],"title":"LineOfSightRequest","examples":[{"frequency_mhz":900,"height_a_m":100,"height_b_m":10,"lat_a":-37.8333,"lat_b":-37.7,"lon_a":145.35,"lon_b":145.1}],"example":{"frequency_mhz":900,"height_a_m":100,"height_b_m":10,"lat_a":-37.8333,"lat_b":-37.7,"lon_a":145.35,"lon_b":145.1}},"MemoryEpisodeRequest":{"properties":{"content":{"type":"string","maxLength":2000,"minLength":1,"title":"Content","description":"Spatial observation to remember"},"source":{"type":"string","maxLength":200,"title":"Source","description":"Source attribution","default":""},"importance":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Importance","description":"Importance 0.0 to 1.0","default":0.5},"tags":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Tags"}},"type":"object","required":["content"],"title":"MemoryEpisodeRequest"},"MemoryFactRequest":{"properties":{"content":{"type":"string","maxLength":2000,"minLength":1,"title":"Content","description":"Spatial fact to remember"},"source":{"type":"string","maxLength":200,"title":"Source","description":"Source attribution","default":""},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","description":"Confidence 0.0 to 1.0","default":1.0},"tags":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Tags"}},"type":"object","required":["content"],"title":"MemoryFactRequest"},"MemoryRecallRequest":{"properties":{"query":{"type":"string","maxLength":1000,"title":"Query","description":"Search query for spatial memories"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","description":"Max results","default":10},"memory_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Type","description":"Filter: 'fact' or 'episode'"}},"type":"object","required":["query"],"title":"MemoryRecallRequest"},"OvertureRequest":{"properties":{"lat":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Lat","description":"Latitude"},"lon":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Lon","description":"Longitude"},"radius_m":{"type":"number","maximum":2000.0,"exclusiveMinimum":0.0,"title":"Radius M","description":"Search radius in metres (ignored for divisions)","default":500},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Category","description":"Places only: e.g. 'cafe', 'pharmacy'"},"limit":{"anyOf":[{"type":"integer","maximum":2000.0,"minimum":1.0},{"type":"null"}],"title":"Limit"}},"type":"object","required":["lat","lon"],"title":"OvertureRequest","examples":[{"category":"cafe","lat":-37.818,"lon":144.9691,"radius_m":400}],"example":{"category":"cafe","lat":-37.818,"lon":144.9691,"radius_m":400}},"Provenance":{"properties":{"source":{"type":"string","title":"Source","description":"Stable source id, e.g. 'openstreetmap-nominatim'"},"name":{"type":"string","title":"Name","description":"Human-readable source name"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence","description":"Licence of the data, e.g. 'ODbL-1.0'"},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution","description":"Attribution text to show when publishing"},"retrieved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retrieved At","description":"When the data was fetched (UTC); None if computed"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method","description":"How the value was computed or obtained"},"dataset_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Version"}},"type":"object","required":["source","name"],"title":"Provenance","description":"Where one part of an answer came from, and on what terms it can be reused."},"RelationshipRequest":{"properties":{"geometry_a":{"additionalProperties":true,"type":"object","title":"Geometry A","description":"First geometry (GeoJSON)"},"geometry_b":{"additionalProperties":true,"type":"object","title":"Geometry B","description":"Second geometry (GeoJSON)"},"relationship":{"type":"string","pattern":"^(contains|intersects|within|touches|crosses|overlaps|disjoint)$","title":"Relationship","description":"Topological relationship to check"}},"type":"object","required":["geometry_a","geometry_b","relationship"],"title":"RelationshipRequest","examples":[{"geometry_a":{"coordinates":[[[2.29,48.85],[2.3,48.85],[2.3,48.86],[2.29,48.86],[2.29,48.85]]],"type":"Polygon"},"geometry_b":{"coordinates":[2.295,48.855],"type":"Point"},"relationship":"contains"}],"example":{"geometry_a":{"coordinates":[[[2.29,48.85],[2.3,48.85],[2.3,48.86],[2.29,48.86],[2.29,48.85]]],"type":"Polygon"},"geometry_b":{"coordinates":[2.295,48.855],"type":"Point"},"relationship":"contains"}},"RelationshipResponse":{"properties":{"relationship":{"type":"string","title":"Relationship"},"result":{"type":"boolean","title":"Result"},"note":{"type":"string","title":"Note","default":"Ground-truth spatial reasoning via GeoSpark"},"provenance":{"items":{"$ref":"#/components/schemas/Provenance"},"type":"array","title":"Provenance"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["relationship","result"],"title":"RelationshipResponse"},"ReportRequest":{"properties":{"location":{"type":"string","maxLength":500,"minLength":1,"title":"Location","description":"Location to analyze"},"radius_m":{"type":"number","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Radius M","description":"Search radius in meters","default":2000}},"type":"object","required":["location"],"title":"ReportRequest"},"SaveFlowRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Flow name"},"description":{"type":"string","title":"Description","description":"Flow description","default":""},"steps":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Steps","description":"Flow step definitions"},"trigger":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger","description":"Trigger config"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["name","steps"],"title":"SaveFlowRequest"},"SiteSelectRequest":{"properties":{"within":{"type":"string","maxLength":500,"minLength":1,"title":"Within","description":"Search area (city/neighborhood)"},"near":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Near","description":"Amenity types to be near"},"avoid":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Avoid","description":"Amenity types to avoid"},"facility_type":{"type":"string","maxLength":100,"title":"Facility Type","description":"Facility type to place","default":"restaurant"},"radius_m":{"type":"number","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Radius M","description":"Search radius in meters","default":5000}},"type":"object","required":["within"],"title":"SiteSelectRequest"},"SpatialContext":{"properties":{"crs":{"type":"string","title":"Crs","default":"EPSG:4326"},"bbox":{"anyOf":[{"$ref":"#/components/schemas/BBox"},{"type":"null"}]},"total_features":{"type":"integer","title":"Total Features","default":0},"topology":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Topology"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"units":{"additionalProperties":{"type":"string"},"type":"object","title":"Units","description":"Unit of each numeric property, e.g. {'distance_m': 'metre'}"}},"type":"object","title":"SpatialContext","description":"Spatial context information about a result."},"SpatialFeature":{"properties":{"geometry":{"additionalProperties":true,"type":"object","title":"Geometry"},"properties":{"additionalProperties":true,"type":"object","title":"Properties"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["geometry"],"title":"SpatialFeature","description":"A single spatial feature in a result."},"SpatialQueryRequest":{"properties":{"operation":{"type":"string","title":"Operation","description":"Spatial operation to perform"},"latitude":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Latitude","description":"Latitude"},"longitude":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Longitude","description":"Longitude"},"radius_m":{"anyOf":[{"type":"number","maximum":50000.0,"minimum":0.0},{"type":"null"}],"title":"Radius M","description":"Radius in meters"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Feature category filter"}},"type":"object","required":["operation"],"title":"SpatialQueryRequest"},"SpatialResult":{"properties":{"features":{"items":{"$ref":"#/components/schemas/SpatialFeature"},"type":"array","title":"Features"},"spatial_context":{"$ref":"#/components/schemas/SpatialContext"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources"},"execution_time_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Execution Time Ms"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"provenance":{"items":{"$ref":"#/components/schemas/Provenance"},"type":"array","title":"Provenance","description":"Source, licence, attribution and method of each part of the answer"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Caveats a careful analyst should know"},"quality":{"additionalProperties":true,"type":"object","title":"Quality","description":"Machine-readable quality flags, e.g. vertical_accuracy_le90_m"},"status":{"type":"string","enum":["ok","partial","cannot_answer"],"title":"Status","description":"``cannot_answer``: errors and nothing to show; ``partial``: an answer with errors.","readOnly":true}},"type":"object","required":["status"],"title":"SpatialResult","description":"A GeoSpark Protocol result.\n\nBesides the answer itself (``features``), a result says where it came from\n(``provenance``), what its numbers mean (``spatial_context.units``), how good it is\n(``quality``, ``warnings``) and whether it is an answer at all (``status``)."},"SunDayRequest":{"properties":{"latitude":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Latitude"},"longitude":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Longitude"},"date":{"type":"string","maxLength":10,"title":"Date","description":"Local date, YYYY-MM-DD"},"tz":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Tz","description":"IANA time zone; default UTC"}},"type":"object","required":["latitude","longitude","date"],"title":"SunDayRequest","examples":[{"date":"2026-06-21","latitude":-36.7297,"longitude":146.9608,"tz":"Australia/Melbourne"}],"example":{"date":"2026-06-21","latitude":-36.7297,"longitude":146.9608,"tz":"Australia/Melbourne"}},"SunRequest":{"properties":{"latitude":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Latitude"},"longitude":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Longitude"},"time":{"type":"string","maxLength":40,"title":"Time","description":"ISO 8601 with a UTC offset, or local with tz"},"tz":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Tz","description":"IANA time zone for a local time, e.g. Australia/Melbourne"},"object_height_m":{"anyOf":[{"type":"number","maximum":10000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Object Height M","description":"For the shadow of a vertical object"}},"type":"object","required":["latitude","longitude","time"],"title":"SunRequest","examples":[{"latitude":-37.818,"longitude":144.969,"object_height_m":10,"time":"2026-06-21T12:00:00+10:00"}],"example":{"latitude":-37.818,"longitude":144.969,"object_height_m":10,"time":"2026-06-21T12:00:00+10:00"}},"TemplateRunRequest":{"properties":{"parameters":{"additionalProperties":true,"type":"object","title":"Parameters","description":"Override template parameters"}},"type":"object","title":"TemplateRunRequest"},"TransformRequest":{"properties":{"source_crs":{"type":"string","maxLength":100,"title":"Source Crs","description":"e.g. EPSG:28355 (GDA94 / MGA zone 55)"},"target_crs":{"type":"string","maxLength":100,"title":"Target Crs","description":"e.g. EPSG:7855 (GDA2020 / MGA zone 55)"},"coordinates":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","maxItems":1000,"minItems":1,"title":"Coordinates","description":"[x, y] or [x, y, z]: [lon, lat] or [easting, northing]"},"epoch":{"anyOf":[{"type":"number","maximum":2100.0,"minimum":1900.0},{"type":"null"}],"title":"Epoch","description":"Decimal year, for ITRF/ATRF frames"}},"type":"object","required":["source_crs","target_crs","coordinates"],"title":"TransformRequest","examples":[{"coordinates":[[321242.045,5812466.767]],"source_crs":"EPSG:28355","target_crs":"EPSG:7855"}],"example":{"coordinates":[[321242.045,5812466.767]],"source_crs":"EPSG:28355","target_crs":"EPSG:7855"}},"TravelTimeRequest":{"properties":{"origins":{"items":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":5,"minItems":1,"title":"Origins","description":"[[lat, lon], ...]"},"destinations":{"items":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":5,"minItems":1,"title":"Destinations","description":"[[lat, lon], ...]"},"mode":{"type":"string","pattern":"^(walk|bike|drive)$","title":"Mode","default":"walk"}},"type":"object","required":["origins","destinations"],"title":"TravelTimeRequest","examples":[{"destinations":[[-37.815,144.9666],[-37.8102,144.9628]],"mode":"walk","origins":[[-37.818,144.9691]]}],"example":{"destinations":[[-37.815,144.9666],[-37.8102,144.9628]],"mode":"walk","origins":[[-37.818,144.9691]]}},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"Spatial","description":"Geocoding, geodesic distance, elevation, topology and engine operations."},{"name":"Ask","description":"Natural-language questions answered with GeoSpark's tools, with provenance."},{"name":"Geodesy","description":"Official datum, projection and height conversions with national grids."},{"name":"Sun and terrain","description":"Sun position, sunrise and shadows; terrain horizons and lines of sight."},{"name":"Routing","description":"Reachable areas (isochrones) and travel times from Valhalla."},{"name":"Open map data","description":"Overture Maps places, buildings, roads and boundaries near a point."},{"name":"Live data","description":"Weather, air quality and active fires."},{"name":"Agents","description":"The coordinator and the GeoAgent, SpatialReport and SiteSelector specialists."},{"name":"Flows","description":"Reusable spatial workflows (DAGs) and their run history."},{"name":"Memory","description":"Spatial facts and episodes with recall and contradiction checks."},{"name":"Context","description":"Tiered storage for missions, datasets and analysis history."},{"name":"System","description":"Health, version, tools and models."},{"name":"Admin","description":"Audit log and usage (admin token required)."}]}