# Sandbox

:::tip[Sandbox vs Playground]
**Sandbox** (this page) — TypeScript editor with `AstrowayClient`, for code. Output is `console.log` plus a shareable URL.
**[Playground](/en/playground/)** — a form with an endpoint dropdown, for a quick HTTP request without writing code.
:::

Online editor with syntax highlighting. Code runs in the browser inside a Web Worker and makes real requests to `api.astroway.info/v1/*`. The API key is stored locally (localStorage), never sent anywhere else.

<Sandbox lang="en" client:only="react" />

## How it works

- **Run (⌘+Enter)** — Monaco transpiles TS to JS, the Web Worker runs it, `console.log` and errors show on the right.
- **Share** — the code is compressed with lz-string and written to `location.hash`. Open the URL — the editor restores the code.
- **Presets** — four common scenarios: natal chart, synastry, Human Design, transits.
- **15s timeout** — if the code hangs, the worker is killed.

For non-billable tests use `aw_test_*` keys — they don't consume credits.
