- Send it inline as
manifest. - Load a file with
--manifest. - Launch a catalog name that resolves to a manifest.
400 invalid_request. The full request and response schemas are in the
launch endpoint.
Start with an Inline Manifest
An inline manifest needs onlyname and command. Set BOXROUTER_API_KEY to your API key; the SDKs and CLI
also read an optional BOXROUTER_BASE_URL. For HTTP, set BOXROUTER_BASE_URL to
https://api.boxrouter.ai/api/v1. The CLI and HTTP commands use jq and uuidgen, and HTTP uses curl 7.76 or later.
This launch runs a setup command, then writes a file:
400, 402, or 409 with outcome set to not_started, and nothing is created.
Otherwise the reply is 202 with a launch operation. API error bodies go to stderr in the CLI and HTTP examples. If the reply is lost, replace the generated key with the
printed key and resend the same request. Recover the launch
explains what to check before retrying.
Replace LAUNCH_ID below with the returned id. Run the call until status is succeeded
or failed:
error and failure_status. Before retrying, follow
preparation failure recovery.
For a successful launch, replace SANDBOX_ID with its ID to request deletion:
destroyed confirms deletion. destroying, with an operation_id, means it is pending; check the operation or sandbox state.
For a terminal and --rm, see the quickstart.
Fields
Onlyname and command are required. Most launches add some of the fields that prepare the sandbox:
image, code, setup, files, env, secrets, background and ports. The last four rows,
required_env, max_copies, model_access and sign_in, describe catalog agents. A field the table does
not list is refused with 400 invalid_request before the launch is accepted.
A sandbox can run past the end of its lifetime, lifetime_seconds; see lifetime behavior.
Keep credentials out of
env, file contents, and the manifest. Declare names in secrets instead. For
private code, link the repository first.
Preparation Order
Launch pins any source manifest and code revision, then prepares one sandbox in the order below.The five steps after create share one 240-second budget. A slow setup leaves less for files and previews.
sourceappears only for a source manifest.imageappears only when the manifest asks for a build or a prepared copy.
command when it attaches the terminal; API callers open their own terminal. An unattended manifest starts command last.
Understand Launch Limits
Without a lifetime of your own, launch leaves the field out: the create request’s default applies.
A credit-funded sandbox on a route that can extend a lifetime runs while funded;
otherwise the sandbox runs for 300 seconds.
effective_lifetime_seconds reports what you got.
A lifetime you choose is never lowered. If it exceeds every such account’s cap, launch fails with
lifetime_cap_exceeded. Its fix gives the maximum or says to connect an account with a higher tier.
A sandbox with no lifetime (lifetime_seconds: null) runs until you destroy it. Only a route whose
provider never ends a sandbox can serve it, and only on your own provider account; see
lifecycle.
Recover a Preparation Failure
A failed preparation step can returnlaunch_failed with a phase. When a command fails, the error
also gives its command and exit_code. A route that cannot start an unattended command can instead return
capability_unavailable. Launch requests sandbox deletion. An exit 7 in setup produced this error:
Before retrying, read cleanup. If it is not confirmed, or the operation outcome is unknown, follow
Recover from Errors before sending another request that changes state. Even when cleanup is confirmed,
setup commands may have changed external systems. Check their effects before retrying.
The exit status of a started unattended command is not known at launch. Read it with
GET /launches/{id}/command.
Next Steps
Launch Your Own Agent
Launch a manifest from the CLI or the API.
Choose a Sandbox Image
Choose and prepare the image.
Run Copies of an Agent
Start N unattended copies and read what each wrote.