> For the list of every page, fetch /llms.txt. The API contract is the OpenAPI file linked from the API reference.

# Show where a create would go

POST https%3A%2F%2Fapi.usemeadow.ai/v1/sandboxes/route
Content-Type: application/json

Takes the body of `POST /v1/sandboxes` and returns the vendors a create with
that body would try, in order, and why, without creating or reserving
anything. No vendor is called. Two answers can differ if a vendor's health
changes between this call and the create.

`candidates` lists the vendors the create would try, in the order it would try
them. A vendor the circuit breaker moved to the end has `skipped: true` and the
reason, as `skipped_providers` would show on the sandbox. `excluded` lists the
vendors of the route that a create would not try at all: no usable stored key
(`no_provider_key`), or the vendor cannot meet the request (`unsupported`, with
`detail`).

A body the create would refuse with 400, 403 or 404 gets the same answer here.
`cost_per_hour` is the list price of the size asked for, before the vendor
rounds it; on Daytona it is unknown unless `resources.disk_mb` is set, because
the price includes the disk.


Reference: https://docs.usemeadow.ai/api-endpoints/sandboxes/route-sandbox

## Authentication

- `Authorization` header (bearer token, required) — A Meadow API key, sent as `Authorization: Bearer mdw_...`. The header `x-api-key: mdw_...` is accepted in its place.

## Request

### Body (application/json)

This endpoint expects a SandboxCreate.

- `name` (string, optional) — A label for people. It need not be unique. Must not be empty when sent.
- `image` (string, optional) — A registry image both providers can pull, with its tag. On Modal the image's default command must keep running. If it exits, the sandbox becomes `failed` with `provider_lost`.
- `image_id` (string, optional) — An image built with `POST /v1/images`. Providers where its build is `ready` start at once. A provider with no build yet builds it first, which counts toward `create_timeout_seconds`. A provider whose build `failed` is skipped. Daytona fixes resources on a snapshot. Meadow keeps one Daytona snapshot per image and size (`cpu`, `memory_mb`, `disk_mb`, GPU count and type). The first sandbox that asks for a new size makes the snapshot from the image's own build, which counts toward `create_timeout_seconds`, and the served attempt's `detail` says `provider built a copy of the image for this size`. Later sandboxes of that size start at once. A size Daytona cannot serve skips Daytona with an `unsupported` attempt that carries Daytona's reason.
- `registry_auth` (SandboxCreateRegistryAuth, optional) — Login for a private `image`. Both fields are required when it is sent. Cannot be combined with `image_id`. Daytona does not support it and is skipped.
- `resources` (Resources, optional) — The size of the sandbox. Unknown fields return 400.
- `env` (map from string to string, optional) — Environment variables for every command in the sandbox. Keys must not be empty. Values are never returned by the API.
- `timeout_seconds` (integer, optional, default: 3600) — Longest lifetime, in seconds, from 1 to 86400 (24 hours). The sandbox is terminated when it passes. Meadow enforces this itself. Where the provider has its own lifetime setting, Meadow sets that too, so the sandbox still ends if Meadow is down. A value above 86400 returns 400. A value below 10 skips Modal. The default is one hour, so a long job must send this field. Nothing else in Meadow ends a running sandbox earlier, apart from `idle_timeout_seconds` when you send it, and a spent dollar `limit` on a key with `limit_action` `stop_sandboxes`. A vendor whose own lifetime limit for your account is lower than `timeout_seconds` is skipped with an `unsupported` attempt that says so (checked on Daytona, which reports the time it will end a sandbox).
- `idle_timeout_seconds` (integer, optional) — Terminate after this many seconds with no API call for the sandbox and no background command running. At least 1. Left out, the sandbox never ends for being idle. A foreground or streamed `exec` call, a file upload, and a file download count as activity for as long as they are open.
- `ports` (list of integer, optional) — Ports inside the sandbox to make reachable from outside. They must be listed here: a port cannot be opened after create. Get the address with `GET /v1/sandboxes/{sandbox_id}/ports/{port}`.
- `ssh` (boolean, optional, default: false) — Make the sandbox reachable over SSH. It must be set here: SSH cannot be turned on after create. Get the address and key with `POST /v1/sandboxes/{sandbox_id}/ssh`.
- `network` (SandboxCreateNetwork, optional) — Outbound network rules. Left out, outbound traffic is open. `block_all` cannot be combined with the allow lists. On Modal `block_all` also blocks inbound connections, so Modal is skipped for `block_all` with `ports` or `ssh: true`. Daytona cannot combine `allow_domains` with `allow_cidrs`, takes at most 10 `allow_cidrs` entries and 100 `allow_domains` entries, and takes IPv4 ranges only. It is skipped for a request outside those limits. The rules can be replaced later with `PATCH /v1/sandboxes/{sandbox_id}`. On Modal that works only for a sandbox created with `allow_domains` or `allow_cidrs`: see that operation.
- `provider` (SandboxRouting, optional) — Which sandbox providers may host a sandbox, and in what order. Send it as `provider` on `POST /v1/sandboxes`, or store it on a project as `routing.sandboxes`. A field set on the request replaces the same field from the project. A provider that cannot meet the request (GPU type, lifetime, network rule, private registry) is skipped and recorded in `attempts` as `unsupported`.
- `labels` (map from string to string, optional) — Your own key and value pairs, returned with the sandbox and usable as a filter on `GET /v1/sandboxes`. Keys must not be empty.
- `webhook_url` (string, optional) — Where to send this sandbox's status events. Must be `https` and resolve to a public address. Left out, the project's `webhook_url` is used.

