LangChain is the most popular framework for building LLM-powered applications. Since NovAI provides an OpenAI-compatible API, integrating DeepSeek into LangChain takes just a few lines of code.
from langchain_openai import ChatOpenAI
# Point LangChain to NovAI's endpoint
llm = ChatOpenAI(
model="deepseek-v3.2",
openai_api_key="your-novai-api-key",
openai_api_base="https://aiapi-pro.com/v1",
temperature=0.7,
)
response = llm.invoke("Explain the difference between RAG and fine-tuning")
print(response.content)
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
llm = ChatOpenAI(
model="deepseek-v3.2",
openai_api_key="your-novai-api-key",
openai_api_base="https://aiapi-pro.com/v1",
)
prompt = ChatPromptTemplate.from_messages([
("system", "You are an expert {topic} tutor. Explain concepts clearly."),
("human", "{question}"),
])
chain = prompt | llm
result = chain.invoke({"topic": "Python", "question": "What are decorators?"})
print(result.content)
$5 credit for new users · No card required · OpenAI-compatible API
for chunk in llm.stream("Write a Python quicksort implementation"):
print(chunk.content, end="", flush=True)
Since NovAI hosts multiple models, you can easily switch between them:
# Use DeepSeek for code tasks
code_llm = ChatOpenAI(model="deepseek-v3.2", openai_api_key=KEY, openai_api_base=BASE)
# Use MiniMax for long-context tasks (1M tokens)
long_llm = ChatOpenAI(model="minimax-text-01", openai_api_key=KEY, openai_api_base=BASE)
# Use GLM Flash for free prototyping
free_llm = ChatOpenAI(model="glm-4.6v-flash", openai_api_key=KEY, openai_api_base=BASE)
Same API key, same endpoint, just change the model parameter.
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);})()