Show where a create would go
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.
Authentication
A Meadow API key, sent as Authorization: Bearer mdw_.... The header
x-api-key: mdw_... is accepted in its place.
Request
At most 1 MiB. The body of POST /v1/sandboxes.
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.
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.
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.
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).
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 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}.
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.
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.
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.
Your own key and value pairs, returned with the sandbox and usable as a filter on GET /v1/sandboxes. Keys must not be empty.
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 headers
Meadow’s id for this request, req_ and 24 hex characters. Every response
carries it, including errors, streams and unknown routes. Every error in the
Error schema repeats it as request_id. Quote it when you report a problem.
Response
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.
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.
The sort that ordered the route. Left out when no sort applied, which includes a sort sent with an order: the order wins.