Create machines — POST /v1/compute/machines/{id}/{action}

Dispatches one verb against a bot the caller's org owns.

POST /v1/compute/machines/{id}/{action}

Addresshttps://api.hanzo.ai/v1/compute/machines/{id}/{action}
MethodPOST
Operationpost_compute_machines_by_id_by_action
AuthAuthorization: Bearer $HANZO_API_KEY

Dispatches one verb against a bot the caller's org owns. message runs the bot's bound agent with the request body as the message and streams the agent's answer back VERBATIM — the upstream body, its content type and its status — so a message is a real agent run, recorded, billed and traced exactly like any other, under the caller's own identity rather than a fabricated one. stop and pause are the same single honest capability: they halt the runtime by unbinding the agent while LEAVING THE MACHINE UP, so the bot stops answering but keeps costing — rebind to resume, or delete the bot to tear it down. Stopping is idempotent; a bot with no binding still reports stopped.

Org-scoped and fails closed: a validated principal is required (401 without one) and the bot is addressed under the caller's OWN org, so another tenant's id is not reachable. An unknown action is a clean 400 naming the three it accepts, never a silent no-op, and messaging a bot with no bound agent is a 400.

Request

2 fields.

FieldInTypeRequiredDescription
idpathstringyes
actionpathstringyes

Response

The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.

Examples

hanzo compute machines id add <id> <action>
import { Configuration, ComputeApi } from 'hanzoai';

const api = new ComputeApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postComputeMachinesByIdByAction({ id: 'id', action: 'action' });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ComputeApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ComputeApi(client).post_compute_machines_by_id_by_action(id='id', action='action')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ComputeAPI.PostComputeMachinesByIdByAction(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, compute_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = compute_api::post_compute_machines_by_id_by_action(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ComputeApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ComputeApi(client).postComputeMachinesByIdByAction();
curl -X POST https://api.hanzo.ai/v1/compute/machines/<id>/<action> \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches compute through the compute tool, which names its 28 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_compute_regions"
         }
       }
     }'

Compute API · All Hanzo APIs · Interactive reference

Was this page useful?