WBX Sandbox
Reference

Errors

When something goes wrong, the API answers with an HTTP status and a short JSON message. This page lists every error, what it means and what to do about it.

What an error looks like

HTTP/1.1 429 Too Many Requests
{"error": "account limit reached (concurrent sandboxes, vCPU or memory)", "code": "quota"}
  • error is a sentence for people and may change. code is stable – check the code, not the text. Some errors have no code; then the status says enough.
  • Some errors add fields: feature (feature_disabled), controller_until (human_in_control). Rate limits and short outages send a Retry-After header in seconds.
  • Python SDK: every API error raises SandboxError with status, code, message, retry_after and body. TypeScript SDK: APIError subclasses (RateLimitError, NotFoundError, FeatureDisabledError, …) with status, code and retryAfter.
  • MCP: a tool returns the same message as text with isError: true, so the assistant can read it and react.
  • A command that fails inside the sandbox is not an API error: you get 200 with its exit_code. Neither is a failed job: it has status: "failed" and an error object.

What to do first

StatusUsually
400 / 422Fix the request – the message names the field.
401 / 403Check the key, the feature or the permission.
402Credit, fair use or budget – see Billing.
404Wrong ID, or the thing is gone.
409Wrong state – wake, resume or wait, then retry.
429A limit: free a slot (quota) or wait for Retry-After.
5xxRetry after a short pause. Nothing is ever started with less than you asked for.

Every endpoint

StatusCodeMeaningWhat to do
400invalid_jsonThe body is not valid JSON, or it is empty.Send a JSON object; check quoting in your shell.
400–A parameter is missing or wrong. The message names it (for example an invalid name or network).Fix the parameter the message names.
400invalid_requestThe request is incomplete – for example POST /v1/jobs/wait without IDs or with a wrong until.Fix the request as the message says.
401–The API key is missing, wrong or revoked.Send Authorization: Bearer YOUR_API_KEY with a valid key from API keys.
403feature_disabledAn optional feature is not enabled for your account. The field feature names it: desktop, metrics_history, snapshots or clones.GET /v1/features lists what is on. Desktop is enabled on request; for the others contact support.
403app_key_not_allowedThe key of a connected app (an assistant signed in with OAuth) cannot change account settings such as the budget or the default compute class.Use an API key created in the portal.
404not_found (or none)The sandbox, snapshot, job or batch does not exist, no longer exists, or belongs to another account.Check the ID; list your resources to find it.
413body_too_largeThe request body is larger than the endpoint accepts.Send less data – upload big files with PUT …/files instead of inside JSON.
429rate_limitedToo many requests in a short time (metrics, desktop, live console).Wait for the Retry-After header, then retry.
500internal (or none)Something failed on our side.Retry; if it keeps happening, contact support with the time and the request.
503service_unavailable (or none)The service is restarting, or we are not accepting new jobs for a moment.Retry after Retry-After or in a few seconds.

Account, plan and compute classes

StatusCodeMeaningWhat to do
402account_suspendedStarting new sandboxes and jobs is paused for your account. The message says why: your prepaid credit ran out; or the daily fair-use limit of a fixed-price plan is used up; or the operator paused the account. Running sandboxes continue.Credit: top up in Billing. Fair use: wait until 00:00 UTC, or switch to continuing at usage rates in Billing. Otherwise contact support.
429quotaYour plan's limit of concurrent sandboxes, vCPU or memory is reached – also when waking a sleeping sandbox. A paused (frozen) sandbox still counts; a sleeping one does not.Put a sandbox to sleep or destroy one, or upgrade your plan. See Limits.
429–The server has no free slot right now.Retry in a few seconds.
400invalid_compute_classUnknown compute class.GET /v1/compute/preferences lists the classes.
403class_not_allowedThe compute class is not included in your plan (or is reserved for another organization).Choose another class or change your plan.
409class_disabledThe compute class is temporarily not available for new sandboxes and jobs.Choose another class, or retry later. Your request is never moved to another class by itself.
409default_class_unavailableYour default compute class no longer exists.Choose a new default in Settings → Compute Preferences, or pass compute_class.
400class_template_mismatchThe template cannot run in this compute class (for example it is smaller than the class minimum).Pick another class or template; the message says why.