## Response

### 200

The route a create with this body would take now.

- `object` (enum, required)
  - Allowed values: `sandbox_route`
- `route_source` (enum, required) — Where the order came from, as in the `sandbox_route_decided` log line. `request_sort` and `project_sort` mean `sort` on the request or on the project ordered it.
  - Allowed values: `request_order`, `request_only`, `project_default`, `request_sort`, `project_sort`, `automatic`
- `order_configured` (boolean, required) — True when the order came from `provider.order` or the project's `routing.sandboxes.order`. Such a route is tried as written unless its first vendor is open on a hard signal.
- `allow_fallbacks` (boolean, required)
- `candidates` (list of SandboxRouteCandidate, required) — The vendors a create would try, in that order.
- `excluded` (list of SandboxRouteExclusion, required) — Vendors of the route that a create would not try.
- `sort` (enum, optional) — The `sort` that ordered the route. Left out when no sort applied, which includes a sort sent with an order: the order wins.
  - Allowed values: `price`, `latency`

## Errors

### 400 Bad Request Error

The body breaks a rule of `POST /v1/sandboxes`. The message names the field.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 401 Unauthorized Error

The key is missing, malformed, unknown, revoked, or expired, or a key it was minted from no longer exists. Check the key and the header.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 403 Forbidden Error

The key lacks the `sandboxes` scope, or the project is locked and the body sent routing fields in `provider`.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 404 Not Found Error

The `image_id` does not exist in this project.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 413 Content Too Large Error

The request body is larger than this route allows: 1 MiB for JSON bodies, 16 MiB on the model routes, 100 MiB for a file upload, and 100 MB for a build context.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 422 Unprocessable Entity Error

No vendor of the route has a usable stored key (`no_provider_key`), as on `POST /v1/sandboxes`.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

### 429 Too Many Requests Error

More than 20 failed authentications came from your address in one minute, and this request also failed to authenticate: fix the key, wait for `retry-after` seconds, then retry. Or the server instance was full and no slot came free for the account within 3 seconds (`error.code` `account_in_flight_limit_exceeded`): wait for `retry-after` seconds, then retry.

- `error` (ErrorError, required)
- `request_id` (string, optional) — The same id as the `x-request-id` response header. Quote it when you report a problem.

## Types

### SandboxCreateRegistryAuth

Login for a private `image`. Both fields are required when it is sent. Cannot be combined with `image_id`. Daytona does not support it and is skipped.

- `username` (string, optional) — The registry user name.
- `password` (string, optional) — The registry password or token. Never returned.

