ConnectRPC Services
Candela components use ConnectRPC (over HTTP/2 or HTTP/1.1 via the Connect protocol) for high-performance dashboard population, user governance, post-hoc annotations, and local runtime orchestration.
Port mappings for ConnectRPC services:
candela-server/candelaCLI: Listen on:8181by default.
1. DashboardService
Section titled “1. DashboardService”Provides aggregated metrics and usage data for visualization, chart rendering, and status displays.
GetDashboardData
Section titled “GetDashboardData”Consolidates usage summaries, model breakdowns, and user budget status in a single round-trip.
- Request:
GetDashboardDataRequestmessage GetDashboardDataRequest {string project_id = 1;candela.types.TimeRange time_range = 2;string environment = 3;bool include_budget = 4; // Set true to request user budget context} - Response:
GetDashboardDataResponsemessage GetDashboardDataResponse {GetUsageSummaryResponse summary = 1;repeated ModelUsage models = 2;BudgetContext budget_context = 3; // Populated only if include_budget=true + auth}
GetLatencyPercentiles
Section titled “GetLatencyPercentiles”Retrieves latency distributions (p50, p90, p95, p99) and a time-series history for charts.
- Request:
GetLatencyPercentilesRequestmessage GetLatencyPercentilesRequest {string project_id = 1;candela.types.TimeRange time_range = 2;string model = 3; // optional: filter by model} - Response:
GetLatencyPercentilesResponsemessage GetLatencyPercentilesResponse {double p50_ms = 1;double p90_ms = 2;double p95_ms = 3;double p99_ms = 4;repeated TimeSeriesPoint latency_over_time = 10;}
Deprecated Endpoints
Section titled “Deprecated Endpoints”The following endpoints are deprecated and should not be used in new integrations:
GetUsageSummary(useGetDashboardDatainstead)GetModelBreakdown(useGetDashboardDatainstead)GetMyUsage(useGetDashboardDatawithinclude_budget=trueorUserService.GetMyBudgetinstead)
2. UserService
Section titled “2. UserService”Manages user accounts, active grants, and daily budget limits. It supports both admin commands and developer self-service.
Self-Service Endpoints (Current User)
Section titled “Self-Service Endpoints (Current User)”GetCurrentUser
Section titled “GetCurrentUser”Returns the profile, role, status, and active budget details for the authenticated session.
- Request:
GetCurrentUserRequestmessage GetCurrentUserRequest {} - Response:
GetCurrentUserResponsemessage GetCurrentUserResponse {candela.types.User user = 1;candela.types.UserBudget budget = 2;repeated candela.types.BudgetGrant active_grants = 3;double total_remaining_usd = 4; // Combined: grants + budget remaining}
GetMyBudget
Section titled “GetMyBudget”Retrieves a lightweight, high-performance budget summary. This is the endpoint polled by IDE plugins to display status bar spend and remaining credits.
- Request:
GetMyBudgetRequestmessage GetMyBudgetRequest {} - Response:
GetMyBudgetResponsemessage GetMyBudgetResponse {candela.types.UserBudget budget = 1;repeated candela.types.BudgetGrant active_grants = 2;double total_remaining_usd = 3;double budget_remaining_usd = 4;double grants_remaining_usd = 5;int64 tokens_used_today = 10;string period_key = 20;string period_resets_at = 21;}
Admin Endpoints
Section titled “Admin Endpoints”Requires admin credentials (OAuth2/ID token with appropriate roles).
- User Lifecycle:
CreateUser: Provision a new user with email and default daily budget.- Request:
CreateUserRequestmessage CreateUserRequest {string email = 1;string display_name = 2;candela.types.UserRole role = 3;double daily_budget_usd = 5;} - Response:
CreateUserResponsemessage CreateUserResponse {candela.types.User user = 1;candela.types.UserBudget budget = 2;}
- Request:
ListUsers: Paginated list of users, with optional status filters (ACTIVE,INACTIVE).GetUser: Get detailed user status, including active/expired grants.- Request:
GetUserRequestmessage GetUserRequest {string id = 1;} - Response:
GetUserResponsemessage GetUserResponse {candela.types.User user = 1;candela.types.UserBudget budget = 2;repeated candela.types.BudgetGrant active_grants = 3;}
- Request:
UpdateUser: Update display names or roles using aFieldMask.DeactivateUser/ReactivateUser: Enable or disable proxy traffic permissions.DeleteUser: Permanently purge a deactivated user account.
- Budget Limits:
SetBudget: Configure recurring daily spending limits.GetBudget: Retrieve limit and spent calculations.ResetSpend: Zero out today’s spending for emergency relief.
- Grants:
CreateGrant: Issue one-time credits with startup and expiration dates.ListGrants: Show active and expired grants.GetGrant: Retrieve details for a single grant by ID.RevokeGrant: Cancel/expire an active grant.
- Leaderboard:
GetJobLeaderboard: Returns a ranked list of users by their job completion metrics, useful for gamified dashboards.
- Audit Trail:
ListAuditLog: Retrieve an immutable audit trail of actions taken on a user.
3. AnnotationService
Section titled “3. AnnotationService”Provides APIs for post-hoc trace enrichment. Used for business outcome logging, human review labeling, and custom metric evaluation.
Unlike traces (which flow through high-throughput OTLP ingest pipelines), annotations have CRUD semantics and arrive asynchronously after a request completes.
SetOutcome
Section titled “SetOutcome”Records whether a trace succeeded or failed along with a business-level score.
- Request:
SetOutcomeRequestmessage SetOutcomeRequest {string trace_id = 1;bool success = 2;double score = 3; // Value from 0.0 to 1.0string comment = 4;} - Response:
SetOutcomeResponsemessage SetOutcomeResponse {candela.types.Annotation annotation = 1;}
AddLabel
Section titled “AddLabel”Attaches a human review label to a trace.
- Request:
AddLabelRequestmessage AddLabelRequest {string trace_id = 1;string label = 2;string reviewer = 3;string comment = 4;} - Response:
AddLabelResponsemessage AddLabelResponse {candela.types.Annotation annotation = 1;}
LogMetric
Section titled “LogMetric”Records a custom numerical metric associated with the trace.
- Request:
LogMetricRequestmessage LogMetricRequest {string trace_id = 1;string metric_name = 2;double metric_value = 3;string comment = 4;} - Response:
LogMetricResponsemessage LogMetricResponse {candela.types.Annotation annotation = 1;}
ListAnnotations
Section titled “ListAnnotations”Returns all annotations (outcomes, labels, and metrics) associated with a trace.
- Request:
ListAnnotationsRequestmessage ListAnnotationsRequest {string trace_id = 1;candela.types.AnnotationType type_filter = 2;} - Response:
ListAnnotationsResponsemessage ListAnnotationsResponse {repeated candela.types.Annotation annotations = 1;}
4. RuntimeService
Section titled “4. RuntimeService”Orchestrates local model servers (Ollama, vLLM, LM Studio) inside the local environment (candela).
-
Process Control:
StartRuntime: Start the configured inference daemon (e.g., Ollama or vLLM).- Request:
StartRuntimeRequestmessage StartRuntimeRequest {string backend = 1;} - Response:
StartRuntimeResponsemessage StartRuntimeResponse {RuntimeStatus status = 1;}
- Request:
StopRuntime: Terminate the active inference daemon.
-
Health & Models:
GetHealth: Checks state (STOPPED,STARTING,RUNNING,ERROR), uptime, and currently loaded models.- Request:
GetHealthRequestmessage GetHealthRequest {} - Response:
GetHealthResponsemessage GetHealthResponse {RuntimeStatus status = 1;repeated RuntimeModel models = 2;}
- Request:
ListModels: List all models available on the disk.LoadModel/UnloadModel: Load/unload models to/from GPU memory.- Request:
LoadModelRequestmessage LoadModelRequest {string model = 1;} - Response:
LoadModelResponsemessage LoadModelResponse {ModelLoadState state = 1;}
- Request:
PullModel/CancelPull: Start/cancel asynchronous model downloads from registries.DeleteModel: Delete downloaded model files.
-
Discovery:
ListBackends: Check which backend engines are installed on the local systemPATHand which is active.
-
State:
-
ResetState: Clear pull history and app preferences from the local SQLite database.- Request:
ResetStateRequestmessage ResetStateRequest {} - Response:
ResetStateResponsemessage ResetStateResponse {}
[!WARNING]
ResetStateis a destructive operation that permanently clears the local SQLite database containing download history and custom preferences. This action cannot be undone. - Request:
-
-
Catalog:
ListCatalog: Retrieve recommended models to install.
5. ModelCatalogService
Section titled “5. ModelCatalogService”Manages the centralized model catalog — the registry of all models known to the Candela server, including their pricing, capabilities, and availability.
ListModelCatalog
Section titled “ListModelCatalog”Returns all entries in the model catalog, with optional filtering.
- Request:
ListModelCatalogRequestmessage ListModelCatalogRequest {string provider = 1; // optional: filter by providerstring capability = 2; // optional: filter by capability (e.g., "vision", "code")int32 page_size = 10;string page_token = 11;} - Response:
ListModelCatalogResponsemessage ListModelCatalogResponse {repeated candela.types.ModelCatalogEntry entries = 1;string next_page_token = 2;}
UpdateModelCatalogEntry
Section titled “UpdateModelCatalogEntry”Updates an existing model catalog entry (e.g., pricing, display name, or capability tags).
- Request:
UpdateModelCatalogEntryRequestmessage UpdateModelCatalogEntryRequest {candela.types.ModelCatalogEntry entry = 1;google.protobuf.FieldMask update_mask = 2;} - Response:
UpdateModelCatalogEntryResponsemessage UpdateModelCatalogEntryResponse {candela.types.ModelCatalogEntry entry = 1;}
DeleteModelCatalogEntry
Section titled “DeleteModelCatalogEntry”Removes a model from the catalog. Existing traces referencing this model are unaffected.
- Request:
DeleteModelCatalogEntryRequestmessage DeleteModelCatalogEntryRequest {string model_id = 1;} - Response:
DeleteModelCatalogEntryResponsemessage DeleteModelCatalogEntryResponse {}
6. ProjectService
Section titled “6. ProjectService”Manages Candela projects — logical groupings for organizing models, users, and traces.
CreateProject
Section titled “CreateProject”Creates a new project.
- Request:
CreateProjectRequestmessage CreateProjectRequest {string display_name = 1;string description = 2;} - Response:
CreateProjectResponsemessage CreateProjectResponse {candela.types.Project project = 1;}
GetProject
Section titled “GetProject”Retrieves a project by ID.
- Request:
GetProjectRequestmessage GetProjectRequest {string project_id = 1;} - Response:
GetProjectResponsemessage GetProjectResponse {candela.types.Project project = 1;}
ListProjects
Section titled “ListProjects”Lists all projects visible to the authenticated user.
- Request:
ListProjectsRequestmessage ListProjectsRequest {candela.types.PaginationRequest pagination = 1;} - Response:
ListProjectsResponsemessage ListProjectsResponse {repeated candela.types.Project projects = 1;candela.types.PaginationResponse pagination = 2;}
UpdateProject
Section titled “UpdateProject”Updates project metadata.
- Request:
UpdateProjectRequestmessage UpdateProjectRequest {candela.types.Project project = 1;google.protobuf.FieldMask update_mask = 2;} - Response:
UpdateProjectResponsemessage UpdateProjectResponse {candela.types.Project project = 1;}
DeleteProject
Section titled “DeleteProject”Deletes a project. All associated traces and configuration are removed.
- Request:
DeleteProjectRequestmessage DeleteProjectRequest {string project_id = 1;} - Response:
DeleteProjectResponsemessage DeleteProjectResponse {}
7. TraceService
Section titled “7. TraceService”Provides query and retrieval APIs for LLM request traces stored by Candela.
GetTrace
Section titled “GetTrace”Retrieves a single trace by its trace ID.
- Request:
GetTraceRequestmessage GetTraceRequest {string trace_id = 1;} - Response:
GetTraceResponsemessage GetTraceResponse {candela.types.Trace trace = 1;}
ListTraces
Section titled “ListTraces”Queries traces with filtering and pagination.
- Request:
ListTracesRequestmessage ListTracesRequest {string project_id = 1;candela.types.TimeRange time_range = 2;string model = 3; // optional: filter by modelstring user_id = 4; // optional: filter by userstring status = 5; // optional: "ok", "error"int32 page_size = 10;string page_token = 11;} - Response:
ListTracesResponsemessage ListTracesResponse {repeated candela.types.Trace traces = 1;string next_page_token = 2;int32 total_count = 3;}
DeleteTrace
Section titled “DeleteTrace”Deletes a trace by ID. Associated annotations are also removed.
- Request:
DeleteTraceRequestmessage DeleteTraceRequest {string trace_id = 1;} - Response:
DeleteTraceResponsemessage DeleteTraceResponse {}