AIProviderRoute
API reference for AI Provider Routes (clrk.apoxy.dev/v1alpha1)
API Group: clrk.apoxy.dev/v1alpha1
Operations
List AIProviderRoute
GET/apis/clrk.apoxy.dev/v1alpha1/aiproviderroutes
List AIProviderRoute
Response
200: OK
List AIProviderRoute
GET/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/aiproviderroutes
List AIProviderRoute
Response
200: OK
Create AIProviderRoute
POST/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/aiproviderroutes
create an AIProviderRoute
Request Body
Spec fields (AIProviderRouteSpec):
| Field | Type | Description |
|---|---|---|
parentRefs | ParentReference[] | (required) |
rules | AIProviderRouteRule[] | (required) |
Response
200: OK201: Created202: Accepted
Delete All AIProviderRoute
DELETE/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/aiproviderroutes
Delete collection of AIProviderRoute
Response
200: OK
Get AIProviderRoute
GET/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/aiproviderroutes/{name}
Get the specified AIProviderRoute
Response
200: OK
Replace AIProviderRoute
PUT/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/aiproviderroutes/{name}
Replace the specified AIProviderRoute
Request Body
Spec fields (AIProviderRouteSpec):
| Field | Type | Description |
|---|---|---|
parentRefs | ParentReference[] | (required) |
rules | AIProviderRouteRule[] | (required) |
Response
200: OK201: Created
Update AIProviderRoute
PATCH/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/aiproviderroutes/{name}
Partially update the specified AIProviderRoute
Response
200: OK201: Created
Delete AIProviderRoute
DELETE/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/aiproviderroutes/{name}
delete an AIProviderRoute
Response
200: OK202: Accepted
Schema Reference
AIProviderRouteRule
| Field | Type | Description |
|---|---|---|
backendRefs | BackendRef[] | BackendRefs is the candidate set of clrk Backends (clrk.apoxy.dev/Backend) this rule may route to. With a single ref the request is re-pointed to that backend. With two or more, the request is distributed by the standard Gateway API BackendRef.Weight — unless a FallbackRoutingPolicy attaches to this route, in which case list ORDER is the fallback priority and weights are ignored, or an ExtensionRef classifier filter on this rule picks one instead (APO-480). Refs that are not clrk Backends are reported as unresolved by the status controller and ignored at selection time. |
filters | AIProviderRouteFilter[] | Filters apply policy to matched AI provider traffic. |
matches | AIProviderRouteMatch[] |
AIProviderRouteFilter
| Field | Type | Description |
|---|---|---|
extensionRef | LocalObjectReference | ExtensionRef references a cross-cutting policy. It is also the seam for classifier-driven backend selection: an ExtensionRef resolving to a classifier kind picks among the rule's BackendRefs at RequestBody end-of-stream (the classifier protocol is APO-480). When absent, backend selection is the standard weighted pick over BackendRefs (BackendRef.Weight). |
tokenBudget | TokenBudgetFilter | TokenBudget — inline, AI-provider-specific. |
type | string | Type selects the filter. (required) |
TokenBudgetFilter
| Field | Type | Description |
|---|---|---|
budgetRef | string | BudgetRef references a shared TokenBudget resource for cross-agent or cross-route budgets. |
maxOutputTokensPerRequest | integer (int64) | MaxOutputTokensPerRequest caps output tokens on a single API call. |
maxTokensPerDay | integer (int64) | MaxTokensPerDay caps daily token usage across all runs for this route. |
maxTokensPerExecution | integer (int64) | MaxTokensPerExecution caps total tokens (input+output) per agent run. |
AIProviderRouteMatch
| Field | Type | Description |
|---|---|---|
endpoints | string[] | Endpoints restricts to API paths. |
models | string[] | Models restricts to specific model IDs. Supports glob: "claude-*". |
provider | string | Provider selects the AI API provider. Validated against the llmcall provider registry at admission (AIProviderRoute.Validate), not an enum — a new provider plugin extends what is accepted without an API change. "custom" opts out of schema awareness for endpoint-only matching. (required) |