Overview
CREAO supports two API paths for running agents programmatically:
Both paths run CREAO agents you own and consume credits from your CREAO account balance. CREAO CLI can also create personal agents, update agents by replacing provided fields, and request natural-language edits. They are current supported paths with different key scopes, route families, and request shapes.
Which path should I use?
Use the app-scoped API Trigger when you want a key that can run only one agent. This is the path shown from the agent page inagent.creao.ai, and it uses inputs in the request body.
Use CREAO CLI when your backend owns an account-level integration. CREAO CLI keys can create, edit, and run personal agents owned by the same account, use agent_id and input, and support async polling, realtime NDJSON streaming, webhooks, and account-level analytics.
App-scoped API Trigger
Create an app-scoped API key from the agent detail page inagent.creao.ai. The key starts with capi_ and is scoped to that agent.
Create a run
Poll a run
status becomes completed, failed, or cancelled.
Download generated files
Polling and webhook results include generated files inresult.artifacts:
url with your API key and follow the redirect:
GET /api/v1/runs/{runId}/artifacts/download?artifactId={artifactId}; pass the artifact’s exact id as the encoded query value.
CREAO redirects to a temporary storage URL with a maximum lifetime of one hour (underlying credentials may expire sooner). The storage URL grants access to anyone holding it until it expires. Keep it private. Only send your API key to CREAO; do not forward it to a different origin when following redirects. Curl’s --location strips the Authorization header on cross-origin redirects; do not use --location-trusted.
Save the stable CREAO URL, not the redirect destination. If a storage link expires, fetch the stable URL again to obtain a fresh redirect. Older runs also receive stable URLs when polled. Files remain downloadable only while they remain available at their recorded location; polling retains artifact metadata after a file is deleted.
Errors use the JSON envelope
{ "error": "ERROR_CODE" }. Existing PDF quarantine restrictions also apply to these downloads.
Receive the result by webhook
AddwebhookUrl to the run request, and CREAO POSTs the result to that URL when the run finishes:
status is completed or failed. result.chatText is added when the agent’s conversational reply differs from result.text. The webhook carries no error details; poll the run for its errorCode.
Every request carries these headers:
CREAO makes up to three attempts with short backoff. A non-
2xx response, a connection error, or no response within 10 seconds is retried. Redirects are not followed, so a 3xx response counts as a failed attempt. The first 2xx response ends delivery.
Delivery is at least once. A retry can repeat a request your endpoint already processed, for example when it timed out before responding. Deduplicate on X-Creao-Delivery-Id (or runId), respond with a 2xx quickly, and do slow work afterwards.
Webhooks are best-effort, so keep polling as the fallback. A run that fails before it starts executing, for example for insufficient credits, ends without a webhook.
CREAO CLI
Create an Account API key in Developer Console. CREAO CLI keys start withcr_sk_ and are sent as Bearer tokens to developer.creao.ai/v1/*.
1
Create an Account API key
Open Developer Console, go to API Keys, and create a key. Store the full key immediately because it is shown only once.
2
Find the agent ID
Start a personal-agent creation run through
POST /v1/agents and poll it for the new agent_id, or open Agents in Developer Console and copy the agent_id for an existing agent. Browser-based editing, files, schedules, and debugging still live in agent.creao.ai.3
Create an async run
202 Accepted with a run ID and conversation ID:4
Poll for the result
status becomes completed, failed, or cancelled.CREAO CLI reference
Create an agent
JSON body
Returns
202 Accepted with a queued run_id, conversation_id, and agent_id: null. Poll GET /v1/runs/:run_id; when the creation run completes, the response includes the new agent ID in both agent_id and result.agent_id.
Update an agent
release_note. The target must be a personal agent owned by the Account key owner. Team, shared, deleted, or foreign agents return AGENT_NOT_FOUND.
Edit an agent from instructions
202 Accepted with run_id, agent_id, status, and timestamps. Poll GET /v1/agents/:agent_id/edits/:run_id until status is succeeded, failed, or cancelled.
Create an async run
JSON body
Returns
202 Accepted with a run object.
Get run status
List runs
Response:
Realtime runs
Use CREAO CLI realtime runs when your backend wants streamed progress and output.
Example:
application/x-ndjson. Each line is one { "type": "..." } object. Events include:
Conversations
Pass a previousconversation_id to continue the same thread of work with the same agent through CREAO CLI:
Webhooks
CREAO CLI async runs can deliver the terminal result to your backend:X-Creao-Delivery-Id across attempts. See Webhooks for the CREAO CLI payload.