Free LLM API
Get a free LLM API key with up to 1 million free tokens. No card required. After that, models start at 1¢ per million tokens through one OpenAI-compatible API.Up to 1 million free tokens. No card required.
Get a free API key
- Sign up. No card needed.
- Create a key in the console.
- Paste this code. It works with the OpenAI SDK you already use.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.trustedrouter.com/v1",
api_key=os.environ["TRUSTEDROUTER_API_KEY"],
)
response = client.chat.completions.create(
model="trustedrouter/cheap",
messages=[{"role": "user", "content": "Say hello"}],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.trustedrouter.com/v1",
apiKey: process.env.TRUSTEDROUTER_API_KEY,
});
const response = await client.chat.completions.create({
model: "trustedrouter/cheap",
messages: [{ role: "user", content: "Say hello" }],
});
console.log(response.choices[0].message.content);trustedrouter/cheap sends each request to the lowest-priced model first. Swap in any model name from the table below.
Cheapest models today
Provider price per million tokens, updated every hour. The full list is on the models page.
| Model | Input | Output |
|---|---|---|
prism-ml/ternary-bonsai-27b |
1¢ | 1¢ |
openai/gpt-oss-20b |
1¢ | 4.7¢ |
mistralai/mistral-nemo-instruct-2407 |
3.1¢ | 3.2¢ |
meta-llama/meta-llama-3.1-8b-instruct-turbo |
2.1¢ | 4.2¢ |
z-ai/glm-5.3-flash |
2.6¢ | 7.4¢ |
z-ai/glm-5.3 |
53¢ | $1.58 |
How pricing works
Your first tokens are free. After that, you pay the provider's price plus 5.5%, with a minimum of 1¢ per million tokens. No subscription and no monthly fee. See pricing for details.
Read next: pricing, migrate from OpenAI, OpenAI compatible API.
Questions
Is the LLM API free?
Your first tokens are free: up to 1 million, with no card. After that, the cheapest models cost 1¢ per million tokens, so small projects cost very little.
Do I need a new SDK?
No. Use the OpenAI SDK you already have and change the base URL and API key.