Skip to main content
token-hub

Scenarios

Concrete, copy-paste-ready walkthroughs for the things developers actually build: retrieval, chat, and classification against one TokenHub key.

Batch classification with token-hub

Run large-volume classification jobs through token-hub with aiohttp, bounded concurrency, retries, and the verified moonshot-v1-8k route.

  • Python
  • asyncio
  • aiohttp
  • CSV

Chat app with streaming responses

Build a server-side chat route that streams OpenAI-compatible output through token-hub using the currently verified moonshot-v1-8k route.

  • Next.js 14
  • React
  • Edge Runtime
  • Server-Sent Events

RAG answer synthesis through token-hub

Use token-hub as the generation step in a retrieval pipeline while keeping embeddings and vector storage in your own stack.

  • Python
  • LangChain
  • Chroma
  • OpenAI-compatible chat