Created by: TEAM-116
Date: 2025-10-19
For: v0.1.0 Production Deployment
llama-orch exposes RESTful HTTP APIs for orchestration and pool management.
- queen-rbee:
http://localhost:8080 - rbee-hive:
http://localhost:8081
All endpoints require Bearer token (except /health and /metrics):
Authorization: Bearer <api-token>Health check endpoint.
Response:
{
"status": "healthy",
"version": "0.1.0"
}List registered nodes.
Auth: Required
Response:
{
"nodes": [
{
"node_name": "hive1",
"ssh_host": "hive1.example.com",
"status": "active"
}
]
}Register new node.
Auth: Required
Request:
{
"node_name": "hive1",
"ssh_host": "hive1.example.com",
"ssh_port": 22,
"ssh_user": "llama-orch"
}Prometheus metrics (no auth required).
Health check with worker stats.
Response:
{
"status": "healthy",
"workers": {
"total": 3,
"idle": 2,
"busy": 1
}
}List downloaded models.
Auth: Required
Download model from Hugging Face.
Auth: Required
Request:
{
"model_ref": "hf:TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF",
"filename": "tinyllama.gguf"
}Spawn new worker.
Auth: Required
Request:
{
"model_ref": "hf:TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF",
"backend": "cuda",
"device": 0,
"slots": 4
}List all workers.
Auth: Required
Stop worker.
Auth: Required
Prometheus metrics (no auth required).
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | Not Found |
| 500 | Internal Error |
TOKEN=$(cat /etc/llama-orch/secrets/api-token)
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model_ref": "hf:TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF",
"backend": "cpu",
"device": 0,
"slots": 4
}' \
http://localhost:8081/api/v1/workerscurl http://localhost:8081/healthcurl http://localhost:8081/metricsSee DEPLOYMENT.md for complete setup guide.