Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: openbash Exec API
version: 1.0.0
description: 'Bash programs over data, reachable by HTTP, SSH and MCP.
There is ONE execution endpoint, not one per program. Programs are commands on a path inside a shell — "customs | jq | sort" is a single request — so they compose without any of them knowing about the others. Which programs exist is decided per ACCOUNT, not per call: once enabled, every session that account opens has them, and help lists exactly those.
Stateless by default; pass a session_id to carry a working directory, environment and /tmp across calls. A session id names the shell, not the connection — the same id is resumable from HTTP, MCP and SSH, and survives a restart of this gateway. On MCP, an Mcp-Session-Id sent with initialize NAMES the session: it is resumed if it exists and started under that name if it does not, so a client can choose an id once and keep it. A client that sends no header still keeps one session: an OAuth connector gets a DEFAULT session bound to its client_id, so continuity does not depend on header plumbing. API keys bind nothing, because a key is shared and each caller under it must get its own session. From inside the shell, session list, session use and session new move that default.'
servers:
- url: https://openbash.ai
security:
- apiKey: []
tags:
- name: Exec
paths:
/api/v1/exec:
post:
operationId: exec
summary: Run one command
description: 'Run one shell command. This is the ONLY execution endpoint — programs are commands, not routes, and a pipeline of several is one request.
Stateless by default. Set stream=true (or send Accept: text/event-stream) for Server-Sent Events: one ''chunk'' event per piece of output, then a terminal ''exit'' or ''error''.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ExecRequest'
responses:
'200':
description: The command ran. Check exit_code — a non-zero exit is a result, not an HTTP failure.
content:
application/json:
schema:
$ref: '#/components/schemas/ExecResponse'
text/event-stream:
schema:
type: string
'400':
description: Malformed request.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or refused key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limited for this account.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'504':
description: The command did not finish in time.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Exec
components:
schemas:
Error:
type: object
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true
ExecRequest:
type: object
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true
ExecResponse:
type: object
description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
x-ae-placeholder: true