### Resources

The size of the sandbox. Unknown fields return 400.

- `cpu` (double, optional, default: 2) — The most CPU the sandbox can use. Must be above 0. The unit differs by vendor and Meadow does not convert it: Daytona counts virtual CPUs and rounds up to a whole number. Modal counts physical cores, which it documents as two virtual CPUs each, and takes fractions. Modal also reserves this amount. Size `cpu` for the vendor that will serve. With `provider.options.modal.burst: true` it is only a floor on Modal.
- `memory_mb` (integer, optional, default: 4096) — The most memory the sandbox can use, in MB, at least 1. Daytona rounds up to a whole GiB. A command that passes the limit is killed on Daytona. On Modal the whole sandbox ends and reads `failed` with `provider_lost`. With `provider.options.modal.burst: true` it is only a floor on Modal.
- `disk_mb` (integer, optional) — Disk in MB, at least 1. Daytona rounds up to a whole GiB and gives 3 GiB when this is left out. Modal has no disk setting: every sandbox gets 512 GiB, and a request above that skips Modal with an `unsupported` attempt.
- `gpu` (ResourcesGpu, optional) — Ask for GPUs. Left out, the sandbox has none.

### SandboxCreateNetwork

Outbound network rules. Left out, outbound traffic is open. `block_all` cannot be combined with the allow lists. On Modal `block_all` also blocks inbound connections, so Modal is skipped for `block_all` with `ports` or `ssh: true`. Daytona cannot combine `allow_domains` with `allow_cidrs`, takes at most 10 `allow_cidrs` entries and 100 `allow_domains` entries, and takes IPv4 ranges only. It is skipped for a request outside those limits. The rules can be replaced later with `PATCH /v1/sandboxes/{sandbox_id}`. On Modal that works only for a sandbox created with `allow_domains` or `allow_cidrs`: see that operation.

- `block_all` (boolean, optional, default: false) — Block all outbound traffic.
- `allow_domains` (list of string, optional) — Allow outbound traffic only to these host names. Each may start with one wildcard label, such as `*.example.com`. IP addresses, ports, schemes, paths and wildcards elsewhere return 400. Use `allow_cidrs` for addresses. Meadow sends each entry to the vendor as written, and the vendor applies it. On Daytona and on Modal, `*.example.com` covers every subdomain and also `example.com` itself, and a plain name does not cover its subdomains. What an allowed name opens differs by vendor. On Daytona it opens the name on ports 80, 443 and 22 (other ports not checked). On Modal it opens TLS on port 443 only, and plain HTTP on port 80 is refused. An `https://` URL that redirects to `http://` therefore works on Daytona and fails on Modal. Seen on both vendors on 2026-11-27.
- `allow_cidrs` (list of string, optional) — Allow outbound traffic only to these CIDR ranges, such as `203.0.113.0/24`.

### SandboxRouting

Which sandbox providers may host a sandbox, and in what order. Send it as `provider` on `POST /v1/sandboxes`, or store it on a project as `routing.sandboxes`. A field set on the request replaces the same field from the project. A provider that cannot meet the request (GPU type, lifetime, network rule, private registry) is skipped and recorded in `attempts` as `unsupported`.

- `order` (list of enum, optional) — Providers to try, in this order. Default is the project's order, else `daytona` then `modal`.
  - Allowed values: `daytona`, `modal`
- `only` (list of enum, optional) — Use only these providers.
  - Allowed values: `daytona`, `modal`
- `allow_fallbacks` (boolean, optional, default: true) — When false, only the first provider is tried.
- `sort` (enum, optional) — Order the providers by a measure instead of by `order`. The values are OpenRouter's (https://openrouter.ai/docs/guides/routing/provider-selection.md). - `price`: lowest hourly list price of the size asked for first, from the price table `GET /v1/pricing` returns. A provider whose price is unknown goes last. - `latency`: shortest median create time first, over this account's last 20 creates each provider served in the past 24 hours, as October does. A provider with none goes last. A tie is broken by price. - `throughput`, OpenRouter's third value, has no meaning for a sandbox and returns 400. An `order` wins over `sort`: on the request, and on the project when the request sends neither. A request `sort` wins over the project's `order`. A sorted route is not a configured order: an open circuit breaker moves a provider to the end as it does on the automatic route.
  - Allowed values: `price`, `latency`
