Skip to content

NovaStackAI/novapai-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

NovaPAI Python SDK Example 🐍

Use NovaPAI in Python — OpenAI-compatible API gateway for DeepSeek V4 Pro & 50+ LLMs. Change one line of code, switch to any model.

License API Python

What is NovaPAI?

NovaPAI is an OpenAI-compatible API gateway that gives you access to top-tier LLMs like DeepSeek V4 Pro, GPT-4, Claude, Gemini (50+ models) through the standard OpenAI SDK. If you know how to use the OpenAI API, you already know how to use NovaPAI — just change the base_url.

Quick Start

1. Get an API Key

Sign up at novapai.ai to get your free API key.

2. Install the SDK

pip install openai

3. Run the Example

git clone https://github.com/NovaStackAI/novapai-python.git
cd novapai-python
export NOVAPAI_API_KEY="your-api-key"
python example.py

Examples Included

All examples are in example.py:

# Example Description
1 Basic Chat Single-turn chat completion
2 Streaming Real-time token-by-token output
3 Multi-turn Conversation Context-aware multi-message dialogue
4 Function Calling Define tools, let the model decide which to call
5 JSON Mode Structured JSON output for data extraction
6 List Models Fetch all available models

Core Concept

# Standard OpenAI SDK — just change base_url!
from openai import OpenAI

client = OpenAI(
    api_key="your-novapai-key",
    base_url="https://api.novapai.ai/router/v1"  # ← Only this line changes!
)

response = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

That's it. The OpenAI SDK you already know works directly with NovaPAI. No new SDK to learn, no new API surface.

Why NovaPAI?

  • OpenAI-Compatible — Use any OpenAI SDK in any language
  • 50+ Models — DeepSeek V4 Pro, GPT-4, Claude, Gemini and more
  • One API Key — All models, one account
  • No Vendor Lock-in — Switch models with one line change
  • Free Tier Available — Start building with free credits

All SDK Examples

Browse all our SDK examples:

Links


Made with ❤️ by NovaStackAI

About

NovaPAI Python SDK example — OpenAI-compatible API gateway for DeepSeek V4 Pro & 50+ LLMs. One line change to switch models.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages