Use Tokenhub from any OpenAI client
Use the generated key as a bearer token and point your client at the Tokenhub base URL.
Base URL
https://tokenhub.43.133.129.9.sslip.io/v1All models
List every model currently exposed by Tokenhub.
curl https://tokenhub.43.133.129.9.sslip.io/v1/models -H "Authorization: Bearer $TOKENHUB_API_KEY"Text
Use chat completions for text models.
import OpenAI from "openai" const client = new OpenAI({ baseURL: "https://tokenhub.43.133.129.9.sslip.io/v1", apiKey: process.env.TOKENHUB_API_KEY,}) const completion = await client.chat.completions.create({ model: "kimi-k2.6", messages: [{ role: "user", content: "Hello" }],}) console.log(completion.choices[0].message)Image
Use image-capable models with chat input.
curl https://tokenhub.43.133.129.9.sslip.io/v1/chat/completions -H "Authorization: Bearer $TOKENHUB_API_KEY" -H "Content-Type: application/json" -d '{ "model": "gemini-2.5-flash-image", "messages": [ {"role": "user", "content": "Create a clean product image of a blue notebook on a desk."} ] }'Audio to text
Send audio files to the transcription endpoint.
curl https://tokenhub.43.133.129.9.sslip.io/v1/audio/transcriptions -H "Authorization: Bearer $TOKENHUB_API_KEY" -F "model=nova-3" -F "file=@meeting.wav"Text to audio
Generate speech audio from text.
curl https://tokenhub.43.133.129.9.sslip.io/v1/audio/speech -H "Authorization: Bearer $TOKENHUB_API_KEY" -H "Content-Type: application/json" -o speech.mp3 -d '{ "model": "grok-voice-tts-1.0", "voice": "Eve", "response_format": "mp3", "input": "Welcome to Tokenhub." }'