Sandboxes, commands and files

StatusCodeMeaningWhat to do
409name_takenAnother sandbox of yours with this name was created at the same moment.Retry the call – it then returns the existing sandbox.
409–The sandbox is in the wrong state, for example a command in a paused (frozen) sandbox, or a new lifetime for a sleeping one.Resume or wake it first (POST …/resume), then retry.
409sandbox_sleepingA public URL, screenshot or live console of a sleeping sandbox – these never wake it. (The desktop status does not fail: it answers 200 with available: false and reason: "sandbox_sleeping".)Wake it (POST …/resume or any command), then retry.
409sandbox_not_runningA public URL of a sandbox that is not running (for example paused).Resume it.
503sandbox_unavailableA sleeping sandbox cannot be woken up right now (for example its server is full). A new, empty sandbox is never created in its place.Retry shortly.
503–No server with what you asked for (a compute class, IPv6, free memory) is free right now. A sandbox is never started with less than you asked for.Retry, or ask for less.
500create_rolled_backThe sandbox could not be started and was cleaned up.Retry.
502–The agent inside the sandbox did not respond – usually the sandbox ran out of memory.Create a new sandbox, or use a bigger template or class.
400network_too_largeThe combined network rules (team, request and, for clones, the source) have more than 1000 allowed or blocked destinations.Use fewer destinations, or IP ranges instead of single addresses.
502port_closedPublic URL: nothing listens on that port in the sandbox.Start the app in the background and make it listen on 0.0.0.0, not only 127.0.0.1.
502port_unreachablePublic URL: the app on the port does not respond.Check the app's log in the sandbox.
501public_urls_disabledPublic URLs are not enabled on this server.Contact support.

Snapshots and clones

StatusCodeMeaningWhat to do
409sandbox_archivedThe sandbox has been asleep for long and was moved to long-term storage.Wake it (POST …/resume), then retry.
429snapshot_limitYou have as many snapshots as your plan allows.Delete snapshots you no longer need.
501unsupportedThe server of the sandbox does not support snapshots right now (during an update).Retry later.
503snapshot_pause_failedA running sandbox could not be paused for the copy, so no snapshot was taken. The sandbox keeps running.Retry after Retry-After.
503snapshot_node_unavailable (or none)The server that stores the snapshot is full or does not respond.Retry shortly.
503snapshot_count_unavailableSome servers are not reachable, so your snapshot count cannot be checked.Retry shortly.
503clone_network_unknownThe network settings of the source sandbox cannot be read right now, so no copy is started (a copy never gets wider access).Retry shortly.
500snapshot_delete_failedThe snapshot could not be deleted right now; it is kept and still listed.Retry the deletion.
207(per copy)A clone created only some copies. The answer lists the created ones in sandboxes and one {"index", "name", "status", "code", "error"} per failed copy in errors.Usually quota – free a slot and clone again. The SDKs raise an error only when no copy was created.

Desktop & Computer Use

StatusCodeMeaningWhat to do
409human_in_controlA person controls the desktop from the portal. The answer has controller_until.Wait (screenshots and status still work), then retry.
403human_onlyOnly a signed-in person in the portal can take control or open the live console – never an API key or MCP.Use screenshots and actions from code.
409desktop_restartedThe desktop restarted while the request waited.Send the request again.
409display_unavailableThe sandbox has no desktop (not the desktop template), or it is still starting.Use the desktop template; after a start or wake-up wait a few seconds.
502invalid_screenshotThe screenshot from the sandbox was not a valid image.Retry.
409control_requiredPortal only: take control before sending input from the console.Click Take control.
409vnc_unavailable / agent_unavailablePortal only: the live console cannot start in this sandbox (an older build of the template, or the agent does not respond).Start a new desktop sandbox; the page falls back to screenshots.

Submitting jobs and batches

