The smartest AI teams don't use one model for everything. They use cheap, fast models for simple tasks and reserve expensive, powerful models for complex reasoning. This "model routing" approach can cut your AI costs by 70-90% while maintaining quality.
With NovAI, you get access to 8+ Chinese AI models through a single API endpoint. This makes it trivially easy to build multi-model pipelines where each step uses the optimal model for the job.
In this architecture, 80% of requests hit the cheapest model (Qwen-Plus at $0.05/1M tokens), and only the complex 20% escalate to more expensive models. The result: you get frontier-quality responses at an average cost of about $0.08 per million tokens.
from openai import OpenAI client = OpenAI( api_key="nvai-your-api-key", base_url="https://aiapi-pro.com/v1" ) def classify_query(query: str) -> str: """Use cheap Qwen-Plus to classify the query.""" r = client.chat.completions.create( model="qwen-plus", messages=[ {"role": "system", "content": "Classify the user query into: SIMPLE, REASONING, or LONG_DOC. Reply with just the category."}, {"role": "user", "content": query} ], max_tokens=10 ) return r.choices[0].message.content.strip() def route_and_respond(query: str, context: str = "") -> str: """Route to the optimal model based on query type.""" category = classify_query(query) model_map = { "SIMPLE": "qwen-plus", # $0.05/1M — fast & cheap "REASONING": "deepseek-v3.2", # $0.20/1M — strong reasoning "LONG_DOC": "moonshot-v1-128k",# $0.60/1M — 128K context } model = model_map.get(category, "qwen-plus") messages = [{"role": "user", "content": query}] if context: messages.insert(0, {"role": "system", "content": context}) r = client.chat.completions.create(model=model, messages=messages) return r.choices[0].message.content # Example usage print(route_and_respond("What's 2+2?")) # → qwen-plus print(route_and_respond("Prove the Riemann hypothesis")) # → deepseek
Let's say your application handles 100,000 API calls per day with an average of 500 input tokens and 200 output tokens per call:
| Strategy | Daily Cost | Monthly Cost |
|---|---|---|
| GPT-4o for everything | $15.00 | $450 |
| DeepSeek for everything | $1.40 | $42 |
| Multi-model routing | $0.56 | $17 |
Multi-model routing on NovAI costs 96% less than GPT-4o and 60% less than using a single cheap model, because the fast classifier adds minimal overhead while ensuring you only pay for expensive models when you actually need them.
$2 credit for new users · No card required · OpenAI-compatible API
Summarize-then-analyze: Use Moonshot-128K to summarize a long document, then pass the summary to DeepSeek for deeper analysis. This gives you the benefits of long context at a fraction of the cost of running DeepSeek on the full document.
Generate-then-validate: Use Qwen-Plus to generate a draft response, then pass it to DeepSeek to check for errors and improve quality. The validation step catches mistakes while keeping average costs low.
Multilingual pipeline: Use Qwen-Max for Chinese content (it has the best Chinese training data), DeepSeek for code and math, and route everything else to Qwen-Plus. One API key handles all of it.
Access DeepSeek, Qwen, Doubao, GLM at the cheapest price. OpenAI-compatible. No credit card required.
🚀 Sign Up Free — Get $2.00 CreditOpenAI-compatible API — just change base_url and your API key
d>.5){umami.track("scroll-50%",{page:p});window._s50=!0}if(!window._s90 d>.9){umami.track("scroll-90%",{page:p});window._s90=!0}});var started=Date.now(),fired={};setInterval(function(){var s=(Date.now()-started)/1000;[30,60,120,300].forEach(function(t){if(s>=t !fired[t]){umami.track("time-"+t+"s",{page:p});fired[t]=!0}});},5000);})() 前 -->
NovAI support — usually replies within a few hours.
Email us Read the docs API referenceWe'll reply to your email within a few hours.
d>.5){umami.track("scroll-50%",{page:p});window._s50=!0}if(!window._s90 d>.9){umami.track("scroll-90%",{page:p});window._s90=!0}});var started=Date.now(),fired={};setInterval(function(){var s=(Date.now()-started)/1000;[30,60,120,300].forEach(function(t){if(s>=t !fired[t]){umami.track("time-"+t+"s",{page:p});fired[t]=!0}});},5000);})()