- `create_timeout_seconds` (integer, optional, default: 300) — How long to wait on one provider before trying the next, in seconds. The vendor sandbox is created with a lifetime that covers this wait, so a value above 3600 returns 400. A build of `image_id` that has to run first counts toward it. When neither the request nor the project sets it, the last provider in the route gets 300 seconds and each earlier one gets 120 seconds from the moment Meadow asks the vendor, so a slow provider is left sooner. That shorter wait is used only when a later provider can take over: it accepts this request and is not marked `open` in `sandbox_health`. It is not used for a GPU sandbox. Set this field to wait the same time on every provider.
- `options` (map from string to map from string to any, optional) — Vendor-specific settings, keyed by provider, for example `{"daytona": {"spot": true}}`. This is the only place vendor-specific settings appear. A provider's entry is ignored when another provider serves the request. On a request, the options for a provider replace the project's options for that provider. Meadow accepts a fixed set of keys for each provider and checks their types: * `daytona`: `spot`, `public`, `ephemeral`, `kvm` (booleans), `target`, `user` (strings), `language` (`python`, `javascript`, or `typescript`). * `modal`: `cloud` (string), `regions` (array of strings), `runtime` (`gvisor` or `vm`), `burst` (boolean). With `burst` true, `resources.cpu` and `resources.memory_mb` are only reserved and the sandbox may use more, as Modal's own default does. Left out or false, they are hard limits. Any other key returns 400, whichever provider would have served the request. The same check runs when a project is created or patched with `routing.sandboxes.options`, and that 400 names the project field. A setting that Meadow controls itself, such as the name, image, timeouts, or network rules, cannot be set here.

### SandboxRouteCandidate

- `provider` (enum, required)
  - Allowed values: `daytona`, `modal`
- `skipped` (boolean, required) — True when the circuit breaker moved this vendor to the end. It is still tried if every vendor before it fails.
- `probe` (boolean, required) — True when the breaker's cooldown has ended and this create would be the one that tries the vendor again in its usual place.
- `create_timeout_seconds` (integer, required) — How long the create would wait on this vendor before it tries the next one.
- `cost_status` (string, required) — `price_table`, `price_estimated` or `price_unknown`, as on the sandbox `cost` object.
- `health` (SandboxProviderHealth, required) — What Meadow remembers about recent sandbox creates on this provider with this account's key. Present for `daytona` and `modal` only. It is a circuit breaker. `closed`: the provider is tried in its usual place. `open`: it failed lately, so a create with another provider in its route tries the other one first, until `retry_at`. `half_open`: one create is trying it again, and that create's result closes it or opens it again. A provider opens after 3 failed creates in a row within 10 minutes (timeout or vendor error), for 60 seconds, or after one quota, capacity or rate limit answer, for 30 seconds. A rejected key (401 or 403) does not count. An order the caller or the project set moves an open provider only on a hard signal: a quota or capacity answer, or the 3 failures in a row. A route with one provider is never reordered. Storing the key again clears it.
- `reason` (string, optional, nullable) — With `skipped`: the reason code that opened the breaker, as in `skipped_providers[].reason`. Null otherwise.
- `cost_per_hour` (double, optional, nullable) — The list price of the size asked for at this vendor. Null when the price table has none.
- `cost_reason` (string, optional, nullable) — Why the price is an estimate or unknown. `default_disk_assumed`: the request has no `disk_mb`, so the Daytona price uses the disk Daytona grants most often when none is asked for. Null with `price_table`.
- `median_create_ms` (integer, optional) — With `sort` `latency`: the median time from Meadow's create call to running over this account's last 20 creates this vendor served in the past 24 hours. Left out when there were none, and with any other sort.

### SandboxRouteExclusion

- `provider` (enum, required)
  - Allowed values: `daytona`, `modal`
