Skip to content

Guides

Quote a sandbox

Send the body you would create with and get back what that create would do, without starting anything: the providers it would try, in order, what each one serves and what it costs per hour.

Ask for a quote

POST /v1/quote takes the body of POST /v1/sandboxes (all of it but from_snapshot and count), plus duration in seconds for a cost estimate. Create and quote route through the same function, so the first candidate is the provider create picks and its total is the rate it bills. Without a key you get public prices on credits; with one, the quote counts your own provider keys, routing defaults, key policy and balance.

Read the answer

200
{
  "view": "account",
  "candidates": [
    {
      "provider": "instabox",
      "sandbox": "instabox/standard",
      "billing": "credits",
      "size": { "name": "standard", "cpu": 11, "memory_gb": 70 },
      "gpu": { "type": "A100", "count": 1, "vram_gb": 40 },
      "price_per_hour": { "compute": 0.2015, "gpu": 2.09, "devices": 0, "total": 2.2915 },
      "billed_per": { "increment_s": 1, "minimum_s": 0, "boot": true },
      "estimate": { "duration_s": 3600, "cost": 2.2915 },
      "unmetered_charges": [],
      "cold_start_p50_ms": 2140
    }
  ],
  "skipped": [
    {
      "provider": "koyeb",
      "reason": "does not offer A100",
      "message": "Koyeb rents A100 only through provider_options on your own key",
      "unlock": "own_key"
    }
  ]
}

size is what the provider really serves: some round a size up, and some GPUs come with their own vCPUs and memory, which replace the size. price_per_hour.total is compute + gpu + devices. billed_per says how the provider counts time, and credits are billed the same way: each run is billed at least minimum_s, then rounded up to whole increment_s; boot is true when billing starts at the provider's create, boot included. On your own key the provider bills you. unmetered_charges lists what the price leaves out, such as egress.

Providers left out

skipped carries the same reasons a create gives, as a code and a sentence. unlock says what would make the provider usable for you; it is null when the provider cannot run the request at all.

own_key
Runs only on your own provider key, or rents what you asked for only through provider_options on it.
enablement
The provider has not turned the capability on for our account yet.
credits_paused
Our account at the provider is paused; your own key still runs it.
unhealthy
Its recent creates failed or its status page reports an outage.
balance
Your balance cannot cover the first 10 minutes it holds.
key_policy
Your key's policy leaves it out.

The sandboxes page prices its results with the same quote and lists these providers apart, under "Not available to you".

Your own limits

With a key, the quote also applies your account, workspace and key limits. limits lists each one that applies: refuses is true when a create with the same body would fail, with the error code it would get; otherwise the limit shortens the sandbox. Each has a message and how to lift it. Every candidate says its lifetime_s: the timeout asked, shortened by your key's lifetime rules.

Many bodies at once

POST /v1/quote/batch quotes up to 400 bodies in one call, as a filter sidebar needs: bodies maps your own keys to one to eight bodies each, and routes answers, per key, every provider any of its bodies routes to, once, at its cheapest total per hour.

POST /v1/quote/batch
{ "bodies": { "a100": [{ "gpu": { "type": "A100" } }], "eu": [{ "provider": { "region": "eu" } }] } }

SDKs, CLI and MCP

sp.quote() in both SDKs, sp quote with the options of sp new and --duration, and the MCP tool quote_sandbox with the arguments of create_sandbox. Agents should quote a GPU, a large size, mobile devices or a long timeout before creating it, and tell the person the price.