{"components":{"responses":{"Error":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"schemas":{"Camera":{"properties":{"alt_m":{"description":"Camera altitude above sea level","type":"number"},"heading_deg":{"description":"Compass heading, 0 = north","maximum":360,"minimum":0,"type":"number"},"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"}},"required":["lat","lon","alt_m","heading_deg"],"type":"object"},"CloudLayer":{"additionalProperties":false,"description":"A cloud layer. Heights are metres above the ground under the viewer. One layer per tier: low (cumulus, cumulus congestus, stratocumulus, stratus, nimbostratus, cumulonimbus), mid (altocumulus, altostratus), high (cirrus, cirrostratus, cirrocumulus).","properties":{"base_m":{"description":"Cloud base above the ground","maximum":14000,"minimum":0,"type":"number"},"coverage":{"description":"Sky covered: few .1-.25, scattered .25-.5, broken .5-.85, overcast .85-1 (default .5)","maximum":1,"minimum":0,"type":"number"},"top_m":{"description":"Cloud top above the ground (default: a typical depth for the type)","maximum":23000,"minimum":0,"type":"number"},"type":{"description":"Cloud type (WMO genus)","enum":["cumulus","cumulus congestus","stratocumulus","stratus","nimbostratus","altocumulus","altostratus","cirrus","cirrostratus","cirrocumulus","cumulonimbus"],"type":"string"}},"required":["type","base_m"],"type":"object"},"Entity":{"description":"An object in the loaded scene, or one placed with entity.spawn.","properties":{"class":{"description":"Semantic class","nullable":true,"type":"string"},"components":{"description":"Its components (primitive, mesh, vehicle, physics, script, trigger, …)","items":{"description":"Component","type":"string"},"type":"array"},"elevation_m":{"description":"Height above sea level","type":"number"},"entity":{"description":"Entity id","type":"string"},"heading_deg":{"description":"Compass heading, 0 = north","type":"number"},"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"nullable":true,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"nullable":true,"type":"number"},"name":{"description":"Name","type":"string"},"position_m":{"description":"Position in the scene frame (ENU at the scene origin: east, north, up; m)","items":{"description":"m","type":"number"},"type":"array"},"vehicle":{"description":"Vehicle id when it is a vehicle under API control","nullable":true,"type":"string"},"visible":{"type":"boolean"}},"required":["entity","name","lat","lon","elevation_m","position_m","heading_deg","visible","components","vehicle","class"],"type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"description":"Stable machine code, e.g. invalid_param, session_not_found, quota_exceeded","type":"string"},"doc_url":{"type":"string"},"message":{"type":"string"},"param":{"description":"The parameter at fault","type":"string"},"request_id":{"type":"string"},"type":{"enum":["invalid_request","authentication","permission","not_found","conflict","rate_limit","quota","upstream","internal"],"type":"string"}},"required":["type","code","message","request_id"],"type":"object"}},"required":["error"],"type":"object"},"Fog":{"additionalProperties":false,"description":"Ground fog.","properties":{"density":{"description":"0 (none) to 1 (thick, ~100 m visibility inside)","maximum":1,"minimum":0,"type":"number"},"top_m":{"description":"Fog top above the ground","maximum":1000,"minimum":10,"type":"number"}},"type":"object"},"GameState":{"description":"The scene's game state (its rules section).","properties":{"checkpoint":{"description":"Next checkpoint index","type":"number"},"checkpoints":{"description":"Checkpoints in all","type":"number"},"elapsed_s":{"description":"Seconds since the game started","type":"number"},"lives":{"description":"Lives left","nullable":true,"type":"number"},"reason":{"description":"Why the game ended","nullable":true,"type":"string"},"score":{"description":"Score","type":"number"},"status":{"description":"Game status","enum":["playing","won","lost"],"type":"string"},"time_left_s":{"description":"Seconds left (countdown)","nullable":true,"type":"number"}},"required":["status","score","lives","time_left_s","elapsed_s","checkpoint","checkpoints","reason"],"type":"object"},"LatLon":{"additionalProperties":false,"properties":{"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"}},"required":["lat","lon"],"type":"object"},"NewSession":{"allOf":[{"$ref":"#/components/schemas/Session"},{"properties":{"page_url":{"type":"string"},"token":{"description":"The world's join token (attach sessions: open page_url)","type":"string"}},"type":"object"}]},"Plan":{"description":"A drivable route.","properties":{"climb_m":{"description":"Total climb","type":"number"},"descent_m":{"description":"Total descent","type":"number"},"length_m":{"description":"Route length","type":"number"},"planning_ms":{"description":"Time spent planning","type":"number"},"steepest_slope_deg":{"description":"Steepest grade along the route","type":"number"},"straight_m":{"description":"Straight-line distance","type":"number"},"waypoints":{"items":{"$ref":"#/components/schemas/LatLon"},"type":"array"}},"required":["waypoints","length_m","straight_m","climb_m","descent_m","steepest_slope_deg","planning_ms"],"type":"object"},"Precipitation":{"additionalProperties":false,"properties":{"intensity":{"description":"0 (none) to 1 (heaviest)","maximum":1,"minimum":0,"type":"number"},"type":{"description":"auto: rain or snow by temperature","enum":["auto","rain","snow"],"type":"string"}},"type":"object"},"RouteState":{"properties":{"elapsed_s":{"description":"Seconds since the route started","type":"number"},"eta_s":{"description":"Estimated seconds to arrival while moving","nullable":true,"type":"number"},"reason":{"description":"Why it stopped","nullable":true,"type":"string"},"remaining_m":{"description":"Distance left along the route","type":"number"},"state":{"description":"Route state","enum":["driving","arrived","blocked","stuck","stopped"],"type":"string"},"waypoint":{"description":"Index of the waypoint being driven to (0-based)","type":"number"},"waypoints":{"description":"Number of waypoints","type":"number"}},"required":["state","reason","waypoint","waypoints","remaining_m","eta_s","elapsed_s"],"type":"object"},"Scene":{"description":"A Metaplanets Scene v1 document: the full schema is /v1/scene-v1.json.","type":"object"},"SceneInfo":{"description":"The scene loaded in this world.","properties":{"base":{"description":"What the scene sits on","enum":["earth","flat","heightmap"],"type":"string"},"entities":{"description":"Entities placed","type":"number"},"name":{"description":"Scene name","type":"string"},"origin":{"$ref":"#/components/schemas/LatLon"},"revision":{"description":"Scene revision loaded","type":"number"},"scene":{"description":"Scene id","type":"string"},"scripts":{"description":"Scripts running","type":"number"},"vehicles":{"description":"Vehicle ids of the scene's vehicles under API control","items":{"description":"Vehicle id","type":"string"},"type":"array"},"warnings":{"description":"What could not be placed (missing assets, unsupported models)","items":{"description":"Warning","type":"string"},"type":"array"}},"required":["scene","name","revision","base","origin","entities","vehicles","scripts","warnings"],"type":"object"},"Session":{"properties":{"api_version":{"type":"string"},"connected":{"description":"A world is attached","type":"boolean"},"created":{"description":"Unix seconds","type":"integer"},"id":{"type":"string"},"kind":{"enum":["attach","hosted","embed"],"type":"string"},"last_event":{"nullable":true,"type":"object"},"name":{"type":"string"},"parent_origin":{"nullable":true,"type":"string"},"render":{"description":"False: a headless world (no images; sensors and world.step)","type":"boolean"}},"required":["id","name","kind","created","connected"],"type":"object"},"Storms":{"additionalProperties":false,"description":"Thunderstorm cells near the viewer: towers, anvils, rain shafts, gust fronts and lightning (drawn with volumetric clouds).","properties":{"intensity":{"description":"0 (none) to 1 (severe: up to three cells)","maximum":1,"minimum":0,"type":"number"},"lightning":{"description":"Flash rate, 0 (none) to 1; .5 is natural","maximum":1,"minimum":0,"type":"number"}},"type":"object"},"Surface":{"description":"Ground at a point. source \"streamed\": full detail near the camera; \"dem\": elevation only, from the global elevation model.","properties":{"elevation_m":{"description":"Height above sea level","nullable":true,"type":"number"},"landcover":{"description":"Land-cover class, e.g. Grassland, Tree cover","nullable":true,"type":"string"},"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"},"slope_deg":{"description":"Ground slope","nullable":true,"type":"number"},"source":{"description":"Where the answer came from","enum":["streamed","dem"],"type":"string"},"water_depth_m":{"description":"Water above the ground","nullable":true,"type":"number"}},"required":["lat","lon","elevation_m","slope_deg","landcover","water_depth_m","source"],"type":"object"},"Telemetry":{"description":"Live state of a vehicle.","properties":{"asset":{"description":"Vehicle asset id (custom vehicles)","nullable":true,"type":"string"},"elevation_m":{"description":"Height above sea level","type":"number"},"entity":{"description":"Scene entity id, when the vehicle belongs to the loaded scene","nullable":true,"type":"string"},"ground":{"nullable":true,"properties":{"landcover":{"description":"Land-cover class","type":"string"},"slope_deg":{"description":"Ground slope","type":"number"},"water_depth_m":{"description":"Water above the ground","type":"number"}},"required":["slope_deg","landcover","water_depth_m"],"type":"object"},"grounded":{"description":"Wheels on the ground","type":"boolean"},"heading_deg":{"description":"Compass heading, 0 = north","type":"number"},"health":{"description":"Condition, 1 = undamaged, 0 = wrecked","maximum":1,"minimum":0,"type":"number"},"kind":{"description":"Vehicle kind (custom: a vehicle asset)","enum":["car","pickup","truck","firetruck","custom"],"type":"string"},"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"nullable":true,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"nullable":true,"type":"number"},"odometer_m":{"description":"Distance driven since spawn","type":"number"},"pitch_deg":{"description":"Nose up positive","type":"number"},"roll_deg":{"description":"Right side down positive","type":"number"},"route":{"$ref":"#/components/schemas/RouteState","nullable":true},"speed_kmh":{"description":"Speed","type":"number"},"speed_mps":{"description":"Speed","type":"number"},"vehicle":{"description":"Vehicle id","type":"string"},"weather":{"$ref":"#/components/schemas/Weather"}},"required":["vehicle","kind","lat","lon","elevation_m","heading_deg","speed_mps","speed_kmh","pitch_deg","roll_deg","ground","health","odometer_m","grounded","weather","route"],"type":"object"},"Weather":{"description":"Simulated weather at this point (not real-world observations).","properties":{"cloud_cover":{"description":"Cloud cover overhead, 0 to 1","maximum":1,"minimum":0,"type":"number"},"label":{"description":"Conditions, e.g. Clear, Rain","type":"string"},"precipitation_intensity":{"description":"Rain or snow intensity, 0 (none) to 1 (heaviest)","maximum":1,"minimum":0,"type":"number"},"pressure_hpa":{"description":"Sea-level pressure","type":"number"},"temperature_c":{"description":"Air temperature","type":"number"},"visibility_m":{"description":"Horizontal visibility","type":"number"},"wind_mps":{"description":"Wind speed","type":"number"}},"required":["label","temperature_c","precipitation_intensity","wind_mps"],"type":"object"},"WeatherState":{"description":"A complete weather description (designed weather): cloud layers, precipitation, wind by height, visibility, fog, temperature, pressure and storms.","properties":{"clouds":{"items":{"$ref":"#/components/schemas/CloudLayer"},"maxItems":3,"type":"array"},"fog":{"$ref":"#/components/schemas/Fog"},"precipitation":{"$ref":"#/components/schemas/Precipitation"},"pressure_hpa":{"description":"Sea-level pressure","maximum":1080,"minimum":900,"type":"number"},"storms":{"$ref":"#/components/schemas/Storms"},"temperature_c":{"description":"Air temperature at the ground (falls 6.5 C per km above)","maximum":55,"minimum":-60,"type":"number"},"visibility_m":{"description":"Visibility outside fog","maximum":100000,"minimum":100,"type":"number"},"wind":{"items":{"$ref":"#/components/schemas/WindLevel"},"maxItems":8,"minItems":1,"type":"array"}},"required":["clouds","precipitation","wind","visibility_m","fog","temperature_c","pressure_hpa","storms"],"type":"object"},"WindLevel":{"additionalProperties":false,"description":"Wind at one height. Levels are interpolated; the lowest is the surface wind.","properties":{"altitude_m":{"description":"Height above the ground (0 = surface)","maximum":20000,"minimum":0,"type":"number"},"direction_deg":{"description":"Where the wind blows from, 0 = north, 90 = east","maximum":360,"minimum":0,"type":"number"},"gust_mps":{"description":"Gusts above the mean speed","maximum":50,"minimum":0,"type":"number"},"speed_mps":{"description":"Mean speed","maximum":100,"minimum":0,"type":"number"}},"required":["altitude_m","direction_deg","speed_mps"],"type":"object"}},"securitySchemes":{"secretKey":{"description":"Secret key, sk_… (server-side only)","scheme":"bearer","type":"http"}}},"info":{"contact":{"name":"Metaplanets","url":"https://metaplanets.ai"},"description":"Drive a real-terrain simulation of the whole Earth from agents and platforms: travel anywhere, read the ground, plan and drive routes, get telemetry, events and pictures.\n\nAuthenticate with a secret key (`Authorization: Bearer sk_…`) from the developer console (/console.html). Browsers use view tokens; embeds use publishable keys or embed tokens. Every response carries `x-request-id` and `Earth-Version`; errors share one shape (`Error`). Limits: per-tier request rates (429 with Retry-After) and monthly allowances (402 quota_exceeded on the free tier).","title":"Project Earth World API","version":"2026-11-07"},"openapi":"3.0.3","paths":{"/v1/agent/inbox":{"get":{"description":"The creators' messages from Dragon Editor's AI panel across the account's drafts, after `after` (long poll with wait, up to 25 s). Pass `next` back.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Messages"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"}},"summary":"Agent inbox","tags":["Agent"]}},"/v1/assets":{"get":{"description":"This account's scene assets.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Assets"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"}},"summary":"List assets","tags":["Scenes"]},"post":{"description":"One file as the request body: up to 64 MiB in one request; larger files (up to 256 MiB) through /v1/uploads. `type`: model (a .glb, or .gltf with embedded data; Draco, meshopt and KTX2 allowed), vehicle (a rigged model: wheels named Wheel_0, Wheel_1, … or Wheel_FL, Wheel_FR, …), texture (PNG, JPEG, WebP, KTX2), script (JavaScript), geo (GeoJSON, GeoTIFF) or heightmap (greyscale PNG). Checked before it is stored; the same file again answers the existing asset (200).","parameters":[{"in":"query","name":"name","required":true,"schema":{"type":"string"}},{"in":"query","name":"type","required":true,"schema":{"enum":["model","vehicle","texture","script","geo","heightmap"],"type":"string"}}],"requestBody":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"bytes":{"type":"integer"},"id":{"type":"string"},"info":{"description":"What the server measured: models and vehicles their bounds, triangles and (vehicles) rig: wheels, steered wheels, front, derived spec","type":"object"},"name":{"type":"string"},"sha256":{"type":"string"},"type":{"enum":["model","vehicle","texture","script","geo","heightmap"],"type":"string"}},"type":"object"}}},"description":"Stored"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Upload an asset","tags":["Scenes"]}},"/v1/assets/{id}":{"delete":{"description":"Refused (409) while a scene uses it.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Deleted"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Delete an asset","tags":["Scenes"]},"get":{"description":"The file as uploaded.","responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The file"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Download an asset","tags":["Scenes"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/v1/assets/{id}/info":{"get":{"description":"Its type, size and what the server measured.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bytes":{"type":"integer"},"id":{"type":"string"},"info":{"description":"What the server measured: models and vehicles their bounds, triangles and (vehicles) rig: wheels, steered wheels, front, derived spec","type":"object"},"name":{"type":"string"},"sha256":{"type":"string"},"type":{"enum":["model","vehicle","texture","script","geo","heightmap"],"type":"string"}},"type":"object"}}},"description":"Asset"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Asset details","tags":["Scenes"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/v1/catalog":{"get":{"description":"Methods, events, error codes and shared schemas, as JSON Schema.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Catalog"}},"security":[],"summary":"Catalog","tags":["Agents"]}},"/v1/drafts/{id}":{"delete":{"description":"Drops its unsaved changes.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Close a draft","tags":["Drafts"]},"get":{"description":"Pending changesets, history and a summary of the scene; with after and wait, a long poll.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Draft status","tags":["Drafts"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"A version: wait until the draft passes it","in":"query","name":"after","schema":{"type":"integer"}},{"in":"query","name":"wait","schema":{"maximum":25,"type":"number"}}]},"/v1/drafts/{id}/changesets":{"get":{"description":"Every changeset of the draft (filter with ?state=pending).","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"List changesets","tags":["Drafts"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Ops in order (entity.add, entity.update, entity.remove, asset.add, asset.remove, script.attach, script.detach, scene.set: see the creator guide). The result is checked against the scene format. From a key it waits for the creator (pending); from the creator in Dragon Editor it applies at once.","requestBody":{"content":{"application/json":{"schema":{"properties":{"ops":{"items":{"type":"object"},"type":"array"},"rationale":{"type":"string"},"title":{"type":"string"}},"required":["ops"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Proposed"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Propose a changeset","tags":["Drafts"]}},"/v1/drafts/{id}/changesets/{n}":{"get":{"description":"Its state (pending, accepted, partly_accepted, rejected with comment, superseded); with wait, after the decision.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"A changeset","tags":["Drafts"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"n","required":true,"schema":{"type":"integer"}},{"in":"query","name":"wait","schema":{"maximum":25,"type":"number"}}]},"/v1/drafts/{id}/changesets/{n}/accept":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"n","required":true,"schema":{"type":"integer"}}],"post":{"description":"The creator's decision (all ops, or ops: [indices]); keys only on drafts the creator opened with review off.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Accept a changeset","tags":["Drafts"]}},"/v1/drafts/{id}/changesets/{n}/reject":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"n","required":true,"schema":{"type":"integer"}}],"post":{"description":"With a comment the proposer reads.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Reject a changeset","tags":["Drafts"]}},"/v1/drafts/{id}/document":{"get":{"description":"The current (unsaved) scene document.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Draft document","tags":["Drafts"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/v1/drafts/{id}/messages":{"get":{"description":"The draft's AI panel conversation after `after`.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Messages"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Panel conversation","tags":["Agent"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"A message from your agent in the panel; kind progress shows a status line.","requestBody":{"content":{"application/json":{"schema":{"properties":{"kind":{"enum":["text","progress"],"type":"string"},"text":{"maxLength":8000,"type":"string"}},"required":["text"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Posted"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Answer the creator","tags":["Agent"]}},"/v1/drafts/{id}/save":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Writes a scene revision (the creator; keys only on review-off drafts).","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Save a draft","tags":["Drafts"]}},"/v1/embed-tokens":{"post":{"description":"From your backend (secret key): a token that lets one origin embed a world metered to your account. Pass it to `/embed?embed_token=…` or the SDK.","requestBody":{"content":{"application/json":{"schema":{"properties":{"origin":{"example":"https://app.example.com","type":"string"},"ttl_s":{"maximum":86400,"minimum":60,"type":"integer"}},"required":["origin"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"embed_token":{"type":"string"},"expires_at":{"type":"integer"},"origin":{"type":"string"}},"type":"object"}}},"description":"Token"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"}},"summary":"Create an embed token","tags":["Embedding"]}},"/v1/embed/sessions":{"post":{"description":"Called by the embedded world itself (`/embed`), not by you: a publishable key whose allowed origins include the parent page, or an embed token.","requestBody":{"content":{"application/json":{"schema":{"properties":{"embed_token":{"type":"string"},"name":{"type":"string"},"parent_origin":{"type":"string"},"publishable_key":{"type":"string"}},"required":["parent_origin"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"parent_origin":{"type":"string"},"token":{"type":"string"}},"type":"object"}}},"description":"Session"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Start an embedded world","tags":["Embedding"]}},"/v1/experiences":{"get":{"description":"This account's published experiences, with play counts.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"}},"summary":"List experiences","tags":["Experiences"]}},"/v1/experiences/{id}":{"delete":{"description":"The link stops working; players' stored values are deleted.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Unpublish","tags":["Experiences"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"put":{"description":"Title, description or visibility.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Update an experience","tags":["Experiences"]}},"/v1/health":{"get":{"description":"Liveness.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"}},"security":[],"summary":"Health","tags":["Service"]}},"/v1/mcp":{"post":{"description":"Model Context Protocol, streamable HTTP with JSON responses: `session_create`, `session_list`, `session_delete` and every world method (with a `session` argument).","requestBody":{"content":{"application/json":{"schema":{"description":"JSON-RPC 2.0 request","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"JSON-RPC response"},"401":{"$ref":"#/components/responses/Error"}},"summary":"MCP (account)","tags":["Agents"]}},"/v1/ready":{"get":{"description":"Database, GPU runner and billing checks.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Ready"},"503":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Readiness","tags":["Service"]}},"/v1/scene-v1.json":{"get":{"description":"The Metaplanets Scene v1 JSON Schema.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"JSON Schema"}},"security":[],"summary":"Scene format","tags":["Scenes"]}},"/v1/scenes":{"get":{"description":"This account's scenes (Metaplanets Scene v1), newest first, with the storage used. Paid plans.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Scenes"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"summary":"List scenes","tags":["Scenes"]},"post":{"description":"Store a scene document. It is checked against `/v1/scene-v1.json`; every `asset://` it uses must be an asset of this account. Paid plans.","requestBody":{"content":{"application/json":{"schema":{"properties":{"document":{"$ref":"#/components/schemas/Scene"},"name":{"maxLength":160,"type":"string"},"revision":{"description":"PUT: the revision you read (a newer save answers 409 conflict)","type":"integer"}},"required":["document"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer"}},"type":"object"}}},"description":"Created"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Create a scene","tags":["Scenes"]}},"/v1/scenes/import":{"post":{"description":"Upload a `.mpscene` ZIP (up to 2 GiB): its assets become this account's (the same file again is the same asset) and a new scene is made.","requestBody":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer"}},"type":"object"}}},"description":"Created"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Import a bundle","tags":["Scenes"]}},"/v1/scenes/{id}":{"delete":{"description":"Its assets stay (delete them separately).","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Deleted"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Delete a scene","tags":["Scenes"]},"get":{"description":"The scene document and its revision.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"document":{"$ref":"#/components/schemas/Scene"},"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer"}},"type":"object"}}},"description":"Scene"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Read a scene","tags":["Scenes"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"put":{"description":"Save a new revision. Pass the revision you read: a newer save answers 409 `conflict`.","requestBody":{"content":{"application/json":{"schema":{"properties":{"document":{"$ref":"#/components/schemas/Scene"},"name":{"maxLength":160,"type":"string"},"revision":{"description":"PUT: the revision you read (a newer save answers 409 conflict)","type":"integer"}},"required":["document"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer"}},"type":"object"}}},"description":"Saved"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Replace a scene","tags":["Scenes"]}},"/v1/scenes/{id}/bundle":{"get":{"description":"The scene and its assets as one `.mpscene` ZIP: `scene.json` (asset uris `assets/<file>`) and the files.","responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"ZIP"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Download a bundle","tags":["Scenes"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/v1/scenes/{id}/drafts":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"The scene's shared working copy (one per scene: the editor and its AIs share it). Changes from keys wait for the creator's review in Dragon Editor.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Open a draft","tags":["Drafts"]}},"/v1/scenes/{id}/publish":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Publishing is a person's decision: your own program confirms it","in":"header","name":"X-Earth-Publish","required":true,"schema":{"enum":["yes"],"type":"string"}}],"post":{"description":"Freeze the scene's saved revision as a playable experience at /play/<slug> (a new version each time). Players run it in their own browser; plays count on your account.","requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"visibility":{"enum":["unlisted","private"],"type":"string"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Published"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Publish","tags":["Experiences"]}},"/v1/scenes/{id}/revisions":{"get":{"description":"The last 50 saved revisions.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Scene revisions","tags":["Drafts"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/v1/scripts/check":{"post":{"description":"Diagnostics with line and column (sandbox rules, brackets and strings, determinism).","requestBody":{"content":{"application/json":{"schema":{"properties":{"text":{"type":"string"}},"required":["text"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"}},"summary":"Check a script","tags":["Drafts"]}},"/v1/sessions":{"get":{"description":"This account's sessions.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/Session"},"type":"array"}},"type":"object"}}},"description":"Sessions"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"summary":"List sessions","tags":["Sessions"]},"post":{"description":"Start a world session. `hosted: true` runs the world on Metaplanets servers (it attaches within about a minute); otherwise open `page_url` in a browser (the SDKs launch it for you). `render: false` makes a headless world: physics, collision, `sensor.heightmap`, `sensor.rays` and `world.step` (faster than real time), no images and no GPU needed. Send `Idempotency-Key` to retry safely.","requestBody":{"content":{"application/json":{"schema":{"properties":{"hosted":{"default":false,"type":"boolean"},"name":{"maxLength":80,"type":"string"},"render":{"default":true,"description":"False: a headless world (no renderer, no GPU)","type":"boolean"},"scene":{"description":"A scene of your account, loaded once the world is ready (scene.loaded or scene.failed) (paid plans)","type":"string"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSession"}}},"description":"Created"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}},"summary":"Start a session","tags":["Sessions"]}},"/v1/sessions/{id}":{"delete":{"description":"Ends the session and closes its world.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"}},"type":"object"}}},"description":"Deleted"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"End a session","tags":["Sessions"]},"get":{"description":"Whether its world is attached, and the last event.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"Session"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Get a session","tags":["Sessions"]},"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/v1/sessions/{id}/calls":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Generic form of the per-method routes below: `{method, params, timeout_s}`.","requestBody":{"content":{"application/json":{"schema":{"properties":{"method":{"enum":["world.status","world.goto","world.set_time","world.set_weather","world.get_weather","world.weather_presets","terrain.sample","terrain.profile","route.plan","vehicle.spawn","vehicle.drive","vehicle.control","vehicle.stop","vehicle.telemetry","vehicle.list","vehicle.remove","camera.follow","camera.release","world.step","sensor.heightmap","sensor.rays","camera.snapshot","scene.load","scene.unload","scene.info","entity.list","entity.get","entity.spawn","entity.set","entity.remove","script.list","script.send","ui.set","ui.clear","ui.cursor","ui.toast","player.get","player.set","rules.get","rules.set","store.get","store.set","store.submit","store.top"],"type":"string"},"params":{"type":"object"},"timeout_s":{"type":"number"}},"required":["method"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{}},"type":"object"}}},"description":"The method's result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Call any method","tags":["World"]}},"/v1/sessions/{id}/events":{"get":{"description":"Server-Sent Events: `{event, data, time}` with ids. Reconnect with `Last-Event-ID` to get what you missed (the last 500). Events are listed in `/v1/catalog`.","responses":{"200":{"content":{"text/event-stream":{"schema":{"type":"string"}}},"description":"text/event-stream"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Event stream","tags":["Watch"]},"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"A view token, for browsers (EventSource, <img>) that cannot send headers","in":"query","name":"view_token","schema":{"type":"string"}}]},"/v1/sessions/{id}/live":{"get":{"description":"MJPEG (`multipart/x-mixed-replace`) for `<img src>`. Frames are not metered as calls.","responses":{"200":{"description":"MJPEG stream"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Live view","tags":["Watch"]},"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"A view token, for browsers (EventSource, <img>) that cannot send headers","in":"query","name":"view_token","schema":{"type":"string"}},{"in":"query","name":"fps","schema":{"maximum":10,"minimum":0.5,"type":"number"}}]},"/v1/sessions/{id}/mcp":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Model Context Protocol for one session's world.","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"JSON-RPC response"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"MCP (one session)","tags":["Agents"]}},"/v1/sessions/{id}/methods/camera.follow":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Point the main view at a vehicle: chase camera, or the driver's seat.","operationId":"camera_follow","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"vehicle":{"description":"Vehicle id from vehicle.spawn (optional when exactly one vehicle exists)","maxLength":32,"type":"string"},"view":{"default":"chase","description":"Camera view","enum":["chase","driver"],"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"vehicle":{"description":"Followed vehicle id","nullable":true,"type":"string"},"view":{"description":"Camera view","enum":["chase","driver"],"type":"string"}},"required":["vehicle","view"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Follow a vehicle","tags":["World"]}},"/v1/sessions/{id}/methods/camera.release":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Stop following a vehicle; the camera stays where it is.","operationId":"camera_release","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"vehicle":{"description":"Followed vehicle id","nullable":true,"type":"string"}},"required":["vehicle"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Release the camera","tags":["World"]}},"/v1/sessions/{id}/methods/camera.snapshot":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"A picture of the current view (JPEG, base64), for vision models and reports.","operationId":"camera_snapshot","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"quality":{"default":0.8,"description":"JPEG quality","maximum":0.95,"minimum":0.3,"type":"number"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"bytes":{"description":"Image size","type":"number"},"camera":{"$ref":"#/components/schemas/Camera","nullable":true},"data":{"description":"Base64 image","format":"byte","type":"string"},"mime_type":{"description":"Image type","enum":["image/jpeg"],"type":"string"}},"required":["mime_type","bytes","data","camera"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Take a snapshot","tags":["World"]}},"/v1/sessions/{id}/methods/entity.get":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"One entity's state.","operationId":"entity_get","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"entity":{"description":"Entity id","maxLength":80,"type":"string"}},"required":["entity"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/Entity"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Get an entity","tags":["World"]}},"/v1/sessions/{id}/methods/entity.list":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Every entity of the loaded scene and every one placed with entity.spawn.","operationId":"entity_list","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"class":{"description":"Only this semantic class","maxLength":40,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"entities":{"items":{"$ref":"#/components/schemas/Entity"},"type":"array"}},"required":["entities"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"List entities","tags":["World"]}},"/v1/sessions/{id}/methods/entity.remove":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Remove an entity (and its vehicle, if it is one).","operationId":"entity_remove","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"entity":{"description":"Entity id","maxLength":80,"type":"string"}},"required":["entity"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"entity":{"description":"Removed entity id","type":"string"}},"required":["entity"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Remove an entity","tags":["World"]}},"/v1/sessions/{id}/methods/entity.set":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Move, turn, scale, show or hide an entity.","operationId":"entity_set","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"elevation_m":{"description":"Height above sea level (default: on the ground)","maximum":9000,"minimum":-500,"type":"number"},"entity":{"description":"Entity id","maxLength":80,"type":"string"},"heading_deg":{"description":"Compass heading, 0 = north","maximum":360,"minimum":0,"type":"number"},"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"},"position_m":{"description":"Or: position in the scene frame (ENU at the scene origin; m)","items":{"description":"m","maximum":1000000,"minimum":-1000000,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"rotation_deg":{"description":"Or: full rotation about east, north, up (degrees)","items":{"description":"deg","maximum":360,"minimum":-360,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"scale":{"description":"Scale (east, north, up)","items":{"description":"Scale","maximum":1000,"minimum":0.001,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"visible":{"description":"Shown","type":"boolean"}},"required":["entity"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/Entity"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Move or change an entity","tags":["World"]}},"/v1/sessions/{id}/methods/entity.spawn":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Place an object: a primitive, a model or vehicle asset of your account, a light or a trigger, with components as in a Metaplanets Scene entity (api/scene-v1.json). Default: on the ground ahead of the camera. Paid plans.","operationId":"entity_spawn","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"components":{"description":"Components, as in a scene entity: primitive, mesh, vehicle, physics, semantics, light, trigger, script","type":"object"},"elevation_m":{"description":"Height above sea level (default: on the ground)","maximum":9000,"minimum":-500,"type":"number"},"entity":{"description":"Entity id (default: generated)","maxLength":80,"type":"string"},"heading_deg":{"description":"Compass heading, 0 = north","maximum":360,"minimum":0,"type":"number"},"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"},"name":{"description":"Name","maxLength":160,"type":"string"},"position_m":{"description":"Or: position in the scene frame (ENU at the scene origin; m)","items":{"description":"m","maximum":1000000,"minimum":-1000000,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"rotation_deg":{"description":"Or: full rotation about east, north, up (degrees)","items":{"description":"deg","maximum":360,"minimum":-360,"type":"number"},"maxItems":3,"minItems":3,"type":"array"},"scale":{"description":"Scale (east, north, up)","items":{"description":"Scale","maximum":1000,"minimum":0.001,"type":"number"},"maxItems":3,"minItems":3,"type":"array"}},"required":["components"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/Entity"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Place an entity","tags":["World"]}},"/v1/sessions/{id}/methods/player.get":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"The person playing: mode, position, the vehicle they drive.","operationId":"player_get","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"elevation_m":{"description":"Height above sea level","nullable":true,"type":"number"},"entity":{"description":"That vehicle's entity","nullable":true,"type":"string"},"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"nullable":true,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"nullable":true,"type":"number"},"mode":{"description":"Player mode","type":"string"},"vehicle":{"description":"Vehicle id they drive","nullable":true,"type":"string"}},"required":["mode","lat","lon","elevation_m","vehicle","entity"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Player state","tags":["World"]}},"/v1/sessions/{id}/methods/player.set":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Put the player in a scene vehicle (or out of one), or move them within the scene.","operationId":"player_set","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"},"vehicle":{"description":"Vehicle id to drive; empty string to get out","maxLength":32,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"mode":{"description":"Player mode","type":"string"},"vehicle":{"description":"Vehicle id","nullable":true,"type":"string"}},"required":["mode","vehicle"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Move the player","tags":["World"]}},"/v1/sessions/{id}/methods/route.plan":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Find a drivable route between two points on the loaded terrain, avoiding ground steeper than max_slope_deg, water, trees and boulders, and preferring open ground to forest. Fails with no_route when there is none.","operationId":"route_plan","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"from_lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"from_lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"},"max_slope_deg":{"default":20,"description":"Steepest grade allowed","maximum":45,"minimum":1,"type":"number"},"to_lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"to_lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"}},"required":["from_lat","from_lon","to_lat","to_lon"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/Plan"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Plan a route","tags":["World"]}},"/v1/sessions/{id}/methods/rules.get":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Score, lives, time left, checkpoint and status of the scene's rules.","operationId":"rules_get","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/GameState"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Game state","tags":["World"]}},"/v1/sessions/{id}/methods/rules.set":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Set or add to the score or lives, move to a checkpoint, or end the game (status won or lost).","operationId":"rules_set","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"add_lives":{"description":"Add lives","maximum":99,"minimum":-99,"type":"number"},"add_score":{"description":"Add to the score","maximum":1000000000,"minimum":-1000000000,"type":"number"},"checkpoint":{"description":"Next checkpoint index","maximum":64,"minimum":0,"type":"integer"},"lives":{"description":"Set lives","maximum":99,"minimum":0,"type":"number"},"reason":{"description":"Why (shown to the player)","maxLength":120,"type":"string"},"score":{"description":"Set the score","maximum":1000000000,"minimum":-1000000000,"type":"number"},"status":{"description":"End the game","enum":["playing","won","lost"],"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/GameState"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Change game state","tags":["World"]}},"/v1/sessions/{id}/methods/scene.info":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"The loaded scene, or null when none is loaded.","operationId":"scene_info","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/SceneInfo","nullable":true}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Scene status","tags":["World"]}},"/v1/sessions/{id}/methods/scene.load":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Load one of your account's scenes (POST /v1/scenes, or saved from Dragon Editor) into this world: travels to it, places its entities, makes its vehicles drivable (their ids are in vehicles) and starts its scripts. Replaces any scene loaded before. Paid plans. Long-running: allow up to `timeout_s` plus a few seconds.","operationId":"scene_load","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"draft":{"description":"Or: a draft id (POST /v1/scenes/{id}/drafts): its current, unsaved document, for playtests","maxLength":80,"type":"string"},"scene":{"description":"Scene id","maxLength":80,"type":"string"},"scripts":{"default":true,"description":"Start the scene's scripts","type":"boolean"},"timeout_s":{"default":240,"description":"Give up waiting after this long","maximum":590,"minimum":10,"type":"number"},"travel":{"default":true,"description":"Travel to the scene's spawn point (or origin) first","type":"boolean"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/SceneInfo"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Load a scene","tags":["World"]}},"/v1/sessions/{id}/methods/scene.unload":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Remove the loaded scene: its entities, vehicles and scripts.","operationId":"scene_unload","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"scene":{"description":"Scene id that was unloaded","nullable":true,"type":"string"}},"required":["scene"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Unload the scene","tags":["World"]}},"/v1/sessions/{id}/methods/script.list":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"The scripts running in this world and their state.","operationId":"script_list","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"scripts":{"items":{"properties":{"asset":{"description":"Script asset","type":"string"},"entity":{"description":"Entity it belongs to","nullable":true,"type":"string"},"error":{"description":"Why it stopped","nullable":true,"type":"string"},"script":{"description":"Script id","type":"string"},"state":{"description":"State","enum":["starting","running","stopped","failed"],"type":"string"}},"required":["script","asset","entity","state","error"],"type":"object"},"type":"array"}},"required":["scripts"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Scene scripts","tags":["World"]}},"/v1/sessions/{id}/methods/script.send":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Send a message to the scene's scripts (their on(\"message\") handlers), e.g. to start a scenario step.","operationId":"script_send","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"data":{"description":"Any JSON object","type":"object"},"script":{"description":"Only this script (default: all)","maxLength":80,"type":"string"}},"required":["data"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"delivered":{"description":"Scripts that received it","type":"number"}},"required":["delivered"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Message the scripts","tags":["World"]}},"/v1/sessions/{id}/methods/sensor.heightmap":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"A square grid centred on a vehicle: ground height relative to the ground under it, water depth and whether a tree, rock or building blocks the cell. Row-major from the far edge ahead to the edge behind, left to right, in the frame of the vehicle heading (or north-up). No GPU: works in headless sessions.","operationId":"sensor_heightmap","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"frame":{"default":"heading","description":"Grid orientation","enum":["heading","north"],"type":"string"},"resolution_m":{"default":2,"description":"Cell size (m); at most 256 cells a side","maximum":20,"minimum":0.5,"type":"number"},"size_m":{"default":64,"description":"Side of the square (m)","maximum":400,"minimum":4,"type":"number"},"vehicle":{"description":"Vehicle id from vehicle.spawn (optional when exactly one vehicle exists)","maxLength":32,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"blocked":{"description":"1 where a trunk, rock or building occupies the cell","items":{"description":"0 or 1","type":"number"},"type":"array"},"cells":{"description":"Cells per side","type":"number"},"elevation_m":{"description":"Ground under the vehicle (m above sea level)","type":"number"},"frame":{"description":"Grid orientation","type":"string"},"heights_m":{"description":"Relative ground height per cell (null where not loaded)","items":{"description":"m","nullable":true,"type":"number"},"type":"array"},"resolution_m":{"description":"Cell size (m)","type":"number"},"water_depth_m":{"description":"Water depth per cell (0 when dry)","items":{"description":"m","type":"number"},"type":"array"}},"required":["cells","resolution_m","frame","elevation_m","heights_m","water_depth_m","blocked"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Ground around a vehicle","tags":["World"]}},"/v1/sessions/{id}/methods/sensor.rays":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Lidar-like ranges in a horizontal fan at a height above the ground under a vehicle: distance to the first trunk, rock, building, rising ground or water deeper than 0.4 m. Ray 0 points ahead, then clockwise. No GPU: works in headless sessions.","operationId":"sensor_rays","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"count":{"default":36,"description":"Rays, evenly spaced over fov_deg","maximum":360,"minimum":1,"type":"number"},"fov_deg":{"default":360,"description":"Fan width (360 = all round)","maximum":360,"minimum":1,"type":"number"},"height_m":{"default":1,"description":"Ray height above the ground under the vehicle (m)","maximum":20,"minimum":0,"type":"number"},"range_m":{"default":50,"description":"Maximum range (m)","maximum":200,"minimum":1,"type":"number"},"vehicle":{"description":"Vehicle id from vehicle.spawn (optional when exactly one vehicle exists)","maxLength":32,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"angles_deg":{"description":"Bearing of each ray relative to the heading (clockwise)","items":{"description":"deg","type":"number"},"type":"array"},"hits":{"description":"What each ray hit","items":{"description":"Hit","enum":["none","ground","obstacle","water"],"type":"string"},"type":"array"},"ranges_m":{"description":"Distance per ray (range_m where nothing was hit)","items":{"description":"m","type":"number"},"type":"array"}},"required":["ranges_m","hits","angles_deg"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Range rays around a vehicle","tags":["World"]}},"/v1/sessions/{id}/methods/store.get":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"A value kept for this player between plays (keys declared in the scene's store section). In sessions it lasts for the session.","operationId":"store_get","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"key":{"description":"Key","maxLength":80,"type":"string"}},"required":["key"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"key":{"description":"Key","type":"string"},"value":{"description":"The value, or null"}},"required":["key","value"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Read a stored value","tags":["World"]}},"/v1/sessions/{id}/methods/store.set":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Keep a value for this player (number, string up to 1 KB, or boolean, as the key declares).","operationId":"store_set","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"key":{"description":"Key","maxLength":80,"type":"string"},"value":{"description":"The value"}},"required":["key","value"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"key":{"description":"Key","type":"string"},"value":{"description":"The value"}},"required":["key","value"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Store a value","tags":["World"]}},"/v1/sessions/{id}/methods/store.submit":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Submit a number to a leaderboard key; the player's best is kept.","operationId":"store_submit","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"key":{"description":"Leaderboard key","maxLength":80,"type":"string"},"name":{"description":"Name to show","maxLength":40,"type":"string"},"value":{"description":"Value","maximum":1000000000000,"minimum":-1000000000000,"type":"number"}},"required":["key","value"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"best":{"description":"The player's best","type":"number"},"rank":{"description":"Rank (1 = first)","nullable":true,"type":"number"}},"required":["best","rank"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Submit a score","tags":["World"]}},"/v1/sessions/{id}/methods/store.top":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"The best entries of a leaderboard key.","operationId":"store_top","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"key":{"description":"Leaderboard key","maxLength":80,"type":"string"},"limit":{"default":10,"description":"Entries","maximum":100,"minimum":1,"type":"integer"}},"required":["key"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"entries":{"items":{"properties":{"name":{"description":"Name","type":"string"},"rank":{"description":"Rank","type":"number"},"value":{"description":"Value","type":"number"}},"required":["rank","name","value"],"type":"object"},"type":"array"}},"required":["entries"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Leaderboard","tags":["World"]}},"/v1/sessions/{id}/methods/terrain.profile":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Elevation profile along a straight line, with total climb, descent, steepest slope and wet samples. Judge a route with it before driving.","operationId":"terrain_profile","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"from_lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"from_lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"},"samples":{"default":40,"description":"Points along the line","maximum":200,"minimum":2,"type":"integer"},"to_lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"to_lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"}},"required":["from_lat","from_lon","to_lat","to_lon"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"climb_m":{"description":"Total climb","type":"number"},"descent_m":{"description":"Total descent","type":"number"},"length_m":{"description":"Line length","type":"number"},"samples":{"items":{"$ref":"#/components/schemas/Surface"},"type":"array"},"steepest_slope_deg":{"description":"Steepest grade","type":"number"},"water_samples":{"description":"Samples under water","type":"number"}},"required":["length_m","climb_m","descent_m","steepest_slope_deg","water_samples","samples"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Elevation profile","tags":["World"]}},"/v1/sessions/{id}/methods/terrain.sample":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Ground at a point: elevation, slope, land cover and water depth. Full detail near the camera (source \"streamed\"); elsewhere elevation only (source \"dem\").","operationId":"terrain_sample","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"}},"required":["lat","lon"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/Surface"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Sample the ground","tags":["World"]}},"/v1/sessions/{id}/methods/ui.clear":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Remove one panel, or all the scene's panels.","operationId":"ui_clear","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"description":"Panel id (default: all)","maxLength":80,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"cleared":{"description":"Panels removed","type":"number"}},"required":["cleared"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Remove UI panels","tags":["World"]}},"/v1/sessions/{id}/methods/ui.cursor":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Rendered worlds: visible frees the mouse (menus, buttons in panels); hidden captures it for looking and aiming again on the next click. Starts as player.cursor in the scene (locked unless set to visible).","operationId":"ui_cursor","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"visible":{"description":"true: show the cursor; false: hide and capture it","type":"boolean"}},"required":["visible"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"visible":{"type":"boolean"}},"required":["visible"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Show or hide the mouse cursor","tags":["World"]}},"/v1/sessions/{id}/methods/ui.set":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Show or replace an on-screen panel: text, bars, buttons, lists, images, timers (as in a scene's ui section). Text is shown as text, never HTML. Paid plans.","operationId":"ui_set","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"description":"Panel id","maxLength":80,"type":"string"},"panel":{"description":"The panel: anchor, title, widgets (api/scene-v1.json ui.panels item, without id)","type":"object"}},"required":["id","panel"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"id":{"description":"Panel id","type":"string"}},"required":["id"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Show a UI panel","tags":["World"]}},"/v1/sessions/{id}/methods/ui.toast":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"A short message on screen.","operationId":"ui_toast","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"duration_s":{"default":3,"description":"How long","maximum":30,"minimum":0.5,"type":"number"},"text":{"description":"Text","maxLength":200,"type":"string"},"tone":{"default":"neutral","description":"Colour","enum":["neutral","accent","good","warn","bad"],"type":"string"}},"required":["text"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"shown":{"type":"boolean"}},"required":["shown"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Show a message","tags":["World"]}},"/v1/sessions/{id}/methods/vehicle.control":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Direct control for agents and learning loops: hold throttle, steering and brake for duration_s, then answer with telemetry (one environment step). The controls stay on until the next command, for at most 2 s more, then the vehicle brakes. Cancels any route. Positive steer turns right; negative throttle reverses.","operationId":"vehicle_control","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"brake":{"default":false,"description":"Brake","type":"boolean"},"duration_s":{"default":0.5,"description":"How long to hold these controls","maximum":10,"minimum":0.05,"type":"number"},"steer":{"default":0,"description":"Steering, -1 (full left) to 1 (full right)","maximum":1,"minimum":-1,"type":"number"},"throttle":{"description":"Throttle, -1 (full reverse) to 1 (full forward)","maximum":1,"minimum":-1,"type":"number"},"vehicle":{"description":"Vehicle id from vehicle.spawn (optional when exactly one vehicle exists)","maxLength":32,"type":"string"},"wait":{"default":true,"description":"Answer after duration_s with the telemetry then (one step); false answers at once","type":"boolean"}},"required":["throttle"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/Telemetry"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Drive directly","tags":["World"]}},"/v1/sessions/{id}/methods/vehicle.drive":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Drive along waypoints. The vehicle stops itself before ground steeper than max_slope_deg and (by default) water; when blocked by an obstacle it backs off and re-plans. Progress arrives as vehicle.* events. With wait, answers when the route ends, with its outcome. Long-running: allow up to `timeout_s` plus a few seconds.","operationId":"vehicle_drive","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"avoid_water":{"default":true,"description":"Stop before water deeper than 0.4 m","type":"boolean"},"max_slope_deg":{"default":25,"description":"Stop before ground steeper than this","maximum":45,"minimum":1,"type":"number"},"plan":{"default":false,"description":"Find a drivable route to the last waypoint first (as route.plan) instead of driving straight, and plan again from the bank if it meets water","type":"boolean"},"speed_kmh":{"default":30,"description":"Cruise speed, capped by the vehicle","maximum":120,"minimum":1,"type":"number"},"timeout_s":{"default":300,"description":"With wait: stop waiting after this long (the vehicle keeps driving)","maximum":590,"minimum":1,"type":"number"},"vehicle":{"description":"Vehicle id from vehicle.spawn (optional when exactly one vehicle exists)","maxLength":32,"type":"string"},"wait":{"default":false,"description":"Answer only when the route ends","type":"boolean"},"waypoints":{"description":"Points in order; the last is the destination","items":{"$ref":"#/components/schemas/LatLon"},"maxItems":500,"minItems":1,"type":"array"}},"required":["waypoints"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"description":"Telemetry, plus the plan used and (with wait) how the route ended.","properties":{"outcome":{"description":"With wait: how the route ended","enum":["arrived","blocked","stuck","stopped","replaced","removed","timeout"],"nullable":true,"type":"string"},"plan":{"$ref":"#/components/schemas/Plan","nullable":true},"telemetry":{"$ref":"#/components/schemas/Telemetry"}},"required":["telemetry","plan","outcome"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Drive a route","tags":["World"]}},"/v1/sessions/{id}/methods/vehicle.list":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Every vehicle under API control, with telemetry.","operationId":"vehicle_list","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"vehicles":{"items":{"$ref":"#/components/schemas/Telemetry"},"type":"array"}},"required":["vehicles"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"List vehicles","tags":["World"]}},"/v1/sessions/{id}/methods/vehicle.remove":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Remove a vehicle from the world.","operationId":"vehicle_remove","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"vehicle":{"description":"Vehicle id from vehicle.spawn (optional when exactly one vehicle exists)","maxLength":32,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"vehicle":{"description":"Removed vehicle id","type":"string"}},"required":["vehicle"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Remove a vehicle","tags":["World"]}},"/v1/sessions/{id}/methods/vehicle.spawn":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Place a ground vehicle (default: ahead of the camera): a built-in kind, or a custom vehicle asset of your account. Returns its telemetry and id.","operationId":"vehicle_spawn","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"asset":{"description":"A vehicle asset of your account (POST /v1/assets, type vehicle): a custom rigged vehicle. Paid plans.","maxLength":80,"type":"string"},"heading_deg":{"description":"Compass heading, 0 = north","maximum":360,"minimum":0,"type":"number"},"kind":{"description":"Vehicle kind (or give asset)","enum":["car","pickup","truck","firetruck"],"type":"string"},"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/Telemetry"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Place a vehicle","tags":["World"]}},"/v1/sessions/{id}/methods/vehicle.stop":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Brake to a halt; the route is cancelled.","operationId":"vehicle_stop","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"vehicle":{"description":"Vehicle id from vehicle.spawn (optional when exactly one vehicle exists)","maxLength":32,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/Telemetry"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Stop a vehicle","tags":["World"]}},"/v1/sessions/{id}/methods/vehicle.telemetry":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Live state: position, elevation, heading, speed, attitude, the ground under it, weather, health, odometer and route progress.","operationId":"vehicle_telemetry","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"vehicle":{"description":"Vehicle id from vehicle.spawn (optional when exactly one vehicle exists)","maxLength":32,"type":"string"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/Telemetry"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Vehicle telemetry","tags":["World"]}},"/v1/sessions/{id}/methods/world.get_weather":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"The weather in force as a complete state (the same fields world.set_weather takes) and what it is like at the camera. In simulated weather (auto, storm, hurricane) the state describes the live sky and changes as the weather moves; pass it to world.set_weather with weather custom to hold it.","operationId":"world_get_weather","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"designed":{"description":"true: a fixed state (a designed preset or custom); false: the simulation is running","type":"boolean"},"observed":{"$ref":"#/components/schemas/Weather","nullable":true},"season":{"description":"Season","enum":["now","winter","spring","summer","autumn"],"type":"string"},"state":{"$ref":"#/components/schemas/WeatherState"},"summary":{"description":"One-line description","type":"string"},"time_of_day_h":{"description":"Local hour","type":"number"},"weather":{"description":"Weather preset in force","enum":["auto","clear","fair","cloudy","overcast","rain","storm","snow","thunderstorm","hurricane","high_cloud","fog","drizzle","blizzard","custom"],"type":"string"}},"required":["weather","designed","state","summary","observed","time_of_day_h","season"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Get the weather","tags":["World"]}},"/v1/sessions/{id}/methods/world.goto":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Travel to a place on Earth (flies there, or drops in from orbit the first time). Vehicles spawned before are removed. Answers once the ground there is loaded: 10–60 s, up to about 2 minutes on a cold start. Long-running: allow up to `timeout_s` plus a few seconds.","operationId":"world_goto","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"lat":{"description":"Latitude, WGS84 degrees","maximum":90,"minimum":-90,"type":"number"},"lon":{"description":"Longitude, WGS84 degrees","maximum":180,"minimum":-180,"type":"number"},"name":{"description":"Label shown on arrival","maxLength":80,"type":"string"},"timeout_s":{"default":240,"description":"Give up waiting after this long","maximum":590,"minimum":10,"type":"number"}},"required":["lat","lon"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"$ref":"#/components/schemas/Surface"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Travel somewhere","tags":["World"]}},"/v1/sessions/{id}/methods/world.set_time":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Set the local time of day, and optionally the season (now follows the calendar; seasons are for the viewer's hemisphere).","operationId":"world_set_time","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"hour":{"description":"Hour","maximum":24,"minimum":0,"type":"number"},"season":{"description":"Season","enum":["now","winter","spring","summer","autumn"],"type":"string"}},"required":["hour"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"season":{"description":"Season","enum":["now","winter","spring","summer","autumn"],"type":"string"},"time_of_day_h":{"description":"Local hour","type":"number"}},"required":["time_of_day_h"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Set the time of day","tags":["World"]}},"/v1/sessions/{id}/methods/world.set_weather":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Set the weather. The weather is simulated (a global model of winds, pressure systems, fronts, cloud, rain, snow and storms), not real-world observations or forecasts. auto lets the simulation run; storm and hurricane place a system beside you; the other presets fix the conditions. For fine control give any of clouds, precipitation, wind, visibility_m, fog, temperature_c, pressure_hpa and storms: they refine the preset named in weather (or, with custom, the weather in force) and the result is custom weather. clouds and wind replace the whole list; precipitation, fog and storms change only the fields given. Weather lasts for the session (it is not saved); a new session starts with a clear sky (clear).","operationId":"world_set_weather","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"clouds":{"description":"Cloud layers, at most one per tier (low, mid, high); [] for a clear sky","items":{"$ref":"#/components/schemas/CloudLayer"},"maxItems":3,"type":"array"},"fog":{"$ref":"#/components/schemas/Fog"},"precipitation":{"$ref":"#/components/schemas/Precipitation"},"pressure_hpa":{"description":"Sea-level pressure","maximum":1080,"minimum":900,"type":"number"},"storms":{"$ref":"#/components/schemas/Storms"},"temperature_c":{"description":"Air temperature at the ground","maximum":55,"minimum":-60,"type":"number"},"visibility_m":{"description":"Visibility outside fog","maximum":100000,"minimum":100,"type":"number"},"weather":{"description":"Weather preset (custom: refine the weather in force)","enum":["auto","clear","fair","cloudy","overcast","rain","storm","snow","thunderstorm","hurricane","high_cloud","fog","drizzle","blizzard","custom"],"type":"string"},"wind":{"description":"Wind by height, any order (the lowest becomes the surface wind)","items":{"$ref":"#/components/schemas/WindLevel"},"maxItems":8,"minItems":1,"type":"array"}},"required":["weather"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"state":{"$ref":"#/components/schemas/WeatherState","nullable":true},"summary":{"description":"One-line description","type":"string"},"weather":{"description":"Weather in force","enum":["auto","clear","fair","cloudy","overcast","rain","storm","snow","thunderstorm","hurricane","high_cloud","fog","drizzle","blizzard","custom"],"type":"string"}},"required":["weather"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Set the weather","tags":["World"]}},"/v1/sessions/{id}/methods/world.status":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Where the simulation is and whether it is ready: mode, camera, time of day, weather and the vehicles under API control.","operationId":"world_status","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"camera":{"$ref":"#/components/schemas/Camera","nullable":true},"mode":{"description":"surface, space or travelling","type":"string"},"paused":{"type":"boolean"},"ready":{"type":"boolean"},"time_of_day_h":{"description":"Local hour, 0–24","type":"number"},"vehicles":{"items":{"$ref":"#/components/schemas/Telemetry"},"type":"array"},"weather":{"description":"Weather preset; auto = the simulation runs freely; custom = a caller's own state (world.get_weather)","enum":["auto","clear","fair","cloudy","overcast","rain","storm","snow","thunderstorm","hurricane","high_cloud","fog","drizzle","blizzard","custom"],"type":"string"}},"required":["ready","paused","mode","camera","time_of_day_h","weather","vehicles"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"World status","tags":["World"]}},"/v1/sessions/{id}/methods/world.step":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Advance a headless world by `seconds` at once, as fast as the CPU allows (no wall-clock wait), then answer. After the first step the world waits for the next one instead of running in real time, and calls that wait advance it by what they wait for: vehicle.control by duration_s, vehicle.drive until the route ends (world.goto still loads in real time). Headless sessions only.","operationId":"world_step","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"seconds":{"default":1,"description":"Simulated seconds to advance (60 steps a second)","maximum":600,"minimum":0.0167,"type":"number"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"ticks":{"description":"Fixed steps run","type":"number"},"time_s":{"description":"Simulation clock after the step (s)","type":"number"}},"required":["ticks","time_s"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"Step the simulation","tags":["World"]}},"/v1/sessions/{id}/methods/world.weather_presets":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Every weather preset with its description and, for designed presets, the full state it applies (a starting point for fine control with world.set_weather).","operationId":"world_weather_presets","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"result":{"properties":{"presets":{"items":{"properties":{"label":{"description":"Display name","type":"string"},"name":{"description":"Preset","enum":["auto","clear","fair","cloudy","overcast","rain","storm","snow","thunderstorm","hurricane","high_cloud","fog","drizzle","blizzard","custom"],"type":"string"},"simulated":{"description":"Runs the simulation (no fixed state)","type":"boolean"},"state":{"$ref":"#/components/schemas/WeatherState","nullable":true},"summary":{"description":"What it looks like","type":"string"}},"required":["name","label","simulated","summary","state"],"type":"object"},"type":"array"}},"required":["presets"],"type":"object"}},"required":["result"],"type":"object"}}},"description":"Result"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"}},"summary":"List weather presets","tags":["World"]}},"/v1/sessions/{id}/snapshot":{"get":{"description":"The current view as JPEG (a metered call).","responses":{"200":{"content":{"image/jpeg":{"schema":{"format":"binary","type":"string"}}},"description":"JPEG"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}},"summary":"Snapshot","tags":["Watch"]},"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"A view token, for browsers (EventSource, <img>) that cannot send headers","in":"query","name":"view_token","schema":{"type":"string"}},{"in":"query","name":"quality","schema":{"maximum":0.95,"minimum":0.3,"type":"number"}}]},"/v1/sessions/{id}/view-tokens":{"parameters":[{"description":"Session id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"A token (15 minutes by default, at most an hour) that lets a browser watch this session without your secret key.","requestBody":{"content":{"application/json":{"schema":{"properties":{"ttl_s":{"maximum":3600,"minimum":60,"type":"integer"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"events_url":{"type":"string"},"expires_at":{"type":"integer"},"live_url":{"type":"string"},"snapshot_url":{"type":"string"},"view_token":{"type":"string"}},"type":"object"}}},"description":"Token"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Create a view token","tags":["Watch"]}},"/v1/status":{"get":{"description":"Public service status, as on /status: overall state (`operational`, `degraded`, `down`), each component's latest check (API, website, world data, hosted runner, and an end-to-end hosted-world check) with 90 daily uptime bars, and the incidents of the last 90 days. No key; cached 15 s.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"components":{"items":{"properties":{"checked_at":{"nullable":true,"type":"integer"},"days":{"items":{"properties":{"checks":{"type":"integer"},"date":{"type":"string"},"status":{"enum":["operational","degraded","down","none"],"type":"string"},"uptime":{"nullable":true,"type":"number"}},"type":"object"},"type":"array"},"id":{"type":"string"},"latency_ms":{"nullable":true,"type":"integer"},"name":{"type":"string"},"status":{"enum":["operational","degraded","down","unknown"],"type":"string"},"uptime_90d":{"nullable":true,"type":"number"}},"type":"object"},"type":"array"},"incidents":{"items":{"properties":{"cause":{"nullable":true,"type":"string"},"component":{"nullable":true,"type":"string"},"id":{"type":"integer"},"impact":{"enum":["degraded","down"],"type":"string"},"resolved_at":{"nullable":true,"type":"integer"},"started_at":{"type":"integer"},"status":{"enum":["investigating","identified","monitoring","resolved"],"type":"string"},"title":{"type":"string"},"updates":{"items":{"properties":{"at":{"type":"integer"},"message":{"type":"string"},"status":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"status":{"enum":["operational","degraded","down"],"type":"string"},"summary":{"type":"string"},"updated_at":{"description":"Unix seconds","type":"integer"}},"required":["status","summary","updated_at","components","incidents"],"type":"object"}}},"description":"Status"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Status","tags":["Service"]}},"/v1/tools":{"get":{"description":"Every world method as an LLM tool: `?format=anthropic` (default), `openai` or `mcp`.","responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"Tools"}},"security":[],"summary":"Tool definitions","tags":["Agents"]}},"/v1/uploads":{"post":{"description":"An asset (up to 256 MiB) or a bundle (up to 2 GiB) too large for one request (over 64 MiB): send it in parts, then complete it. Unfinished uploads are removed after a day.","requestBody":{"content":{"application/json":{"schema":{"properties":{"bytes":{"description":"The file's size","type":"integer"},"kind":{"enum":["asset","bundle"],"type":"string"},"name":{"type":"string"},"type":{"description":"Assets: the asset type","enum":["model","vehicle","texture","script","geo","heightmap"],"type":"string"}},"required":["kind","name","bytes"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"bytes":{"type":"integer"},"id":{"type":"string"},"kind":{"enum":["asset","bundle"],"type":"string"},"missing":{"items":{"type":"integer"},"type":"array"},"part_bytes":{"type":"integer"},"parts":{"type":"integer"},"received":{"items":{"type":"integer"},"type":"array"}},"type":"object"}}},"description":"Started"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"}},"summary":"Start a large upload","tags":["Scenes"]}},"/v1/uploads/{id}":{"delete":{"description":"Drops the parts received so far.","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Deleted"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Abandon an upload","tags":["Scenes"]},"get":{"description":"Which parts arrived and which are missing (resume an interrupted upload).","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bytes":{"type":"integer"},"id":{"type":"string"},"kind":{"enum":["asset","bundle"],"type":"string"},"missing":{"items":{"type":"integer"},"type":"array"},"part_bytes":{"type":"integer"},"parts":{"type":"integer"},"received":{"items":{"type":"integer"},"type":"array"}},"type":"object"}}},"description":"Upload"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Upload progress","tags":["Scenes"]},"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/v1/uploads/{id}/complete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"post":{"description":"Checks and stores the file, as POST /v1/assets (an asset) or POST /v1/scenes/import (a bundle) would.","responses":{"201":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Stored"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Complete an upload","tags":["Scenes"]}},"/v1/uploads/{id}/parts/{n}":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"put":{"description":"Part n (from 0) of the file: `part_bytes` long, except the last. Any order, in parallel; send a failed part again.","parameters":[{"in":"path","name":"n","required":true,"schema":{"minimum":0,"type":"integer"}}],"requestBody":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"bytes":{"type":"integer"},"id":{"type":"string"},"kind":{"enum":["asset","bundle"],"type":"string"},"missing":{"items":{"type":"integer"},"type":"array"},"part_bytes":{"type":"integer"},"parts":{"type":"integer"},"received":{"items":{"type":"integer"},"type":"array"}},"type":"object"}}},"description":"Upload"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Send a part","tags":["Scenes"]}}},"security":[{"secretKey":[]}],"servers":[{"url":"/"}],"tags":[{"name":"Sessions"},{"description":"Methods run in the session's world","name":"World"},{"name":"Watch"},{"name":"Embedding"},{"name":"Agents"},{"name":"Service"}]}