- `reason` (string, required) — `no_provider_key` or `unsupported`, as in `attempts[].reason`.
- `detail` (string, optional, nullable) — What the vendor cannot meet

### ErrorError

- `type` (enum, required) — The class of the failure. - `invalid_request`: the request is malformed or breaks a rule (400), or is too large (413). - `conflict`: the request is valid and the current state refuses it (409). Before 2026-11-24 a 409 used `invalid_request`. - `unauthorized`: the key is missing, unknown, revoked, or expired (401). - `forbidden`: the key's scope or limit does not allow this, or the project's routing is locked (403). - `not_found`: no such resource or route (404). - `no_provider_key`: no stored credential can serve this request (422). - `all_providers_failed`: every vendor in the route was tried (502). - `provider_error`: a vendor failed and no fallback was possible (502). - `rate_limited`: too many requests (429). - `insufficient_quota`: a dollar `limit` on the key, or on a key above it, is spent (402). The name is OpenAI's. - `unavailable`: a dependency Meadow needs is not set up (503). - `internal`: Meadow failed (500), or the feature is not set up (501).
  - Allowed values: `invalid_request`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `no_provider_key`, `all_providers_failed`, `provider_error`, `rate_limited`, `insufficient_quota`, `unavailable`, `internal`
- `message` (string, required) — A sentence for people. It can change, so do not match on it.
- `code` (string, optional) — A stable name for the specific failure. Every Meadow error carries one. `type` stays the general class, and several codes share a type. Branch on `code` when you need to tell two failures of one type apart, for example `api_key_expired` from `api_key_revoked`. The full list is in the Errors guide. A new code can be added at any time, so treat a code you do not know as its `type`. A spent limit (`key_request_limit_exceeded`, `key_token_limit_exceeded`) stays a 403 and not a 429, so a client that retries a 429 does not resend a call a spent key can never make. A spent dollar `limit` (`key_spend_limit_exceeded`) is a 402 for the same reason.
- `param` (string, optional) — The request field, query parameter or header the error is about, when there is one. A nested field is written with dots, such as `credentials.api_key`. Set on most validation errors (400).
- `attempts` (list of Attempt, optional) — The vendors Meadow tried for this request, in order. Present only when it tried at least one.
- `retry` (enum, optional) — Whether to send the same request again. Set on routes under `/v1/sandboxes` only. The values are BoxRouter's (https://boxrouter.ai/docs/error-codes). - `safe`: send the same request again, after `retry-after` seconds when the response has that header. A 429, a 409 `exec_start_in_progress` or `idempotency_request_in_progress`, a 502 `sandbox_unreachable`, and a 5xx on a `GET`, `PUT` or `DELETE`, on `POST /v1/sandboxes/route`, or on a sandbox create or background command start sent with `Idempotency-Key`. - `after_fix`: change the request, the key or the account first. Any other 4xx. - `check_outcome`: read the sandbox or the command before you send it again, because the work may have happened. A 5xx on any other `POST`, which includes a blocking command. - `never`: do not send it again. A 501. When the response has `x-should-retry`, `retry` is `safe` exactly when the header is `true`.
  - Allowed values: `safe`, `after_fix`, `check_outcome`, `never`
- `outcome` (enum, optional) — What happened to the work. Set on routes under `/v1/sandboxes` only. The values are BoxRouter's (https://boxrouter.ai/docs/error-codes). - `not_started`: nothing was changed. Every 4xx, a 501, and a 502 `sandbox_unreachable`. - `unknown`: the work may have happened. Any other 5xx. - `completed` and `partial`: the work happened, in whole or in part. Meadow does not send them today. Handle them as `unknown`. A sandbox create that fails after Meadow accepted it is not an error response: the create returns 202, and the sandbox later has `status` `failed` and a `failure_reason`.
  - Allowed values: `not_started`, `completed`, `partial`, `unknown`

### ResourcesGpu

Ask for GPUs. Left out, the sandbox has none.

