# Delivery and metering

> Route health checks, what you see about each buyer's usage, and pausing an allocation.

Source: https://cairva.xyz/docs/delivery-and-metering

Once an agreement on your lot activates, Cairva's gateway sends the buyer's requests to your route and meters them against the allocation. Here's what that looks like from the supplier side.

## How requests reach you

The gateway calls your endpoint's chat completions API with the model id configured on the route. It forwards only the buyer's messages and the supported sampling fields: `max_tokens`, `temperature`, `top_p` and `stop`. Streaming requests ask your endpoint for usage in the stream with `stream_options.include_usage`.

`max_tokens` is always set, and never more than the buyer's remaining output allowance.

## Usage reporting

Your endpoint's reported token counts are what the buyer is billed against. Report `prompt_tokens` and `completion_tokens` in the response, and in the final streamed chunk.

If your endpoint doesn't report usage, the request is marked `usage_pending` and Cairva operations reconcile it from your metering with written evidence. Reconciled events are labelled `reconciliation` in usage data. Inline reporting is faster and less work for everyone.

## Health checks

Cairva checks each route by calling your endpoint's `/models` list and confirming the route's model id is in it. The route's health is `healthy` when it is, and `down` when the call fails or the model is missing. Checks run on a schedule from Cairva's background worker, and once more whenever an agreement on the route tries to activate.

An agreement can't activate on a route that isn't enabled or didn't pass that check. The public [status page](https://cairva.xyz/status) shows each route's health. See [Status and incidents](https://cairva.xyz/docs/status-and-incidents).

## What you can see

In **Deliveries** you see each allocation on your lots: quota, used, held and remaining, request counts, latency and the usage events. They're the same events the buyer sees through [`GET /v1/usage`](https://cairva.xyz/docs/usage).

You don't see prompts or completions. Cairva doesn't store them.

## Pausing an allocation

You can pause a `ready` or `active` allocation with a written reason, for example to deal with an incident. The buyer is notified with your reason, and their requests fail with `allocation_paused` until you resume. Resuming returns it to `active`, or `ready` if its window hasn't started.

A pause doesn't change the agreement. If you can't deliver what was agreed, the buyer can open an `under_delivery` dispute. See [Agreements](https://cairva.xyz/docs/agreements#disputes).

## Route disabled

Cairva operations can disable a route, with a reason. Requests to allocations on it fail with `502 route_disabled` until it's enabled again.