StatusCodeMeaningWhat to do
400invalid_command, invalid_timeout, invalid_cwd, invalid_env, invalid_metadata, invalid_template, invalid_artifacts, invalid_network, invalid_retry, invalid_webhook, invalid_max_cost, invalid_optimize_for, invalid_placement, invalid_runtime, invalid_wasm, invalid_inputs, invalid_idempotency_keyA field of the job is invalid; the code names the field and the message says what is allowed.Fix that field. Limits: Limits.
400invalid_batch, invalid_depends_onThe batch is invalid: number of jobs, max_concurrency, a dependency on a job that is not in the batch, or a cycle.Fix the batch.
400env_requiredRetrying a job that had environment variables – their values are not stored.Send {"env": {…}} with the retry.
400invalid_mode, bad_sinceA wrong mode of the log, or a since that is not an RFC 3339 time.Fix the parameter.
402budget_exceededThe job or batch does not fit into your monthly or daily budget.Wait for the next period, or raise the budget. See Budgets.
403runtime_not_allowedThe runtime is reserved for internal tasks.Use firecracker (default) or wasi.
409idempotency_conflictThe idempotency key was already used for a different request.Use a new key for a different job or batch.
422budget_too_lowThe worst-case cost of the job is above its max_cost. The message gives the longest timeout_s that fits.Lower timeout_s or raise max_cost.
422cost_unavailableA price limit or budget is set, but prices are not available for your account or the limit is in another currency.Use max_cost in your billing currency; contact support if it persists.
422 / 409budget_currencyThe budget is in another currency than your plan.Set the budget again.
429queue_fullYou have too many queued jobs.Wait for some to start.
429too_many_waitersToo many POST /v1/jobs/wait calls are waiting at the same time.Retry in a few seconds.
503service_unavailableWe are not accepting new jobs, batches or retries for a while (job storage is running low).Retry after Retry-After.

Reading jobs, result files and receipts

StatusCodeMeaningWhat to do
404job_not_found, batch_not_found, artifact_not_foundNo such job, batch or result file in your account.Check the ID or the file name (GET /v1/jobs/{id}/artifacts).
410artifact_goneThe result file is no longer stored (results are kept 7 days).Run the job again.
409job_activeRetrying a job that has not ended yet.Cancel it or wait.
409receipt_not_finalA signed receipt of a job that has not ended yet.Wait until the job ends.
409module_unavailableRetrying a WebAssembly job whose module is no longer stored.Submit the job again with the module.
503signing_unavailableReceipt signing is not available right now.Retry later; the unsigned receipt still works.

Why a job failed

A failed job is not an API error. GET /v1/jobs/{id} returns "status": "failed" (or expired) with "error": {"code", "message", "kind"}. kind tells whose problem it was: user – the job itself (charged as usual); system – our side (credited back automatically, and run again when the job has retry).

CodeKindMeaning
nonzero_exituserThe command exited with a non-zero exit code.
timeoutuserThe job reached its time limit (status expired); files written so far are kept.
artifact_missinguserA file from required_artifacts was not produced.
dependency_faileduserA job of the same batch that this job depends on did not complete.
input_unavailable, invalid_inputsuserAn input file from another job is missing, too large or no longer stored.
template_not_founduserThe template does not exist on the server.
capacityuser / systemThe job could not start with the size or class it asked for.
prepare_timeoutuserThe job's sandbox could not be prepared in time.
wasm_trapuserThe WebAssembly module stopped with an error.
account_suspended, account_disabled, start_rejected, quota_busyuserThe account could not start the job at that moment (credit, fair use, limits).
sandbox_lost, node_failure, start_failed, queue_timeout, cleanup, interrupted, runtime_unavailable, runtime_failed, module_unavailable, env_unavailable, input_corrupted, artifact_upload_failed, artifact_store_failedsystemA failure on our side. With retry the job runs again; the cost of such attempts is credited back automatically.

The job summary (GET /v1/jobs/{id}/summary, MCP get_job_summary) suggests a next step for each failure.

Next steps