# Self-hosted model cost tracking (vLLM, Ollama, TGI)

Models on your own GPUs have no price list, so give them one: work out what a million output tokens (or an image, or a second of video) costs you, save it as a custom price, and send the calls under that provider name.

## Send calls

```python [Python]
import veqen
from openai import OpenAI

veqen.init()  # reads VEQEN_API_KEY, an ingest key
local = veqen.wrap(OpenAI(base_url="http://vllm.internal:8000/v1", api_key="unused"), provider="self-hosted",
                   feature="classify")

with veqen.tags(customer=org.id):
    local.chat.completions.create(model="Qwen/Qwen3-32B", messages=messages)
```

```ts [TypeScript]
import OpenAI from "openai";
import { wrap } from "@veqen/sdk";

const local = wrap(new OpenAI({ baseURL: "http://localhost:11434/v1", apiKey: "ollama" }), { provider: "self-hosted", feature: "classify" });
```

vLLM, Ollama, TGI, SGLang and llama.cpp's server all speak the OpenAI API, so the same code works with each. Image, video and other models: call `record()` with the units each job produced.

## Price it

Add a model price under Settings › Your prices for the `self-hosted` provider. The worked examples in [Custom prices](/docs/custom-prices) turn a GPU's hourly rate, utilization and throughput into a per-token or per-unit price. Calls received after you save the price use it.

## Check it against the GPU bill

Enter the month's GPU or cloud bill on the Bill check page under the same provider name, or import the provider's billing export there. The capture rate shows how close your price is. **Use as price** spreads the bill over the tokens you served and saves that as the price, so later calls cost what the hardware actually did.

## Next

- [Custom prices](/docs/custom-prices).
- [Reconciliation](/docs/reconciliation).
