FreeTheAI Cookbook¶

Runnable examples for the free, OpenAI-compatible FreeTheAI API. Each recipe is a folder in the repository with a short README and the code to run it.
Start with Getting started for the key and the base URL, then pick a recipe.
from freetheai import FreeTheAI
client = FreeTheAI() # reads FREETHEAI_API_KEY
reply = client.chat.completions.create(
model="fta/zai/glm-5.3",
messages=[{"role": "user", "content": "Hello!"}],
)
print(reply["choices"][0]["message"]["content"])
For apps such as SillyTavern, JanitorAI, Claude Code, Cline, and Cursor, use the guides at freetheai.org/setup. They are kept up to date there.