Skip to content

API & Reference > API & SDK

API & SDK quickstart

Open in ChatGPT ↗
Ask ChatGPT about this page
Open in Claude ↗
Ask Claude about this page
Copied!

Create and monitor your first cloud agent run with the Oz API & SDK in about five minutes.

The Oz API & SDK lets you run and manage cloud agents from anywhere — CI pipelines, backend services, scripts, and custom tooling — without the Warp desktop app. Create your first run and check its status in about five minutes.

Watch this short demo of how the REST API can power agent-backed apps like PowerFixer, an issue triage bot built by the Warp team:

  • A Warp API key - Create one in the Oz web app and copy the raw value. Use a personal key if you want runs attributed to you, or an agent key to attribute runs to a cloud agent. See API Keys for the full flow.
  • A cloud environment - Agents run inside a configured environment that includes repos and other dependencies. If you don’t have an environment yet, follow the Cloud agents quickstart first.

Export your API key so the commands in this guide can authenticate; they all read the WARP_API_KEY environment variable.

Terminal window
export WARP_API_KEY="wk-..."

Replace wk-... with the key you created earlier.

Submit a prompt to start an agent run:

Terminal window
curl -X POST https://app.warp.dev/api/v1/agent/run \
-H "Authorization: Bearer $WARP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Scan the repo for outdated dependencies and summarize the findings.",
"config": {
"environment_id": "<ENV_ID>"
}
}'

Replace <ENV_ID> with your environment ID. Find it with oz environment list on the Oz CLI or in the Oz web app.

The API returns a run_id immediately. The agent starts asynchronously; check its status at any time using the run ID.

Fetch the current state of the run with the following command. Replace <RUN_ID> with the run_id from step 2.

Terminal window
curl "https://app.warp.dev/api/v1/agent/runs/<RUN_ID>" \
-H "Authorization: Bearer $WARP_API_KEY"

The state has the following possible values:

  • QUEUED - The run is waiting to start.
  • INPROGRESS - The agent is actively running.
  • SUCCEEDED - The run completed successfully.
  • FAILED - The run encountered an error. Check the status_message field in the response for details, then use the API error reference to interpret the error code.

These are the most common states. See the Agent API reference for all possible values.

To list all recent runs:

Terminal window
curl "https://app.warp.dev/api/v1/agent/runs" \
-H "Authorization: Bearer $WARP_API_KEY"

Once the run reaches SUCCEEDED, the response includes a session_link: a direct URL to the full run transcript, including commands executed, files changed, and agent output.

You can also view and manage all runs in the cloud agent dashboard.

You created a cloud agent run over HTTP and tracked it from QUEUED to SUCCEEDED. From here: