SDKs

Python and Node.js, ready in 5 lines.

Install the package, import the client, make your first call. No boilerplate, no mystery — same OpenAI-compatible surface in both languages.

Install
pip install northgate-sdk
Install
npm install northgate-sdk
Your first call — 5 lines
from northgate import NorthgateClient client = NorthgateClient(api_key="YOUR_API_KEY") response = client.chat.completions.create( model="gpt-4o-mini", messages=[{"role": "user", "content": "Hello"}]) print(response["choices"][0]["message"]["content"])
Your first call — 5 lines
const { NorthgateClient } = require("northgate-sdk"); const client = new NorthgateClient({ apiKey: "YOUR_API_KEY" }); const response = await client.chat.completions.create({ model: "gpt-4o-mini", messages: [{ role: "user", content: "Hello" }] }); console.log(response.choices[0].message.content);
Quick API reference
Method Parameters Return type
Python · NorthgateClient(api_key, base_url="...", route="balanced") api_key (str, required), base_url (str), route (str) Client instance exposing client.chat.completions
Node · new NorthgateClient({ apiKey, baseUrl, route }) apiKey (string, required), baseUrl (string), route (string) Client instance exposing client.chat.completions
client.chat.completions.create(...) model (str, required), messages (list, required), plus any **kwargs (temperature, max_tokens, stream, route, …) Parsed JSON dict / object: { choices: [{ message: { content: … } }], usage: { … } }
Routing strategies

Default is balanced. Pass route to the constructor or per-call.

cheapest
Together AI → Groq → Fireworks AI → OpenAI → Anthropic
fastest
Groq → Fireworks AI → Together AI → OpenAI → Anthropic
balanced
Together AI → Fireworks AI → Groq → OpenAI → Anthropic
best_quality
Together AI → Fireworks AI → Anthropic → OpenAI → Groq
Full examples

Streaming, function calling, error handling, and per-call route overrides — in the repo.

Need an API key first?

Sign up and get a key in under a minute.

Get API Key