---
title: "TIR Token Factory"
description: "TIR Token Factory gives your project OpenAI-compatible APIs to open-weight models that E2E runs, billed by the tokens each request uses."
content_type: "overview"
product: "token-factory"
platform: "TIR"
url: "/tir/token-factory/"
---

# TIR Token Factory

<!-- cspell:ignore gemma -->

TIR Token Factory gives your project OpenAI-compatible APIs to open-weight models that E2E runs for
you, such as Google's Gemma 4 31B. Create an API key, point your OpenAI code at Token Factory, and
pay only for the tokens your requests use. Every model has zero data retention: your prompts and the
model's outputs are not stored. See [Tokens and
billing](/tir/token-factory/concepts/tokens-and-billing/#zero-data-retention).

## Where to find it

In TIR, open a project. In the side menu, under **INFERENCE**, select **Token Factory**. It opens on
the list of models you can call. From there, **Analytics** shows the project's requests and tokens,
and **API Keys** lists its keys.

## How it fits with other TIR products

Every Token Factory model shares one base URL and takes a Token Factory API key, and the model ID in
each request decides which model answers. To run a model of your own on workers you choose, deploy
it on [Model Endpoints](/tir/model-endpoints/) instead.

GenAI API is no longer in TIR. If your code called it, the [TIR Token Factory
FAQ](/tir/token-factory/faq/#i-used-genai-api-how-do-i-move-to-token-factory) says what to change.

## What you can do

- [Choose a model](/tir/token-factory/how-to/choose-a-model/) by its context window, its
  capabilities, and its price per million tokens, and copy the model ID you send.
- [Create an API key](/tir/token-factory/how-to/create-an-api-key/) for your project, with an
  expiry if you want one.
- [Call a model with the OpenAI SDK](/tir/token-factory/how-to/call-a-model-with-the-openai-sdk/)
  from Python or Node, with or without streaming.
- [Call a model with REST](/tir/token-factory/how-to/call-a-model-with-rest/) from curl or any HTTP
  client.
- [Use tools, JSON output, vision, and
  reasoning](/tir/token-factory/how-to/use-tools-json-vision-and-reasoning/) on the models that
  support them.
- [Monitor usage and cost](/tir/token-factory/how-to/monitor-usage-and-cost/) across the project
  and for each model.
- [Block, unblock, or revoke an API
  key](/tir/token-factory/how-to/block-unblock-or-revoke-an-api-key/) when a key is lost, leaked,
  or no longer needed.

For how input, cached input, and output tokens are billed, see [Tokens and
billing](/tir/token-factory/concepts/tokens-and-billing/).

## Where to start

[Get started with TIR Token Factory](/tir/token-factory/get-started/) takes you from an empty
project to your first reply from a model. [Troubleshooting TIR Token
Factory](/tir/token-factory/troubleshooting/token-factory/) lists each message with its fix, and the
[TIR Token Factory FAQ](/tir/token-factory/faq/) answers common questions.
