Skip to main content
A manifest defines the image, files, setup, and command for one launch. You can supply it in three ways:
  • Send it inline as manifest.
  • Load a file with --manifest.
  • Launch a catalog name that resolves to a manifest.
Unknown fields are rejected with 400 invalid_request. The full request and response schemas are in the launch endpoint.

Start with an Inline Manifest

An inline manifest needs only name 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:
BoxRouter checks the manifest, the secrets, the routes, and the funding before it accepts a launch. A launch it cannot start answers 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:
A successful launch returns the sandbox ID and the phases it completed: If the operation fails, inspect 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

Only name 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.
Launch resolves the source and image, creates the sandbox, then runs code, setup, files, background and previews inside one 240-second budget. The command starts last.Launch resolves the source and image, creates the sandbox, then runs code, setup, files, background and previews inside one 240-second budget. The command starts last.Launch resolves the source and image, creates the sandbox, then runs code, setup, files, background and previews inside one 240-second budget. The command starts last.Launch resolves the source and image, creates the sandbox, then runs code, setup, files, background and previews inside one 240-second budget. The command starts last.

The five steps after create share one 240-second budget. A slow setup leaves less for files and previews.

Two phases appear only when needed:
  • source appears only for a source manifest.
  • image appears only when the manifest asks for a build or a prepared copy.
For an interactive manifest, the CLI runs 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 return launch_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.