01 · Tools
Capability · Math agent
Math and data analysis, computed, not guessed.
A chat endpoint that writes and runs Python, R or SQL in a region-pinned, network-isolated sandbox to compute and verify — then returns charts as inspectable SVG and diagrams as Mermaid, never opaque raster images.
POST /v1/math/chat/completions
What you get
Built for regulated workloads
Point any OpenAI SDK at /v1/math/chat/completions and ask in plain language. It is the chat endpoint with two differences: a system prompt tuned for careful, step-by-step math and data analysis, and a code sandbox switched on by default — so the model writes and runs Python, R or SQL to compute and verify instead of guessing, then hands back the answer with charts as inspectable SVG and diagrams as Mermaid. Set X-Region per request; the sandbox runs in your jurisdiction.
02 · Verify
Compute, don’t hallucinate
03 · Charts
Figures as inspectable SVG
04 · Diagrams
Diagrams as Mermaid
05 · Residency
Region-pinned & ephemeral
06 · PHI
General traffic only
Availability & pricing
Where it runs, what it costs
Every route is pinned to a region, PHI stays on resident hosts, and the PHI gate is enforced per call. Prices mirror the live /v1/pricing rate card.
| Region | Provider | Model | Tier | Price |
|---|---|---|---|---|
| CH | Infomaniak | qwen3.5 (397B) | General | $1.64 / $7.36 |
| EU | Scaleway | qwen3.5 (397B) | General | $1.15 / $6.90 |
| UK | gemini-3-1-flash-lite | General | $0.42 / $2.50 | |
| US | Together | deepseek-v4-flash | General | $0.23 / $0.47 |
| US | Together | glm-5.2 | General | $2.33 / $7.33 |
| Other | — | reasoning only (no sandbox) | No route | — |
Billed as ordinary chat tokens (per 1M in / out) — you pay for the model that answers; the sandbox is included. Code execution is general-traffic only (X-PHI:true → phi_blocked) and runs only where a compliant in-region sandbox exists — Switzerland, the EU, the UK and the US. Pin any code-capable model, or let the region default decide. Full rate card at /pricing.
Try it
A real call, end to end
Ask in plain language; the agent writes and runs the code in your region, then hands back the result with an inspectable figure.
Sandbox & residency
- Code runs in an ephemeral, network-isolated container pinned to your region — one sandbox per request, torn down when the answer is returned.
- CH, EU and UK execute in the EU compliance boundary; US executes in the US (FedRAMP) boundary. The sandbox never runs out-of-region.
- Regions with no compliant sandbox (everywhere outside CH/EU/UK/US) degrade to plain step-by-step reasoning — the call still answers, it just does not run code.
- General traffic only: X-PHI:true returns phi_blocked until the sandbox BAA lands. No code, input or output is persisted by the proxy.
Good to know
- · Same OpenAI chat shape as /v1/chat/completions — only the math-tuned default system prompt and on-by-default code execution differ. Disable per request with code_execution:false.
- · Streaming is disabled on this route (the loop must inspect tool calls), so the response is buffered.
- · Python keeps variables and SQL keeps its DuckDB tables across tool calls within a request; each R call is a fresh process, so keep R snippets self-contained.
curl https://cloudsitus.com/api/v1/math/chat/completions \
-H "Authorization: Bearer $PHI_API_KEY" \
-H "X-Region: EU" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.5",
"messages": [
{"role": "user", "content": "Fit a linear model to this data and plot it with ggplot2."}
]
}'x-phi-routed: scaleway-qwen3-5-397b/EU/general
x-phi-tier: non_phi
x-phi-sandbox-figures: 1
# the answer embeds a ```svg figure (Figure 1)Is the math agent a different model?
What can the sandbox run?
How do charts and diagrams come back?
Can I run code on PHI?
What happens in a region without a sandbox?
Ready when you are
Put math agent in production — without giving up your data.
Spin up a key in minutes. The residency and PHI posture above arrives unchanged.
Prepaid credits from $10 · No subscription · No data retained