Run an automation
Start a one-shot session from a saved Claude Code automation.
| Method | Path | Required permissions |
|---|---|---|
| POST | /v1/automations/{automation_id}/sessions | write:sessions |
- API key
- Supported.
- CLI user token
- Supported.
- Sandbox token
- Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
Higher permission levels include lower levels: read < write < delete.
Grant match patterns can further restrict access to individual resources.
Supply input when it declares an input schema; otherwise supply prompt. Send exactly one.
Path parameters
curl -X POST \
"https://api.ellipsis.dev/v1/automations/{automation_id}/sessions" \
-H "Authorization: Bearer $ELLIPSIS_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Run the tests."
}'import os
from ellipsis import Ellipsis
from ellipsis import models
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
request = models.StartAutomationSessionRequest.model_validate(
{
"prompt": "Run the tests."
}
)
result = client.automations.run("check-tests", prompt=request.prompt)
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const request: Parameters<typeof client.automations.run>[1] = {
"prompt": "Run the tests."
};
const result = await client.automations.run("check-tests", request);
console.log(result);Request
Body parameters
Tighten this run's spend cap, in US dollars. May only lower the automation's own session budget; a higher number, or one above the organization's ceiling, is a 400.
The typed payload for an automation that declares input.json_schema. Required when the automation declares a schema; rejected when it does not. Validated against the schema and rendered through input.message, or as formatted JSON if no template is set. The rendered message must be non-empty. Cannot be combined with prompt.
{}objectArbitrary string key/value metadata stored on the session.
The initial user message, passed verbatim to Claude. Required when the automation declares no input.json_schema; rejected when it does. Must contain non-whitespace text and cannot be combined with input.