Credentials. The printed API key grants access to the public endpoint, so keep it out of shared config files.
Who it is forA developer who uses Codex CLI and wants to try an open model on their own code without a GPU.
The problemCodex CLI needs an OpenAI-style endpoint, and most open models are too large to run on a laptop.
The outcomeCodex CLI sends requests to an open model on the Kaggle TPU and returns answers in the terminal.
What you need first
- A Kaggle account with TPU access, verified under Settings (phone number, and for some accounts a Persona identity check)
- Kaggle's free TPU quota, around 20 TPU hours a week
- For the terminal route: Python 3.9+ and the Kaggle CLI
Steps
- Run the notebook for Qwen3.8-27B or GLM-5.3-Flash from the README table on Kaggle and click Run all.
- Copy the public URL and API key printed by the last cell.
- Open the model folder README (for example qwen38-27b/) and copy the exact Codex CLI lines.
- Fill in the URL and key from step 2 and start Codex CLI.
- Ask Codex CLI a small coding question and check that the answer comes from the endpoint.
Prompt for your agent
In the ARahim3/kaggle-tpu-lab repo, read the Codex CLI lines in the <model> folder README, run that model's notebook on Kaggle, and configure Codex CLI with the printed URL and API key. Expected output: a Codex CLI answer to a test question served from the TPU. Verify the request reaches the Kaggle endpoint, not a default provider.
Caveat. The exact Codex CLI configuration lives in each model folder README, so follow the folder for the model you chose.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for ARahim3/kaggle-tpu-lab and "Point Codex CLI at a Kaggle-hosted open model"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer