The TokenRex Blog

Writing from TokenRex

Guides for developers, honest cost comparisons across frontier models, and product notes from the team.

How do I generate AI images with an API? A TokenRex guideTutorials

How do I generate AI images with an API? A TokenRex guide

Generate and save your first AI image, choose GPT or Gemini settings, check live prices and troubleshoot transparent output or incorrect resolution.

Oct 22, 2026 11 min
Read post
Building a production RAG pipelineTutorials

Building a production RAG pipeline

Ingestion, chunking, embedding, retrieval, reranking, generation — the full stack.

Aug 27, 2026 15 min
Read post
Voice assistants — the modern architectureTutorials

Voice assistants — the modern architecture

STT → LLM → TTS is the old shape. Here's what teams are shipping now.

Aug 22, 2026 11 min
Read post
Building an image generation SaaSTutorials

Building an image generation SaaS

Architecture for a scalable image gen product — queueing, storage, CDN, moderation.

Aug 21, 2026 12 min
Read post
Building a multi-tenant SaaS on top of TokenRexTutorials

Building a multi-tenant SaaS on top of TokenRex

Per-customer keys, per-customer billing, and how to mark up AI cost.

Aug 20, 2026 11 min
Read post
Key rotation and per-key spend capsTutorials

Key rotation and per-key spend caps

How to structure keys across environments and teams.

Aug 19, 2026 6 min
Read post
Security best practices for API keysTutorials

Security best practices for API keys

Never ship a key to the browser. Here's the full playbook.

Aug 18, 2026 8 min
Read post
12 tactics to cut your LLM bill in halfTutorials

12 tactics to cut your LLM bill in half

Real, measured cost reductions from teams shipping in production.

Aug 17, 2026 12 min
Read post
Build a chatbot in GoTutorials

Build a chatbot in Go

Go standard library + go-openai client, wired to TokenRex.

Aug 12, 2026 9 min
Read post
Build a chatbot in Rails — Hotwire streamingTutorials

Build a chatbot in Rails — Hotwire streaming

Turbo Streams + TokenRex for a Ruby-native chat UI.

Aug 11, 2026 10 min
Read post
Build a chatbot in FastAPITutorials

Build a chatbot in FastAPI

Python-side streaming with FastAPI and the OpenAI SDK.

Aug 10, 2026 10 min
Read post
Build a chatbot in Next.js — streaming, memory, and UITutorials

Build a chatbot in Next.js — streaming, memory, and UI

A complete Next.js 15 chatbot with server-sent streaming and message history.

Aug 9, 2026 12 min
Read post
Cursor with a custom base URLTutorials

Cursor with a custom base URL

Use TokenRex as Cursor's model provider for at market price tab autocomplete and chat.

Aug 8, 2026 5 min
Read post
Vercel AI SDK + TokenRexTutorials

Vercel AI SDK + TokenRex

Use the AI SDK's OpenAI provider with a custom base URL.

Aug 7, 2026 5 min
Read post
LlamaIndex + TokenRex — setupTutorials

LlamaIndex + TokenRex — setup

Point LlamaIndex's OpenAI class at TokenRex and keep every downstream RAG pattern.

Aug 6, 2026 4 min
Read post
LangChain + TokenRex — setup in 3 linesTutorials

LangChain + TokenRex — setup in 3 lines

How to point LangChain's ChatOpenAI class at TokenRex.

Aug 5, 2026 4 min
Read post
Building an agent with tool loops — end to endTutorials

Building an agent with tool loops — end to end

A 200-line agent that browses the web, writes code, and reports back. Complete source.

Aug 4, 2026 14 min
Read post
Speech-to-text with Whisper-class modelsTutorials

Speech-to-text with Whisper-class models

Practical transcription: chunking, diarization, and cost per minute.

Jul 31, 2026 8 min
Read post
Building a coding copilot with GPT-5 CodexTutorials

Building a coding copilot with GPT-5 Codex

How to wire a diff-based code editor to GPT-5 Codex without breaking user files.

Jul 27, 2026 12 min
Read post
Vision inputs — sending images to GPT-5 and Gemini 3Tutorials

Vision inputs — sending images to GPT-5 and Gemini 3

URL, base64, batch — the three ways to hand a model a picture.

Jul 26, 2026 6 min
Read post
Migrate from OpenAI to TokenRex in 5 minutesTutorials

Migrate from OpenAI to TokenRex in 5 minutes

A step-by-step migration guide. Zero code changes beyond the base_url and key.

Jul 20, 2026 6 min
Read post
Build a WhatsApp bot with TokenRex in 20 linesTutorials

Build a WhatsApp bot with TokenRex in 20 lines

Wire a business WhatsApp number to GPT-5 in under 15 minutes with Twilio + TokenRex.

Jul 12, 2026 10 min
Read post