Janus exposes HTTP REST and gRPC APIs. All SDKs communicate through these endpoints.
http://localhost:8080
All requests require the X-Tenant-ID header. Authenticated endpoints require an Authorization: Bearer <api_key> header.
{ "name": "review-mb", "agent_id": "reviewer" }{ "id", "source_agent", "target_type", "target_value", "envelope" }{ "agent_id": "reviewer" }{ "lease_id": "..." }{ "lease_id": "...", "result_ref": "..." }{ "lease_id": "...", "reason": "..." }{ "query": "Review Go code for bugs", "tenant_id": "acme" }All errors return a standard envelope:
{
"error": {
"code": "TENANT_MISMATCH",
"message": "Cross-tenant access denied",
"details": {
"request_tenant": "acme",
"resource_tenant": "evil-corp"
}
}
}
| HTTP Status | Error Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Malformed request body |
| 401 | UNAUTHENTICATED | Missing or invalid API key |
| 403 | TENANT_MISMATCH | Cross-tenant access denied |
| 403 | POLICY_DENIED | Governance policy blocked the operation |
| 404 | NOT_FOUND | Resource not found |
| 409 | LEASE_EXPIRED | Task lease expired, re-pull required |
| 429 | RATE_LIMITED | Budget or concurrency limit exceeded |
| 500 | INTERNAL | Server error |
Janus supports two authentication modes:
Authorization: Bearer <key> headerAPI keys are tenant-scoped. Create and revoke keys via the CLI:
janus auth create-key --tenant acme --role admin
janus auth revoke-key --tenant acme --key-id <id>