novapai-go

command module
v0.0.0-...-a32a03d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: MIT Imports: 7 Imported by: 0

README ΒΆ

NovaPAI Go SDK Example πŸ”΅

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

License API Go

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
go get github.com/sashabaranov/go-openai
3. Run the Example
git clone https://github.com/NovaStackAI/novapai-go.git
cd novapai-go
export NOVAPAI_API_KEY="your-api-key"
go run main.go

Examples Included

All examples are in main.go:

# 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:


Made with ❀️ by NovaStackAI

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL