HTTP API#
The interactive OpenAPI documentation lives at /api/docs and the schema at
/api/openapi.json. Request and response models are the Pydantic classes in
openworld_radio_twin.models and openworld_radio_twin.batch
(API reference). All examples below assume the default loopback address.
Health and catalogs#
GET /api/healthVersion, API revision, capability flags and whether the Sionna runtime is available.
GET /api/building-sourcesauto,globaland every registered building source with title, version, attribution and whether it takes part in automatic routing.GET /api/search?q=<text>Location search through the configured provider. Returns
502when the provider is unavailable.
Buildings for browsing#
GET /api/buildings?latitude=&longitude=&radius_m=&building_source=Buildings around a point for display, limited to
OWRT_MAX_VIEW_BUILDINGS. The response carries the features, their native or extruded geometry context, warnings and a provenance record with the resolved source, release, counts and limit status.422for an invalid source or a source that does not cover the point,502for a provider failure or for source geometry that cannot be placed.
Compiled scenes#
POST /api/scenesBody: a
SceneRequestwithlatitude,longitude,radius_m,include_buildings,building_source,include_terrain,material_profileandterrain_resolution_m, the same inputs asowrt.load_scene. Compiles into the shared scene cache, or reuses the directory for identical inputs, and returns aSceneResponse: thescene_id(the cache directory name), whether it was a cache hit, the bounds with WGS84 corners, the persisted buildings and their native geometry, the terrain grid and surface classes, warnings and provenance.422for invalid inputs or a source that does not cover the centre,502for a provider failure.GET /api/scenes/{scene_id}The same payload for a scene already in the cache;
404when it is not there.
Simulations#
POST /api/simulationsBody: a
SimulationRequest(Sionna RT lists theengine_configkeys). The optionalscene_centersets the centre of the compiled square; without it the first transmitter is the centre, which is what dataset generation always uses. Every transmitter must lie inside the square, otherwise the request is rejected with422.curl -s http://127.0.0.1:8765/api/simulations \ -H 'Content-Type: application/json' \ -d '{ "engine": "preview", "radius_m": 500, "resolution_m": 25, "include_terrain": false, "transmitters": [ {"position": {"latitude": 52.3762, "longitude": 4.8993, "altitude_m": 25}, "frequency_ghz": 3.5, "power_dbm": 30, "antenna_pattern": "sector"} ] }'
The service first compiles or reuses the scene centred on
scene_center, exactly asPOST /api/sceneswould, then runs the solve on the persisted scene assets. TheSimulationResponsecontains the simulation ID, the selectedengine, elapsed time, a coverage grid with the display layers and grid mapping, the buildings and geometry context, warnings, solver details, provenance (includingscene_idandscene_cache_hit), the environment context and the full scene payload. Errors:409when the Sionna runtime is unavailable,422for invalid parameters,502for provider failures,500when the solve fails.GET /api/simulations/{id}/raster.png?metric=rss&mask_buildings=true&feather_edges=trueA PNG of one metric (
path_gain,rss,sinr,association) rendered from the stored arrays.GET /api/simulations/{id}/artifacts.zipThe artifact bundle (Exports).
The service keeps the 16 most recent results in memory; older IDs return 404.
Batches#
POST /api/batches/planBody: a
BatchDatasetRequest. Returns the expandedBatchPlanwithout touching providers.POST /api/batches?resume=falseStarts generation and returns
202with a job record.409when the dataset exists without resume, when the same dataset is already running, or when Sionna cases are requested without the runtime.GET /api/batchesAll jobs known to this process, newest first.
GET /api/batches/{job_id}One job: status (
queued,running,completed,completed_with_errors,failed), completed and total cases, message, output directory, error.GET /api/batches/{job_id}/manifestThe dataset manifest once the job has completed.
Python client sketch#
import httpx
with httpx.Client(base_url="http://127.0.0.1:8765") as client:
health = client.get("/api/health").json()
response = client.post("/api/simulations", json=request, timeout=600).json()
png = client.get(f"/api/simulations/{response['simulation_id']}/raster.png",
params={"metric": "sinr"}).content