Complete reference for using the AICR API Server.
The AICR API Server provides HTTP REST access to recipe generation and bundle creation for GPU-accelerated infrastructure. Use the API for programmatic access to configuration recommendations and deployment artifacts.
Local development (example):
Start the local server:
Generate an optimized configuration recipe for your environment:
Create deployment bundles from a recipe:
Service information and available routes.
Response:
Generate an optimized configuration recipe based on environment parameters.
Query Parameters:
Examples:
Generate an optimized configuration recipe from a criteria file body. This endpoint provides an alternative to query parameters, accepting a Kubernetes-style RecipeCriteria resource in the request body.
Content Types:
application/json - JSON formatapplication/x-yaml - YAML formatRequest Body:
The request body must be a RecipeCriteria resource:
Examples:
Error Responses:
400 Bad Request - Invalid criteria format, missing required fields, or invalid enum values405 Method Not Allowed - Only GET and POST are supportedResponse:
metadata.excludedOverlays is optional. When present, each entry includes the overlay name and a machine-readable reason such as constraint-failed or mixin-constraint-failed.
Query a specific value from a fully hydrated recipe. Resolves a recipe from criteria (same parameters as GET /v1/recipe), merges all base, overlay, and inline overrides, then returns the value at the given selector path.
Query Parameters:
All GET /v1/recipe parameters are supported, plus:
Response:
Examples:
Generate deployment bundles from a recipe.
Query Parameters:
Request Body:
The request body is the recipe (RecipeResult) directly. No wrapper object needed.
Bundler names correspond to component names in recipes/registry.yaml. Any component registered there can be passed as a bundler. Current components:
Examples:
Response Headers:
Service health check (liveness probe).
Response:
Service readiness check (readiness probe).
Response:
Prometheus metrics endpoint.
Key Metrics:
Fetch a recipe and generate bundles in one workflow:
When rate limited (HTTP 429), use the Retry-After header:
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-ResetRetry-After headerThe API server can be configured to restrict which criteria values are allowed. This enables operators to limit the API to specific accelerators, services, intents, or OS types.
Allowlists are configured via environment variables when starting the server:
Behavior:
any value is always allowed regardless of allowlist configuration/v1/recipe and /v1/bundle endpointsWhen a disallowed criteria value is requested:
Response (HTTP 400):
The CLI (aicr) is not affected by allowlists. Allowlists only apply to the API server, allowing operators to restrict API access while maintaining full CLI functionality for administrative tasks.
The full OpenAPI 3.1 specification is available at: api/aicr/v1/server.yaml
Generate client SDKs:
“Invalid accelerator type” error:
“Recipe is required” error:
Empty zip file:
Connection refused (local):