- `type` (list of string, optional) — GPU models in order of preference. Required and not empty when `gpu` is sent. A provider that offers none of them is skipped with an `unsupported` attempt. Names are matched without case, and `_` or a space counts as `-`. A name no provider offers returns 400. - Daytona offers `H100`, `H200`, `B200`, `B300`, `L40S`, `RTX-PRO-6000`, `RTX-4090`, `RTX-5090` and `MI355X`. It takes the first name with free capacity. - Modal offers `T4`, `L4`, `A10`, `A100`, `A100-40GB`, `A100-80GB`, `L40S`, `RTX-PRO-6000`, `H100`, `H200`, `B200`, `B200+` and `B300`. It takes the first name it offers and does not try the next one when that type has no capacity. A name may end in `!`, which means exactly this type, such as `H100!`. Modal may place a plain `H100` on an H200 and a plain `A100` on an 80 GB A100. With `!` it does not: `H100!` is sent to Modal as written and `A100!` is sent as `A100-40GB`. For every other type the mark changes nothing, because the vendors already place exactly that type. Daytona has no such mark and gets the name without it. `B200+` means a B200 or a B300: Modal chooses, and Daytona takes whichever of the two has free capacity, B200 first. The sandbox returns the names as you wrote them. When the vendor placed a different type than the first one asked for, the served attempt's `detail` says so.
- `count` (integer, optional, default: 1) — How many GPUs, at least 1.

### SandboxProviderHealth

What Meadow remembers about recent sandbox creates on this provider with this account's key. Present for `daytona` and `modal` only. It is a circuit breaker. `closed`: the provider is tried in its usual place. `open`: it failed lately, so a create with another provider in its route tries the other one first, until `retry_at`. `half_open`: one create is trying it again, and that create's result closes it or opens it again. A provider opens after 3 failed creates in a row within 10 minutes (timeout or vendor error), for 60 seconds, or after one quota, capacity or rate limit answer, for 30 seconds. A rejected key (401 or 403) does not count. An order the caller or the project set moves an open provider only on a hard signal: a quota or capacity answer, or the 3 failures in a row. A route with one provider is never reordered. Storing the key again clears it.

- `state` (enum, required)
  - Allowed values: `closed`, `open`, `half_open`
- `consecutive_failures` (integer, required) — Failed creates in the current run of failures.
- `last_failure_reason` (string, optional, nullable) — The reason code of the last counted failure, as in `attempts[].reason`.
- `last_failure_at` (datetime, optional, nullable)
- `opened_at` (datetime, optional, nullable) — When the provider last went from `closed` to `open`.
- `retry_at` (datetime, optional, nullable) — While `open`: when the next create may try the provider again.
- `last_success_at` (datetime, optional, nullable) — The last create that ended a run of failures.

### Attempt

One try at one vendor, for a model call or a sandbox create.

