Spatial Compiler

v0.1.9
com.appliedmanifold/spatial-compiler Checked 5 hours ago Published 4 days ago

Your 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.

ParameterTypeDescription
examplestringAn example file, e.g. fireball.pyro.toml
modulestringModule id. pyro and pyrofx are the same fire, smoke, dust and explosion module.
recipestringA 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.

ParameterTypeDescription
filename *string
bytesinteger
content_typestringMIME type of the bytes, for example model/gltf-binary. Optional; inferred from the filename when omitted.
idempotency_keystringCaller-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.
sha256string
textstring

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…

ParameterTypeDescription
spec *string | objectThe spec as TOML text, or the same tree as a JSON object. Fields come from the module schema.
batchobjectRun variations in list, axis and seed order.
idempotency_keystringFor a batch or sweep retry, supply its original key to estimate the stored quote and incremental daily allowance.
inputsarrayRegistered input files, named in the spec by `as`.
max_cost_usdnumberRefuse (COST_LIMIT) if this job would cost more. Batches and sweeps also require the accepted quote ID.
modulestringModule 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…
operationstringcheck is free and answered inline; bake and sweep are async jobs.
price_cursorstringFor a large run, pass sweep.price_cursor or the preceding sweep.next_cursor to read up to 100 row prices.
qualitystringdraft or final. Bakes default to final. Batches and sweeps default to draft.
seedinteger
setarrayOverrides, each section.key=value
spec_namestringFile name <name>.<module>.toml, e.g. campfire.pyro.toml
sweepFor operation sweep: one {key, values}, or a list of axes with different keys.
terrain_shadowsintegergeofx 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.

ParameterTypeDescription
accept_quotestringQuote id (q_...). Required for every batch and sweep, including at the usual price.
batchobjectRun variations in list, axis and seed order.
compare_job_idstringEarlier job to compare with job_id.
detailstringcompact (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…
frameintegerZero-based flipbook frame to isolate.
idempotency_keystringCaller-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…
imagebooleanInclude a framed inspect still when available. False returns numbers only.
include_previewboolean
inputsarrayRegistered input files, named in the spec by `as`.
job_idstringFinished job to inspect.
max_cost_usdnumberRefuse (COST_LIMIT) if this job would cost more. Batches and sweeps also require the accepted quote ID.
max_price_usdnumberMaximum price in US dollars. Every batch and sweep also requires accept_quote.
measure_betweenarrayTwo positioned part paths to measure in metres.
modulestringModule 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…
operationstringCheck a spec or inspect a finished job inline for free. Bake and sweep create jobs.
partstringExact path returned in inspect.parts.
qualitystringdraft or final. Bakes default to final. Batches and sweeps default to draft.
seedinteger
setarrayOverrides, each section.key=value
specstring | objectThe spec as TOML text, or the same tree as a JSON object. Fields come from the module schema.
spec_namestringFile name <name>.<module>.toml, e.g. campfire.pyro.toml
sweepFor operation sweep: one {key, values}, or a list of axes with different keys.
terrain_shadowsintegergeofx horizon sectors. Zero disables terrain shadows.
wait_msintegerMaximum 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.

ParameterTypeDescription
batchstringBatch job_id. When set, list that batch's child jobs instead of recent jobs.
cursorstringOpaque cursor from a previous list's next_cursor. Pass it to read the next page.
detailstringcompact (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_keystringThe idempotency_key of the job to return.
include_previewbooleanInclude a framed inspect still. Default true only for detail=full; compact and lean return the preview path on the download base instead.
job_idstringThe job_id returned by submit.
limitintegerPage size when listing jobs. Defaults to 20. Minimum 1, maximum 100.
spec_namestringWhen listing jobs, keep rows whose spec name matches.
statestring
wait_msintegerMaximum 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.

ParameterTypeDescription
job_id *stringThe job_id returned by submit. This is not an idempotency_key.