---
title: "REST API for AI agent actions (OpenAPI) - actionlake"
description: "The actionlake REST API: the same eight tools as the MCP server, over HTTPS with bearer keys. Usage receipts on every response. Errors say what to do next."
canonical: https://actionlake.com/docs/api
updated: 2026-10-22
---

REST API reference

/docs/api

# The REST twin.

The actionlake REST API does everything the MCP server does, over plain HTTPS and under the same names: one call creates an account and returns a key, and every response carries AL-Calls, AL-Micros and AL-Cache headers with its own cost. It is described in OpenAPI and runs the same code the MCP tools call.

[Start free](https://actionlake.com/console) [openapi.json](https://api.actionlake.com/openapi.json) [Quickstart](https://actionlake.com/docs/quickstart)

curl

```
curl -X POST \
     https://api.actionlake.com/v1/account/tenant.create \
     -H "Content-Type: application/json" \
     -d '{"name": "acme"}'

curl "https://api.actionlake.com/v1/actions?q=invoice" \
     -H "Authorization: Bearer $ACTIONLAKE_KEY"
```

No key yet? The first call creates a tenant with 100,000 free calls and returns the key once. Every request after it carries the key.

- **1** implementation behind REST and MCP; a test holds them to it
- **3** receipt headers on every response
- **0** endpoints that return a credential

**On this page**

The store and the price book need no key; the catalogue opens with any key, including the sandbox's.

[Read the price book](https://api.actionlake.com/v1/price-book)

## Authentication.

Every request carries a bearer key. Keys belong to a tenant, carry their own allowed actions and spend cap, and are revoked instantly. No key yet? One unauthenticated call creates a tenant with 100,000 free calls:

curl

```
# no key yet? one unauthenticated call creates a tenant with 100,000 free calls
curl -X POST https://api.actionlake.com/v1/account/tenant.create \
     -H "Content-Type: application/json" -d '{"name": "acme"}'
→ {"tenant": {…}, "key": {"key": "al_…", "note": "shown once - store it now"}, "included_calls": 100000}

# every request after that carries the key
curl "https://api.actionlake.com/v1/actions?q=invoice" \
     -H "Authorization: Bearer $ACTIONLAKE_KEY"
```

MCP clients sign in instead: OAuth 2.1 with dynamic client registration against `https://connect.actionlake.com/mcp`, and the same consent screen mints a sandbox when there is no key to give it.

## The routes.

The REST twin uses the same names as the tools. Search the catalogue, read one action's schema and example, run it, or hand over several steps in order. Searching, describing and checking are always free; only calls that actually reach a vendor are metered.

GET `/v1/actions?q=…` `find_actions` One line per match: id, title, cost, effect. Scope to connected services, the store, or your saved plans.

GET `/v1/actions/{id}` `get_action` The full schema, a worked example, the cache TTL, what it costs.

POST `/v1/do` `do` One action with input, or steps in order, or a saved plan. limit is required on lists; fields projects the response.

POST `/v1/check` `check` Dry-run a do payload: validates inputs, connections and permissions, estimates the calls. Sends nothing.

GET `/v1/cost` `cost` This period's calls, hit rate, and the cap headroom for the tenant and the key.

POST `/v1/account/{op}` `account` keys.create, connections.create, plans.save, schedules.save, install, egress.status …

GET `/v1/runs · /v1/runs/{id}` Every run: cost, cache verdict, our time and the vendor's, the hashes that prove it.

GET `/v1/runs/{id}/trace` What the run sent to the vendor and what came back, secrets removed, kept for your plan's window. A key reads its own runs; the root key or a key granted traces:* reads every key's.

GET `/v1/plans · /v1/usage · /v1/invoices` Your saved plans, this period's usage and the invoices rolled up from the ledger.

GET `/v1/store · /v1/price-book` Public, no key: what is possible and what it costs, before you create anything.

A cross-service question, the `ask` tool, is available over MCP today; the REST twin is not yet served, and this page will say so until it is.

## Receipts on every response.

Every response, including errors and cache hits, carries its receipt in headers, and the same numbers ride inside the body for clients that never see headers:

`AL-Calls: 1` Upstream calls billed for this request. 0 on cache hits, discovery, and any failure that was not your fault.

`AL-Micros: 300` What it cost, in integer millionths of a dollar at your plan's published rate. No floats, ever.

`AL-Cache: miss` hit, miss, or bypass. bypass means the action is a write or declares no cache TTL, so no cache was consulted.

Our time and the vendor's are on every run, `ms` and `upstream_ms`, reported separately, never summed.

## Errors that say what to do next.

One error shape everywhere: a `code`, a sentence, whether it was billed, and `next`, the call that fixes it. Authentication failures, rate-limit refusals, vendor outages, timeouts and anything rejected before dispatch are free, contractually. You pay for definitive answers, not for attempts.

400 · no_connection

```
{"error": {"code": "no_connection",
           "message": "this tenant has no connection to that service, so nothing was sent",
           "billed": false,
           "next": {"tool": "account", "args": {"op": "connections.create", "service": "xero"}}}}
```

## The machine-readable surface.

- [`/openapi.json`](https://api.actionlake.com/openapi.json) on api.actionlake.com: this API, generated from the same source as the tools
- [`/v1/price-book`](https://api.actionlake.com/v1/price-book): every price, as JSON, no key
- [`/v1/llms.txt`](https://api.actionlake.com/v1/llms.txt): the surface, as an agent reads it on connect
- `https://connect.actionlake.com/mcp`: the same surface, over MCP

## One vocabulary. Two transports.

[Start free](https://actionlake.com/console?start=sandbox) [Read the quickstart](https://actionlake.com/docs/quickstart)

100,000 free calls. No card. Hard caps on every key. Cached answers are free.

---

Source: https://actionlake.com/docs/api
More: https://actionlake.com/llms.txt