- `provider` (enum, required) — The name of a vendor. Model providers and sandbox providers share one list. Model providers: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`. Sandbox providers: `daytona`, `modal`.
  - Allowed values: `anthropic`, `openai`, `google`, `xai`, `azure`, `bedrock`, `vertex`, `openrouter`, `fireworks`, `deepseek`, `daytona`, `modal`
- `outcome` (enum, required) — How the try ended. - `served`: this vendor served the request. - `unsupported`: the vendor cannot do what was asked, such as a resource size, a network rule, or a model it does not offer. - `refused`: the vendor rejected the request or the stored credential. - `no_capacity`: the vendor had no capacity. - `timeout`: the vendor did not answer in time. - `rate_limited`: the vendor answered 429. - `error`: any other failure.
  - Allowed values: `served`, `unsupported`, `refused`, `no_capacity`, `timeout`, `rate_limited`, `error`
- `reason` (enum, optional) — A stable code for why the try ended as it did. It is narrower than `outcome`, and it is the code to branch on or to count. More values can be added: treat one you do not know like `vendor_error`. - `served`: this vendor served the request. - `no_capacity`: the vendor had no capacity. - `quota_exceeded`: the vendor account is out of quota or credit. - `rate_limited`: the vendor answered 429. - `timeout`: the vendor did not answer in time. - `auth_failed`: the vendor rejected the stored vendor key. - `invalid_request`: the vendor rejected the request itself. - `refused`: the vendor refused for another reason. - `unsupported`: the vendor cannot do what was asked, such as a model, a GPU type, a size or a network rule. - `no_provider_key`: skipped, because no usable vendor key was stored. - `image_pull_failed`, `build_failed`: the vendor could not pull or build the image (sandboxes). - `provider_lost`: the vendor lost the sandbox while it was starting. - `vendor_error`: any other failure.
  - Allowed values: `served`, `no_capacity`, `quota_exceeded`, `rate_limited`, `timeout`, `auth_failed`, `invalid_request`, `refused`, `unsupported`, `no_provider_key`, `image_pull_failed`, `build_failed`, `provider_lost`, `vendor_error`
- `started_at` (datetime, optional) — When Meadow started this try. Absent on attempts recorded before 2026-11-24.
- `finished_at` (datetime, optional) — When this try ended.
- `detail` (string, optional) — A short description of what happened, written by Meadow, such as `provider returned HTTP 404`. On a `served` sandbox attempt it reports resources the vendor granted that differ from the request, such as `provider granted cpu 2 instead of 1.5` or `gpu type H200 instead of H100`. It says `provider built a copy of the image for this size` when this create made a new Daytona snapshot for an `image_id`. On an `unsupported` attempt it carries the vendor's size limit, such as `daytona cannot serve this size: CPU request 8 exceeds maximum allowed per sandbox (4)`. Absent when there is nothing to say.
- `duration_ms` (integer, optional) — How long the try took, in milliseconds.

## Examples

### Daytona answered quota exceeded a moment ago (written by hand, not captured live)

**Response**

```json
{
  "object": "sandbox_route",
  "route_source": "request_order",
  "order_configured": true,
  "allow_fallbacks": true,
  "candidates": [
    {
      "provider": "modal",
      "skipped": false,
      "probe": false,
      "create_timeout_seconds": 300,
      "cost_status": "price_table",
      "health": {
        "state": "closed",
        "consecutive_failures": 0,
        "last_failure_reason": null,
        "last_failure_at": null,
        "opened_at": null,
        "retry_at": null,
        "last_success_at": null
      },
      "reason": null,
      "cost_per_hour": 0.166,
      "cost_reason": null
    },
    {
      "provider": "daytona",
      "skipped": true,
      "probe": false,
      "create_timeout_seconds": 300,
      "cost_status": "price_table",
      "health": {
        "state": "open",
        "consecutive_failures": 1,
        "last_failure_reason": "quota_exceeded",
        "last_failure_at": "2026-11-28T01:10:00Z",
        "opened_at": "2026-11-28T01:10:00Z",
        "retry_at": "2026-11-28T01:10:30Z",
        "last_success_at": null
      },
      "reason": "quota_exceeded",
      "cost_per_hour": 0.0669,
      "cost_reason": null
    }
  ],
  "excluded": []
}
```

**SDK Code**

```python Daytona answered quota exceeded a moment ago (written by hand, not captured live)
import requests

url = "https://api.example.com/v1/sandboxes/route"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Daytona answered quota exceeded a moment ago (written by hand, not captured live)
const url = 'https://api.example.com/v1/sandboxes/route';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Daytona answered quota exceeded a moment ago (written by hand, not captured live)
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v1/sandboxes/route"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Daytona answered quota exceeded a moment ago (written by hand, not captured live)
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/sandboxes/route")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Daytona answered quota exceeded a moment ago (written by hand, not captured live)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.example.com/v1/sandboxes/route")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Daytona answered quota exceeded a moment ago (written by hand, not captured live)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/v1/sandboxes/route', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Daytona answered quota exceeded a moment ago (written by hand, not captured live)
using RestSharp;

var client = new RestClient("https://api.example.com/v1/sandboxes/route");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Daytona answered quota exceeded a moment ago (written by hand, not captured live)
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/sandboxes/route")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### A route with an order

**Request**

