A quiet hour costs as much as a busy one.
There is no list price per call, so per-token cost tools show self-hosted calls as zero or unpriced.
GPU metering for self-hosted LLMs
Running DeepSeek, Qwen or GLM on vLLM? GPUs bill by the hour, busy or idle, so self-hosted calls have no price. Ganivra divides the bill across the calls that used it, so you see cost per request, per customer and per feature next to your API spend.
No credit card · Python SDK, REST or OpenTelemetry · From $29/month after the trial
Why it is hard
There is no list price per call, so per-token cost tools show self-hosted calls as zero or unpriced.
Token counts miss that generating an answer holds the GPU far longer than reading a prompt.
Someone pays for the hours the GPUs sit idle. If no customer does, margins look better than they are.
Same GPUs, same day
Two customers share $1,284.48 of B200 time. Split by tokens, the customer sending long documents pays most. Split by the GPU time vLLM measured, the one generating long answers does.
Why GPU utilization moves the cost per token
Claude, OpenAI and Gemini API vs self-hosted cost
What you get
New vLLM traces
vLLM reports how long each request spent in the model. Ganivra matches each trace to its call and splits the bill by that time.
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf \
OTEL_EXPORTER_OTLP_TRACES_HEADERS="Authorization=Bearer gv_…" \
vllm serve deepseek-ai/DeepSeek-V4.1-Flash \
--otlp-traces-endpoint https://api.ganivra.com/v1/otlp/v1/tracesSet it up Utilization
NVIDIA's DCGM exporter, or vLLM's own metrics, through an OpenTelemetry Collector. Each hour's unused share becomes idle cost.
Autoscaling
For clusters that scale up and down, each hour is billed for the GPUs the metrics saw, not a fixed count.
How it worksNext to your APIs
Self-hosted calls appear in customer margins, cost breakdowns and executions with OpenAI, Anthropic and Gemini calls.
See the dashboardCost per 1M tokens
Your effective rate today, the rate if the GPUs were 80% busy, and the same tokens on a hosted API.
When self-hosting pays offOwn GPUs or API
Ganivra already knows each feature's API tokens and cost. It prices them on your GPUs at 80% utilization, fills spare capacity first, and checks whether whole new GPUs would pay off. It works before you buy GPUs too.
Run it on your trafficSetup
GPU type, count, price per GPU-hour and the date they started. Pick a list price from Lambda or fal, or enter your contract rate. Optionally list the models the pool serves and an API model to compare with.
With the Python SDK, name your model servers once: self_hosted_hosts=["vllm.internal"]. Calls to them carry the customer, feature and workflow like any API call. With REST, set provider to self_hosted.
vLLM reports how long each request spent in the model. Ganivra matches each trace to its call by the response id and splits the bill by that time instead of tokens. Optional.
An OpenTelemetry Collector forwards NVIDIA's DCGM exporter, or vLLM's own metrics. Each hour's unused share becomes idle cost, and autoscaled clusters are billed for the GPUs actually running. Optional.
receivers:
prometheus:
config:
scrape_configs:
- job_name: gpus
scrape_interval: 30s
static_configs:
- targets: ["dcgm-exporter:9400", "vllm:8000"]
processors:
resource:
attributes:
- { key: ganivra.gpu_pool, value: "B200 cluster", action: upsert }
exporters:
otlphttp:
endpoint: https://api.ganivra.com/v1/otlp
headers: { Authorization: "Bearer gv_…" }
service:
pipelines:
metrics: { receivers: [prometheus], processors: [resource], exporters: [otlphttp] }The terms set out the same limits.
Frequently asked questions
How the split works, which servers it supports, and when self-hosting pays off.
Ganivra takes each UTC day's GPU cost (GPUs × price per GPU-hour × hours running) and splits it across that day's calls. A call's share is its measured GPU time when vLLM reported it, and otherwise its weighted tokens: input tokens plus output tokens counted 4 times. The per-call costs add up to the GPU bill, so cost per customer and feature works as it does for API calls.
Any OpenAI-compatible server for the calls themselves: vLLM, SGLang, TGI or your own. GPU time per call currently comes from vLLM's OpenTelemetry request traces. Utilization comes from NVIDIA's DCGM exporter on any server, or from vLLM's running-request gauge.
It depends on how busy the GPUs are. A GPU costs the same per hour whether it serves one request or a thousand, so cost per million tokens falls as utilization rises. Ganivra shows your pool's utilization, its cost per million tokens now and at 80% utilization, and what the same tokens would cost on a hosted API.
The move analysis prices each feature's API tokens from the last 30 days on your GPUs at 80% utilization. A pool's spare capacity is filled first, at no extra GPU cost. Features that would need new GPUs are checked with whole GPUs, so a feature that needs a tenth of a GPU is not counted as a saving. It compares cost only, not model quality.
An amortized rate: purchase price divided by the hours over its useful life, plus power, hosting and support per hour. For example, a server bought for $300,000 and used for 3 years costs about $11.42 an hour before running costs, or $1.43 per GPU-hour across 8 GPUs.
No. Ganivra receives usage metadata only: model, tokens, timing, GPU time and the IDs you choose. vLLM traces and GPU metrics are read for timing and utilization, and nothing else from them is kept.
Start with one pool
Add a GPU pool, send your self-hosted calls, and see each one priced the same day. Add vLLM traces and GPU metrics when you want the split by GPU time and the idle cost. Full 14-day trial, no credit card, no sales call.
import ganivra
ganivra.init(api_key="your_key", self_hosted_hosts=["vllm.internal"])Not ready? Estimate GPU vs API cost · Integration guide