> ## Documentation Index
> Fetch the complete documentation index at: https://levers9.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API overview

> Calling the controlplane over REST

The controlplane serves a REST view of its gRPC services. For the Levers AI Lab cluster the base URL is
`https://levers9.uselevers.com`; a self-hosted controlplane serves the same paths on its port 1994. Every request
carries the workspace token, the same one the CLI stores in `~/.levers9/config`.

```bash theme={null}
TOKEN=$(awk -F' = ' '/^\[default\]/{f=1} f&&/^token/{print $2; exit}' ~/.levers9/config)
curl -s https://levers9.uselevers.com/api/v1/health
curl -s -H "Authorization: Bearer $TOKEN" https://levers9.uselevers.com/api/v1/deployment
```

Invoking what you deployed:

| kind | URL |
| - | - |
| job | `POST /job/NAME/v1` |
| endpoint | `POST /endpoint/NAME/v1` (or `/latest`) |
| queue | `POST /queue/NAME/v1` |
| box | `/box/NAME/PORT/...` |

```bash theme={null}
curl -s -X POST https://levers9.uselevers.com/job/is-prime/v1 \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"n": 7919}'
```

Live output of a running container streams from `/api/v1/events/{workspace}/containers/{container}/stream`.
The specs on the left are generated from the protobuf definitions with `make openapi`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.