Skip to content
  • Models
  • Rankings
  • Ori
Sign Up
Sign Up
OpenRouterOpenRouter
© 2026 OpenRouter, Inc

Product

  • Chat
  • Rankings
  • Benchmarks
  • Apps
  • Discover
  • Models
  • Collections
  • Providers
  • Tools
  • Pricing
  • Business
  • Enterprise
  • Labs

Company

  • About
  • Blog
  • Careers
    Hiring
  • Privacy
  • Terms of Service
  • Trust Center
  • Support
  • Works With OR
  • Data
  • Brand

Developer

  • Documentation
  • API Reference
  • Developer Platform
  • Status

Connect

  • Discord
  • GitHub
  • LinkedIn
  • X
  • YouTube
All server tools

Bash

openrouter:bash

Docs

An Anthropic-style bash tool for the Messages API. With engine set to openrouter, commands run server-side in an isolated container. With auto or native, the tool call is returned to your application for client-side execution.

Docs

How it works

For Messages API integrations built on Claude’s bash tool. For sandboxed commands on the Responses API, use Shell.

  1. 1

    Your model emits a bash call with the commands to run.

  2. 2

    Your app or OpenRouter runs them: your app by default, or the OpenRouter sandbox when engine is openrouter.

  3. 3

    Your model reads stdout, stderr, and the exit code, then continues.

Providers and pricing

engine: "openrouter" runs commands in the OpenRouter sandbox. auto and native return the call to your application to execute.

  • Client-side

    Free

    The tool call is returned to your application to run.

  • Favicon for https://openrouter.ai

    OpenRouter sandbox

    $0.0001 / second

    30.0s minimum on requests that start a container

    Commands run server-side in an isolated container operated by OpenRouter.

Standard model token costs apply to every request.

Using this tool

With parameters.engine set to openrouter, as in this quick start, OpenRouter runs the commands in its sandbox and returns the output to the model. With the default engine, auto, or with native, the tool call is returned to your application to run client-side.

Available through the API. The chatroom uses Shell, which covers the same sandbox on the Responses API.

Supported APIs: Anthropic Messages.

shell
curl https://openrouter.ai/api/v1/messages \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "~anthropic/claude-opus-latest",
  "max_tokens": 1024,
  "tools": [
    {
      "type": "openrouter:bash",
      "parameters": {
        "engine": "openrouter"
      }
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "List the files in the working directory and count the lines in each."
    }
  ]
}'

Setup, parameters, and examples in the docs.

Read the integration guide

Related tools

Code & execution

  • Shell

    A sandboxed hosted shell for any model

    Code & execution
  • Apply patch

    Let models propose file edits as V4A diffs

    Code & execution