> For AI agents: the complete documentation index is available at https://docs.hod.sh/llms.txt, the full documentation bundle is available at https://docs.hod.sh/llms-full.txt.

# REST API reference

The `hod` CLI, the web UI and scripts all use the same REST API, under `/api/v1` on the server. Requests carry a token, `Authorization: Bearer <token>` (see [Users and roles](https://docs.hod.sh/self-hosting/users.md)); public projects' runs, logs and files can be read without one.

For example:

```sh
curl -H "Authorization: Bearer $HOD_TOKEN" localhost:8080/api/v1/orgs/default/runs
curl -H "Authorization: Bearer $HOD_TOKEN" localhost:8080/api/v1/orgs/default/projects/app/runs/1
curl -X POST -H "Authorization: Bearer $HOD_TOKEN" localhost:8080/api/v1/orgs/default/projects/app/runs/1/cancel
```

The API is described by an OpenAPI 3.1 document, generated from the server's code: every server serves its own at `/api/v1/openapi.json`, and this page shows the one for this version of the docs, [openapi.json](/openapi.json).

Loading the API reference…

