llm
The llm router: 16 methods of the llm capability, with tier, scope, input and output.
Capability llm · scope system · mode collection · source packages/types/src/capabilities/llm.cap.ts:341.
Every method is called at /trpc/llm.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
generate | mutation | protected | create | no |
generateVision | mutation | protected | create | no |
cancel | mutation | protected | create | no |
listModels | mutation | admin | admin only | no |
getDefaults | query | protected | view | no |
setDefault | mutation | admin | admin only | no |
getUsage | query | protected | view | no |
listModelCatalog | query | protected | view | no |
listRuntimeNodes | query | protected | view | no |
listNodeModels | query | protected | view | no |
resolveModelRef | mutation | admin | admin only | no |
installModel | mutation | admin | admin only | no |
deleteModel | mutation | admin | admin only | no |
getRuntimeStatus | query | protected | view | no |
startRuntime | mutation | admin | admin only | no |
stopRuntime | mutation | admin | admin only | no |
llm.generate
- Kind: mutation —
POST /trpc/llm.generate - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityllm, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=llm.generateon your hub
Input
LlmGenerateBaseInputSchemaOutput
LlmGenerateResultSchemaShapes: LlmGenerateBaseInputSchema · LlmGenerateResultSchema
llm.generateVision
- Kind: mutation —
POST /trpc/llm.generateVision - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityllm, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=llm.generateVisionon your hub
Input
{ addonId?: string; profileId?: string; consumer: string; system?: string; prompt: string; jsonSchema?: Record<string, unknown>; maxTokens?: number; temperature?: number; topP?: number; topK?: number; reasoningEffort?: "off" | "low" | "medium" | "high"; timeoutMs?: number; retry?: LlmRetryPolicySchema; requestId?: string; images: LlmImageSchema[] }Output
LlmGenerateResultSchemaShapes: LlmRetryPolicySchema · LlmImageSchema · LlmGenerateResultSchema
llm.cancel
- Kind: mutation —
POST /trpc/llm.cancel - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityllm, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=llm.cancelon your hub
Input
{ addonId?: string; requestId: string }Output
voidllm.listModels
- Kind: mutation —
POST /trpc/llm.listModels - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=llm.listModelson your hub
Input
LlmListModelsInputSchemaOutput
LlmListModelsResultSchemaShapes: LlmListModelsInputSchema · LlmListModelsResultSchema
llm.getDefaults
- Kind: query —
GET /trpc/llm.getDefaults - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityllm, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=llm.getDefaultson your hub
Input
{}Output
LlmDefaultSchema[]Shapes: LlmDefaultSchema
llm.setDefault
- Kind: mutation —
POST /trpc/llm.setDefault - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=llm.setDefaulton your hub
Input
{ selector: LlmDefaultSelectorSchema; profileId: string | null }Output
voidShapes: LlmDefaultSelectorSchema
llm.getUsage
- Kind: query —
GET /trpc/llm.getUsage - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityllm, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=llm.getUsageon your hub
Input
{ since?: number; until?: number; consumer?: string; profileId?: string }Output
LlmUsageRollupSchema[]Shapes: LlmUsageRollupSchema
llm.listModelCatalog
- Kind: query —
GET /trpc/llm.listModelCatalog - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityllm, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=llm.listModelCatalogon your hub
Input
{}Output
ManagedModelCatalogEntrySchema[]Shapes: ManagedModelCatalogEntrySchema
llm.listRuntimeNodes
- Kind: query —
GET /trpc/llm.listRuntimeNodes - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityllm, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=llm.listRuntimeNodeson your hub
Input
{}Output
LlmRuntimeNodeSchema[]Shapes: LlmRuntimeNodeSchema
llm.listNodeModels
- Kind: query —
GET /trpc/llm.listNodeModels - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityllm, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=llm.listNodeModelson your hub
Input
{ nodeId: string }Output
LlmNodeModelSchema[]Shapes: LlmNodeModelSchema
llm.resolveModelRef
- Kind: mutation —
POST /trpc/llm.resolveModelRef - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=llm.resolveModelRefon your hub
Input
{ ref: string; maxBytes?: number }Output
HfModelResolutionSchemaShapes: HfModelResolutionSchema
llm.installModel
- Kind: mutation —
POST /trpc/llm.installModel - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=llm.installModelon your hub
Input
{ nodeId: string; model: ManagedModelRefSchema }Output
voidShapes: ManagedModelRefSchema
llm.deleteModel
- Kind: mutation —
POST /trpc/llm.deleteModel - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=llm.deleteModelon your hub
Input
{ nodeId: string; file: string }Output
voidllm.getRuntimeStatus
- Kind: query —
GET /trpc/llm.getRuntimeStatus - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityllm, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=llm.getRuntimeStatuson your hub
Input
{ addonId: string; profileId: string }Output
LlmRuntimeStatusSchemaShapes: LlmRuntimeStatusSchema
llm.startRuntime
- Kind: mutation —
POST /trpc/llm.startRuntime - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=llm.startRuntimeon your hub
Input
{ addonId: string; profileId: string }Output
LlmRuntimeStatusSchemaShapes: LlmRuntimeStatusSchema
llm.stopRuntime
- Kind: mutation —
POST /trpc/llm.stopRuntime - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=llm.stopRuntimeon your hub
Input
{ addonId: string; profileId: string }Output
void