Reference
Frequently asked questions
Quick answers to common questions about building on the TNSA AI Platform.
What happens if a model isn't loaded yet?
If a requested model isn't already warm, it is loaded on demand. The first request may take a little longer while the model initializes; subsequent requests are fast. For latency-sensitive workloads, keep traffic flowing to the models you use most.
How is token cost tracked?
Each successful request logs its input (prompt) and output (completion) token counts. Cost is computed from the model's per-token rate and recorded against your API key. See Pricing for rates and the Usage page for your history.
Can I use my existing OpenAI code?
Yes. The endpoints mirror the OpenAI schema — point your client's base URL at https://api.tnsaai.com/v1 and use a TNSA key. See Libraries & SDKs.
How do I use Indian-language voices?
Call /tts or /audio-text-speech-pro, set a language code (such as hi for Hindi or te for Telugu), and choose a speaker profile. See Audio.
How do I cap how much an API key can spend?
Set a usage limit on the key from the API keys page. Once the limit is reached, further requests with that key are rejected until you raise it.
How do I stop a response mid-generation?
Close the HTTP connection. The server detects the closed socket and halts generation, so you aren't billed for tokens that were never produced. See Streaming.