Skip to content

Buying capacity

Allocations

The live, metered form of an agreement: quota, holds, rate limits, delivery window and states.

On this page

An allocation is a block of capacity carved out for one buyer: the contracted tokens, the delivery window and the rate limits from the agreement. It's the thing API keys are bound to and the thing every request is metered against.

What it holds

FieldMeaning
QuotaContracted input and output tokens
UsedTokens the provider reported, booked against the quota
HeldTokens reserved by requests still running
RemainingQuota minus used minus held, never below zero
WindowWhen requests are served
LimitsRequests per minute, tokens per minute and max concurrency

Input and output are tracked separately. Running out of either one stops the allocation.

States

StateMeaningServes requests
reservedThe quote was accepted. The agreement isn't active yetNo
readyActivated, but the window hasn't startedNo
activeInside the window and servingYes
pausedThe supplier or Cairva operations paused it, with a reasonNo
depletedThe input or output allowance is fully used. The agreement completesNo
expiredThe window endedNo
terminatedThe agreement was cancelled before activationNo

A ready allocation becomes active on the first request after its window opens, or when the background sweep reaches it. When the window ends, a ready, active or paused allocation becomes expired and its agreement completes.

Pausing

The supplier or Cairva operations can pause a ready or active allocation with a written reason, for example to investigate a compromised key or a delivery problem. The buyer is notified with that reason, and requests fail with allocation_paused. Resuming puts the allocation back to active, or ready if its window hasn't started.

Low allowance

When less than 10% of the output allowance remains, the buyer organization gets a notification once for that allocation.

Using it

  • Create keys in API keys in the workspace. See API keys.
  • Try prompts in the workspace Playground. Playground requests go through the same gateway and spend the same allowance.
  • Read it from code with .
  • Read per-request usage with .