```json
{
  "image": "python:3.12-slim",
  "resources": {
    "cpu": 1,
    "memory_mb": 1024,
    "disk_mb": 3072
  },
  "provider": {
    "order": [
      "daytona",
      "modal"
    ]
  }
}
```

**Response**

```json
{
  "object": "sandbox_route",
  "route_source": "request_order",
  "order_configured": true,
  "allow_fallbacks": true,
  "candidates": [
    {
      "provider": "modal",
      "skipped": false,
      "probe": false,
      "create_timeout_seconds": 300,
      "cost_status": "price_table",
      "health": {
        "state": "closed",
        "consecutive_failures": 0,
        "last_failure_reason": null,
        "last_failure_at": null,
        "opened_at": null,
        "retry_at": null,
        "last_success_at": null
      },
      "reason": null,
      "cost_per_hour": 0.166,
      "cost_reason": null
    },
    {
      "provider": "daytona",
      "skipped": true,
      "probe": false,
      "create_timeout_seconds": 300,
      "cost_status": "price_table",
      "health": {
        "state": "open",
        "consecutive_failures": 1,
        "last_failure_reason": "quota_exceeded",
        "last_failure_at": "2026-11-28T01:10:00Z",
        "opened_at": "2026-11-28T01:10:00Z",
        "retry_at": "2026-11-28T01:10:30Z",
        "last_success_at": null
      },
      "reason": "quota_exceeded",
      "cost_per_hour": 0.0669,
      "cost_reason": null
    }
  ],
  "excluded": []
}
```

**SDK Code**

```python A route with an order
import requests

url = "https://api.example.com/v1/sandboxes/route"

payload = {
    "image": "python:3.12-slim",
    "resources": {
        "cpu": 1,
        "memory_mb": 1024,
        "disk_mb": 3072
    },
    "provider": { "order": ["daytona", "modal"] }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript A route with an order
const url = 'https://api.example.com/v1/sandboxes/route';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"image":"python:3.12-slim","resources":{"cpu":1,"memory_mb":1024,"disk_mb":3072},"provider":{"order":["daytona","modal"]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go A route with an order
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v1/sandboxes/route"

	payload := strings.NewReader("{\n  \"image\": \"python:3.12-slim\",\n  \"resources\": {\n    \"cpu\": 1,\n    \"memory_mb\": 1024,\n    \"disk_mb\": 3072\n  },\n  \"provider\": {\n    \"order\": [\n      \"daytona\",\n      \"modal\"\n    ]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby A route with an order
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/sandboxes/route")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"image\": \"python:3.12-slim\",\n  \"resources\": {\n    \"cpu\": 1,\n    \"memory_mb\": 1024,\n    \"disk_mb\": 3072\n  },\n  \"provider\": {\n    \"order\": [\n      \"daytona\",\n      \"modal\"\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java A route with an order
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.example.com/v1/sandboxes/route")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"image\": \"python:3.12-slim\",\n  \"resources\": {\n    \"cpu\": 1,\n    \"memory_mb\": 1024,\n    \"disk_mb\": 3072\n  },\n  \"provider\": {\n    \"order\": [\n      \"daytona\",\n      \"modal\"\n    ]\n  }\n}")
  .asString();
```

```php A route with an order
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/v1/sandboxes/route', [
  'body' => '{
  "image": "python:3.12-slim",
  "resources": {
    "cpu": 1,
    "memory_mb": 1024,
    "disk_mb": 3072
  },
  "provider": {
    "order": [
      "daytona",
      "modal"
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp A route with an order
using RestSharp;

var client = new RestClient("https://api.example.com/v1/sandboxes/route");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"image\": \"python:3.12-slim\",\n  \"resources\": {\n    \"cpu\": 1,\n    \"memory_mb\": 1024,\n    \"disk_mb\": 3072\n  },\n  \"provider\": {\n    \"order\": [\n      \"daytona\",\n      \"modal\"\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift A route with an order
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "image": "python:3.12-slim",
  "resources": [
    "cpu": 1,
    "memory_mb": 1024,
    "disk_mb": 3072
  ],
  "provider": ["order": ["daytona", "modal"]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/sandboxes/route")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```