# Groq cost tracking

Groq serves open models through an OpenAI-compatible API. Wrap the OpenAI client pointed at it and every call is priced at Groq's published rate for that model, not another host's.

## Wrap the client

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

veqen.init()  # reads VEQEN_API_KEY, an ingest key
client = veqen.wrap(OpenAI(base_url="https://api.groq.com/openai/v1", api_key=API_KEY), feature="extraction")

with veqen.tags(customer=org.id):
    client.chat.completions.create(model="openai/gpt-oss-120b", messages=messages)
```

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

const client = wrap(new OpenAI({ baseURL: "https://api.groq.com/openai/v1", apiKey: process.env.API_KEY }), { feature: "extraction" });
```

The host is read from the base URL, and the model id Groq reports is looked up in its own price list first. Use the OpenAI client: Groq's own SDK isn't wrapped. Through LiteLLM, `groq/` models are priced the same way.

## Reconcile to the bill

Groq has no cost API, so enter each month's invoice under **Bills entered by hand** on the Bill check page. Veqen compares it with what you tracked for Groq that month, and the monthly close books the invoice amount.

## Next

- [Groq model prices](/providers/groq).
- [Self-hosted models](/integrations/self-hosted): when you move a model onto your own GPUs.
