Inference

Feature set: Inference Contact our support for access.

Inference is the execution of a trained AI model on an input to produce an output. Code performs inference when it sends a prompt to a large language model, requests an embedding, or classifies a piece of text.

Inference can be used by applications to deliver results to customers and it can be used by developers to produce code, agentic or otherwise.

Inference in agentic systems

An inference call differs from a function call: the result varies, arrives as text that the calling code must validate, can take minutes, and is billed per token. An agentic system makes several inference calls for each request, so latency, cost and the chance of a failed call grow with the depth and width of the call chain. See Models and inference for these properties and for how Akka observes, routes, trains and serves model traffic as one loop.

Serving models

Serving a model means running it on hardware in your project and exposing it on a hostname that OpenAI-compatible clients can call. Akka runs the model, allocates the hardware it needs, and provisions a TLS certificate for the hostname.

You describe what you want to run in a model descriptor, a YAML file that declares three kinds of resource. Applying that file is what creates them.

Resource What it declares

AcceleratorAllocation

A number of devices that your project claims from one of the region’s accelerator pools.

Model

One checkpoint, the engine that serves it, and the allocated device it runs on.

ModelEndpoint

The models that one endpoint serves, and the secret that holds its API keys.

Applying a descriptor writes these in dependency order, so nothing refers to a resource that does not exist yet: allocations, then models, then endpoints. See Model descriptor for every field of every resource.

A model descriptor does not hold secrets or routes. Create the secrets that the models need, such as the token for gated weights and the endpoint’s API keys, with akka secrets and akka models endpoints keys. A project route puts an endpoint on a hostname.

Serving your first model is a tutorial that does all of this in one pass. These pages describe each step in detail:

Routing requests to models

Serving decides what runs. Routing requests to models decides which of several providers answers a given request, from rules you declare or from the meaning of the request. A model you serve yourself is one destination a route can name. The two are independent: a served model is reachable on its own hostname whether or not any route names it.

Spend

Tracking inference spend reports what model traffic in a period consumed and cost, priced from a pricing catalog that you publish. Spend is attributed to systems by the system id that each request names.

The features described in this section are an add-on to Akka Automated Operations. They are not included in the base product.

Captures and inference costs