Runnable examples for building applications with open models on Nebius Token Factory. Explore an API, build an agent, evaluate a model, or adapt a complete application.
Start here · Browse recipes · Model guides · Documentation · Contribute
New to Token Factory? Follow the quick tour and environment setup. Each recipe has its own dependencies and run instructions. Using a coding agent? Point it at AGENTS.md.
git clone https://github.com/nebius/token-factory-cookbook.git
cd token-factory-cookbook
cp env_sample.txt .envAdd your API key and choose a text model from the live model catalog. Then make a first call with uv:
uv run --with openai --env-file .env python - <<'PYTHON'
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["NEBIUS_API_KEY"],
base_url="https://api.tokenfactory.nebius.com/v1/",
)
response = client.chat.completions.create(
model=os.environ["NEBIUS_MODEL"],
messages=[{"role": "user", "content": "Explain tool calling in one paragraph."}],
)
print(response.choices[0].message.content)
PYTHONPrefer a notebook? Open the native API example. For model availability, pricing, and supported features, use the live catalog and product documentation.
| You want to… | Start with |
|---|---|
| Make API calls and connect SDKs | APIs |
| Choose and run an open model | Model guides |
| Compare models on your own prompt | Comparing models |
| Cut input cost with prompt caching | Prompt caching |
| Build an agent or a team of agents | Agents |
| Give models tools and functions | Tool calling |
| Search and answer over your data | Retrieval and RAG |
| Run a complete application | Applications and demos |
| Connect a framework or external tool | Integrations |
| Use Token Factory in a coding agent | Coding agents |
| Evaluate model behavior | Inspect AI evaluation |
| Adapt a model to your task | Post-training · Distillation |
| Follow a guided session | Workshops · Office hours |
| Explore vision, images, and creative examples | Creative examples |
| Recipe | What you will build | Stack |
|---|---|---|
| OpenCrewBot | A chat app with model-specific bots, tools, memory, and shared rooms | Mastra · Next.js |
| Splitter Lite | A receipt reader that splits bills with vision and calculator tools | Nemotron 3.5 Super VL · Next.js |
| Footnote | A report analyst that builds a sourced spreadsheet model from a PDF and checks the report's claims | Inkling 2 Small · Next.js |
| Pantry | A shared-home grocery agent that each member's own agent joins over MCP, with nobody charged until everyone approves their share | Kimi K3.1 Pro · FastAPI · MCP |
| KubeTrace AI | A Kubernetes incident investigation and repair workflow with review controls | Beam · Python · React |
| Deep research agent | A research workflow with planning and web search | LangChain · Tavily |
| Internal support agent | A support workflow with retrieval and external tools | LangGraph · Weaviate |
| Typed decision model | Structured routing decisions with confidence-based escalation | GLM · OpenAI SDK |
These are independent examples. The recipe README explains required keys, optional services, validation, and deployment assumptions. Run and test the recipe you choose before adapting it to your environment.
Have a useful example or a fix? Read the contribution guide, start from the recipe template, and include the checks you ran in your pull request.
Use GitHub issues for reproducible recipe problems and suggestions. Report vulnerabilities through the security policy.
- Community projects and articles
- Events and workshops
- Office hours
- Token Factory documentation
- Nebius blog
- Contributors
The cookbook is MIT licensed. Imported applications, fonts, and third-party assets may carry their own licenses; retained license and provenance files take precedence for those files.