# Fireworks AI cost tracking

Fireworks AI serves open models through an OpenAI-compatible API. Wrap the OpenAI client pointed at it and every call is priced at Fireworks AI'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.fireworks.ai/inference/v1", api_key=API_KEY), feature="extraction")

with veqen.tags(customer=org.id):
    client.chat.completions.create(model="accounts/fireworks/models/llama-v3p3-70b-instruct", messages=messages)
```

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

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

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

## Reconcile to the bill

Fireworks AI 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 Fireworks AI that month, and the monthly close books the invoice amount.

## Next

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