Overview
The API Trigger feature lets you run your agent apps from external scripts, CI/CD pipelines, or other applications — no browser required. Create an API key, point it at any agent app, pass inputs, and get structured results back.This is a Pro feature. API key creation requires a paid plan (Pro or higher).
Getting started
Create an API key
Open Account Settings → API Keys and click Create key. Give it a name (e.g., “Production” or “CI/CD”) and copy the key immediately — it’s only shown once.Your key starts with
capi_ and acts as a Bearer token for all API requests.Find your app ID
Open the agent app you want to trigger. The app ID is in the URL:You can also find it via the API:
Trigger a run
Send a POST request with your app ID and inputs:You’ll get an immediate response with a run ID:
API reference
Create a run
| Field | Type | Required | Description |
|---|---|---|---|
appId | string | Yes | The agent app to run |
inputs | object | No | Key-value pairs matching the app’s input fields |
chatModelId | string | No | Override the default LLM model |
webhookUrl | string | No | URL to receive a POST callback when the run completes |
202 Accepted with { id, status, appId, appName }.
Get run status
status, result, artifacts, startedAt, and completedAt.
List runs
status (pending, running, completed, failed, cancelled).
Cancel a run
{ success: true }.
Run lifecycle
Every API-triggered run goes through these states:| Status | Meaning |
|---|---|
pending | Request accepted, agent starting up |
running | Agent is executing inside the sandbox |
completed | Agent finished successfully — result available |
failed | Agent encountered an error — check errorCode |
cancelled | You cancelled the run via the cancel endpoint |
Webhooks
Instead of polling, you can provide awebhookUrl to receive the result automatically:
Viewing API runs in the UI
API-triggered runs appear in the agent app’s Runs tab with an[API] prefix. Click any run to open the full chat thread and see the agent’s step-by-step work, including tool calls, web searches, and generated artifacts.
Managing API keys
You can manage your keys in Account Settings → API Keys:- Create up to 10 active keys per account
- Revoke any key instantly — revoked keys stop working immediately
- Track usage — each key shows when it was last used
Rate limits
API requests are rate-limited to 30 requests per minute per user. If you exceed the limit, the API returns429 Too Many Requests with a Retry-After header.