Getting startedGuidesReferenceChangelog
Apoxy:// Docs / Reference / AIProviderRoute

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):

FieldTypeDescription
parentRefsParentReference[](required)
rulesAIProviderRouteRule[](required)

Response

  • 200: OK
  • 201: Created
  • 202: 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):

FieldTypeDescription
parentRefsParentReference[](required)
rulesAIProviderRouteRule[](required)

Response

  • 200: OK
  • 201: Created

Update AIProviderRoute

PATCH/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/aiproviderroutes/{name}

Partially update the specified AIProviderRoute

Response

  • 200: OK
  • 201: Created

Delete AIProviderRoute

DELETE/apis/clrk.apoxy.dev/v1alpha1/namespaces/{namespace}/aiproviderroutes/{name}

delete an AIProviderRoute

Response

  • 200: OK
  • 202: Accepted

Schema Reference

AIProviderRouteRule

FieldTypeDescription
backendRefsBackendRef[]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.
filtersAIProviderRouteFilter[]Filters apply policy to matched AI provider traffic.
matchesAIProviderRouteMatch[]

AIProviderRouteFilter

FieldTypeDescription
extensionRefLocalObjectReferenceExtensionRef 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).
tokenBudgetTokenBudgetFilterTokenBudget — inline, AI-provider-specific.
typestringType selects the filter. (required)

TokenBudgetFilter

FieldTypeDescription
budgetRefstringBudgetRef references a shared TokenBudget resource for cross-agent or cross-route budgets.
maxOutputTokensPerRequestinteger (int64)MaxOutputTokensPerRequest caps output tokens on a single API call.
maxTokensPerDayinteger (int64)MaxTokensPerDay caps daily token usage across all runs for this route.
maxTokensPerExecutioninteger (int64)MaxTokensPerExecution caps total tokens (input+output) per agent run.

AIProviderRouteMatch

FieldTypeDescription
endpointsstring[]Endpoints restricts to API paths.
modelsstring[]Models restricts to specific model IDs. Supports glob: "claude-*".
providerstringProvider 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)