Spatial Compiler
v0.1.9Your agent gets fully simulated, engine-ready 3D in seconds, from one call.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
discover Discover modules, schemas and recipes
Lists hosted modules, operations, status, and prices. Call this before estimate or submit to find a valid module, recipe, or example. With a module, returns that module's schema, examples, input slots, prices, and recipe names. With a module and a recipe or example, returns that preset spec. recipe and example are ignored unless a module is also set.
| Parameter | Type | Description |
|---|---|---|
example | string | An example file, e.g. fireball.pyro.toml |
module | string | Module id. pyro and pyrofx are the same fire, smoke, dust and explosion module. |
recipe | string | A named preset, e.g. fireball |
add_input Register an input file
Registers a file a job will read. Send filename, byte size, and sha256 to get an input_id and an upload_url for a PUT of those exact bytes. A file already stored under the same SHA-256 is ready at once. For small text files, send filename and text.
| Parameter | Type | Description |
|---|---|---|
filename * | string | |
bytes | integer | |
content_type | string | MIME type of the bytes, for example model/gltf-binary. Optional; inferred from the filename when omitted. |
idempotency_key | string | Caller-chosen key. A retry with the same key and the same file returns the original input. A different file with the same key returns IDEMPOTENCY_CONFLICT. |
sha256 | string | |
text | string |
estimate Estimate price and time
Validates a job without running it or charging. Call this before submit to see the price and time. Prefer this over submit with operation check when you only need pricing; use submit check when you need the validation report. Returns the price (price_usd, usual_price_usd, meter, breakdown, knobs), a one-line summary, whether the cache will hit, a quote, and a labeled time estimate. accept_required is true when the price is above the usual one. quote_required is true for batches and sweeps, and the quote id is in the result. A bake also includes the draft and final price of the same spec. A swe…
| Parameter | Type | Description |
|---|---|---|
spec * | string | object | The spec as TOML text, or the same tree as a JSON object. Fields come from the module schema. |
batch | object | Run variations in list, axis and seed order. |
idempotency_key | string | For a batch or sweep retry, supply its original key to estimate the stored quote and incremental daily allowance. |
inputs | array | Registered input files, named in the spec by `as`. |
max_cost_usd | number | Refuse (COST_LIMIT) if this job would cost more. Batches and sweeps also require the accepted quote ID. |
module | string | Module id. pyro and pyrofx are the same fire, smoke, dust and explosion module. meshfx takes one GLB. geofx takes a .geo.toml terrain spec and up to four inputs. Optional when spec_name ends in a modu… |
operation | string | check is free and answered inline; bake and sweep are async jobs. |
price_cursor | string | For a large run, pass sweep.price_cursor or the preceding sweep.next_cursor to read up to 100 row prices. |
quality | string | draft or final. Bakes default to final. Batches and sweeps default to draft. |
seed | integer | |
set | array | Overrides, each section.key=value |
spec_name | string | File name <name>.<module>.toml, e.g. campfire.pyro.toml |
sweep | For operation sweep: one {key, values}, or a list of axes with different keys. | |
terrain_shadows | integer | geofx horizon sectors. Zero disables terrain shadows. |
submit Run an operation
Runs check, inspect, bake, or sweep. check validates a spec and returns the report inline, at no charge. inspect measures or compares a finished job by job_id, at no charge. bake and sweep start an async job, charge for completed work, and return the job, waiting up to wait_ms. Batches and sweeps need accept_quote, including free repeats. When a bake is above the usual price and accept_quote or max_price_usd is missing, returns PRICE_ACCEPT_REQUIRED with the quote, and nothing runs or is charged.
| Parameter | Type | Description |
|---|---|---|
accept_quote | string | Quote id (q_...). Required for every batch and sweep, including at the usual price. |
batch | object | Run variations in list, axis and seed order. |
compare_job_id | string | Earlier job to compare with job_id. |
detail | string | compact (the default, also called files): state, charge and each artifact once, plus one signed download base and a zip URL. lean is the same with less QA. full is the large report and a signed URL pe… |
frame | integer | Zero-based flipbook frame to isolate. |
idempotency_key | string | Caller-chosen key. A retry with the same key and body returns the original job. A different body returns IDEMPOTENCY_CONFLICT. Without a key, an identical bake within 10 minutes of a succeeded job for… |
image | boolean | Include a framed inspect still when available. False returns numbers only. |
include_preview | boolean | |
inputs | array | Registered input files, named in the spec by `as`. |
job_id | string | Finished job to inspect. |
max_cost_usd | number | Refuse (COST_LIMIT) if this job would cost more. Batches and sweeps also require the accepted quote ID. |
max_price_usd | number | Maximum price in US dollars. Every batch and sweep also requires accept_quote. |
measure_between | array | Two positioned part paths to measure in metres. |
module | string | Module id. pyro and pyrofx are the same fire, smoke, dust and explosion module. meshfx takes one GLB. geofx takes a .geo.toml terrain spec and up to four inputs. Optional when spec_name ends in a modu… |
operation | string | Check a spec or inspect a finished job inline for free. Bake and sweep create jobs. |
part | string | Exact path returned in inspect.parts. |
quality | string | draft or final. Bakes default to final. Batches and sweeps default to draft. |
seed | integer | |
set | array | Overrides, each section.key=value |
spec | string | object | The spec as TOML text, or the same tree as a JSON object. Fields come from the module schema. |
spec_name | string | File name <name>.<module>.toml, e.g. campfire.pyro.toml |
sweep | For operation sweep: one {key, values}, or a list of axes with different keys. | |
terrain_shadows | integer | geofx horizon sectors. Zero disables terrain shadows. |
wait_ms | integer | Maximum milliseconds to wait for the job to finish, up to 35 seconds. |
get_job Get a job, or list jobs
Returns a job by job_id or idempotency_key: state, charge, and when succeeded each artifact once (path, bytes, sha256), one signed download base, a zip URL, warnings, compact QA, and preview_url. Waits up to wait_ms. Build a file URL as {download.base}{path}?{download.token}. detail=full returns the large report and a signed URL per file. detail=status returns state and charge only. Without job_id or idempotency_key, returns a page of recent jobs, which can be filtered by spec_name or state.
| Parameter | Type | Description |
|---|---|---|
batch | string | Batch job_id. When set, list that batch's child jobs instead of recent jobs. |
cursor | string | Opaque cursor from a previous list's next_cursor. Pass it to read the next page. |
detail | string | compact (the default, also called files): state, charge and each artifact once, plus one signed download base and a zip URL. lean is the same with less QA. full is the large report and a signed URL pe… |
idempotency_key | string | The idempotency_key of the job to return. |
include_preview | boolean | Include a framed inspect still. Default true only for detail=full; compact and lean return the preview path on the download base instead. |
job_id | string | The job_id returned by submit. |
limit | integer | Page size when listing jobs. Defaults to 20. Minimum 1, maximum 100. |
spec_name | string | When listing jobs, keep rows whose spec name matches. |
state | string | |
wait_ms | integer | Maximum milliseconds to wait for the job to finish, up to 35 seconds. |
cancel_job Cancel a job
Cancels a queued job, or stops the remaining parts of a sweep that spans several sheets. Returns the updated job. Do not use this to check status or to download results; call get_job for that. A bake that has already been dispatched cannot be cancelled.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | The job_id returned by submit. This is not an idempotency_key. |