GPT-56T 861 —
MUSE-SPK 835 -0.7%
GPT-56SC 828 -5.2%
QWEN-38X 824 —
CL-OP55X 822 —
GROK-46H 822 -5%
GPT-6A 820 —
GLM-5 784 -8.4%
CL-FAB5H 743 -5.6%
KIMI-K3X 742 -8.4%
CL-OP5H 720 -5.8%
CL-OP5X 709 -18%
CL-OP46H 698 -5.9%
CL-OP47H 690 -5.9%
GEM-38FH 677 +0.1%
GEM-37FH 657 -24%
GPT-56S 622 —
CL-OP47 582 -0.7%
GPT-55H 582 —
INKL 531 —
GEM-31P 513 —
GEM-3P 499 —
CL-OP46 496 -0.2%
CL-OP48 490 —
GPT-56T 861 —
MUSE-SPK 835 -0.7%
GPT-56SC 828 -5.2%
QWEN-38X 824 —
CL-OP55X 822 —
GROK-46H 822 -5%
GPT-6A 820 —
GLM-5 784 -8.4%
CL-FAB5H 743 -5.6%
KIMI-K3X 742 -8.4%
CL-OP5H 720 -5.8%
CL-OP5X 709 -18%
CL-OP46H 698 -5.9%
CL-OP47H 690 -5.9%
GEM-38FH 677 +0.1%
GEM-37FH 657 -24%
GPT-56S 622 —
CL-OP47 582 -0.7%
GPT-55H 582 —
INKL 531 —
GEM-31P 513 —
GEM-3P 499 —
CL-OP46 496 -0.2%
CL-OP48 490 —
← Back to feed

OpenRouter Shell Tool: Any Model Gets a Hosted Linux Sandbox at $0.0001 Per Second

OpenRouter shipped a shell server tool and Files API on September 8, making it possible to give any model on the platform a hosted Linux shell without standing up local compute. The capability is available on the Responses and Messages APIs, currently in beta.

How It Works

The shell tool adds a bash tool to the model’s context. The model issues shell commands; they execute in an isolated container; stdout, stderr, and exit codes come back as tool results. Files the run writes to disk can be retrieved afterward through the Files API.

Containers are isolated per-request by default. An agent making multiple sequential requests can reuse the same container if it explicitly maintains the container ID across turns — otherwise each request starts fresh.

The Files API handles input and output: upload a file before the run, read back what the model wrote after. Storage is limited to 10GB total across all files; there is no per-file size limit stated. Files API usage has no separate charge beyond storage.

Pricing

Sandbox time billing:

ConditionRate
Active seconds (model running commands)$0.0001/sec
Minimum per cold-start30 sec ($0.003)
Idle time after request endsNot billed

For a simple tool call that runs three shell commands over 45 seconds of active compute, the sandbox cost is $0.0045. Token costs are separate and standard for the model used.

The 30-second minimum applies on cold container starts. Warm reuse avoids the minimum. In practice, agents making multiple requests in rapid succession against the same container pay the minimum only on the first request.

What This Enables

The primary use case is coding agents and research agents that need to execute code, run tests, or interact with a filesystem without the overhead of managing a local sandbox environment. Before this feature, achieving the same result required either:

  • A locally hosted execution environment (compute cost, infra overhead)
  • A cloud VM provisioned per run (slower, more expensive at low volume)
  • A managed code execution product with narrower model compatibility

The OpenRouter shell tool makes the execution environment a per-request line item, billed at the same granularity as tokens. It also makes the capability available across every model on the platform — not just the models with native code execution support from the originating lab.

For GPT-5.5, DeepSeek V4 Flash, Kimi K3, and other models that don’t have lab-native sandboxed execution, the shell tool fills that gap through the OpenRouter layer.

Positioning Against Lab-Native Execution

OpenAI has its own code interpreter tool for ChatGPT and the API. Google offers code execution in the Gemini API. Both are model-specific. The OpenRouter shell tool works the same way regardless of which model is selected, and switching models doesn’t require changing the tool integration.

The $0.0001/second rate works out to $0.36 per hour of active compute. For short-burst agentic tasks — running a test suite, executing a data transform, checking a file — costs stay under a cent per run. For long-running processes that keep the container active, the rate is meaningful and operators should time-bound agent runs accordingly.

The beta flag means pricing and API shape may change. OpenRouter is asking users to report unexpected behavior in their Discord before the API solidifies.