Getting started
Quickstart
Create an API key, send your first request and find the address for each protocol.
NoviaHub speaks the OpenAI, Anthropic and Gemini protocols. Code that already uses one of those official SDKs can call models on NoviaHub by changing only the address and the API key.
-
Create an API key
Sign in at noviahub.com (see Signing in and your account), open API Keys in the console, click Create API Key, enter a name and click Save changes. Then click the masked key in the list and copy the full key (it starts with
sk-). API keys explains every option.Usage is charged to your account balance, and requests fail once the balance runs out. You can top up in Wallet; see Wallet and top-ups.
-
Put the key in an environment variable
Keeping the key in an environment variable lets code and tools read it without writing the key into your code. The commands below only apply to the current terminal window; to keep the variable, add the line to the end of
~/.zshrcor~/.bashrc.终端窗口 export NOVIAHUB_API_KEY="sk-..."终端窗口 $env:NOVIAHUB_API_KEY = "sk-..." -
Send your first request
This calls
deepseek-v4-flashthrough the OpenAI-compatible Chat Completions API. To use another model, changemodel; model IDs are listed under Models & Pricing.终端窗口 curl https://noviahub.com/v1/chat/completions \-H "Authorization: Bearer $NOVIAHUB_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "deepseek-v4-flash","messages": [{"role": "user", "content": "Introduce yourself in one sentence."}]}'import osfrom openai import OpenAIclient = OpenAI(base_url="https://noviahub.com/v1",api_key=os.environ["NOVIAHUB_API_KEY"],)completion = client.chat.completions.create(model="deepseek-v4-flash",messages=[{"role": "user", "content": "Introduce yourself in one sentence."}],)print(completion.choices[0].message.content)import OpenAI from 'openai'const client = new OpenAI({baseURL: 'https://noviahub.com/v1',apiKey: process.env.NOVIAHUB_API_KEY,})const completion = await client.chat.completions.create({model: 'deepseek-v4-flash',messages: [{ role: 'user', content: 'Introduce yourself in one sentence.' }],})console.log(completion.choices[0].message.content)The answer is in
choices[0].message.content. Each call’s usage and cost appear under Usage Logs in the console.
Addresses
Section titled “Addresses”All three protocols use the same API key. They differ in the address and in the header that carries the key:
| Protocol | SDK base URL | Auth header |
|---|---|---|
| OpenAI-compatible | https://noviahub.com/v1 |
Authorization: Bearer <key> |
| Anthropic Messages | https://noviahub.com |
x-api-key: <key>; Authorization: Bearer <key> also works |
| Gemini | https://noviahub.com |
x-goog-api-key: <key> |
The Anthropic and Google Gen AI SDKs append /v1/messages and /v1beta/models/... themselves, so their base URL is the bare domain, without /v1.
To see which protocols a model supports, open it under Models & Pricing. Its API access section also has ready-made code samples and coding agent configs for that model.