API Documentation

NovaCompute is OpenAI-compatible — if you have used the OpenAI API before, change the base_url and everything else stays the same.

Introduction

One OpenAI-compatible endpoint for 18 models — Claude, GPT, Grok, DeepSeek, Kimi, Mistral, Mercury, GLM, Qwen, Gemini and ERNIE — plus two Gemini TTS voices. Chat requests are auto-routed to a healthy provider; TTS returns audio bytes. Billing is per token for chat and per 1,000 characters for speech.

Base URL: https://YOUR-DOMAIN/v1

Quick Start

  1. Create an API key in the Dashboard → API Keys.
  2. Export it as an environment variable: NOVA_API_KEY
  3. Make your first request with cURL, Python or Node below — any OpenAI SDK works.
curl https://YOUR-DOMAIN/v1/chat/completions \
  -H "Authorization: Bearer $NOVA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "glm-5.3-flash",
  "messages": [{ "role": "user", "content": "Hello, Nova!" }]
}'
from openai import OpenAI
import os

client = OpenAI(
    base_url="https://YOUR-DOMAIN/v1",
    api_key=os.environ["NOVA_API_KEY"],
)

response = client.chat.completions.create(
    model="glm-5.3-flash",
    messages=[{"role": "user", "content": "Hello, Nova!"}],
)

print(response.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://YOUR-DOMAIN/v1",
  apiKey: process.env.NOVA_API_KEY,
});

const response = await client.chat.completions.create({
  model: "gpt-6-luna",
  messages: [{ role: "user", content: "Hello, Nova!" }],
});

console.log(response.choices[0].message.content);

Authentication

All API requests are authenticated with a Bearer token in the Authorization header. Create and manage keys in the dashboard.

Authorization: Bearer $NOVA_API_KEY
Never expose API keys in client-side code, browsers, or public repositories. If a key leaks, delete it in the dashboard and create a new one.

Create chat completion

POST https://YOUR-DOMAIN/v1/chat/completions

Request body

Parameter Type Required Description
modelstringYesModel ID, e.g. glm-5.3-flash. See the Models list.
messagesarrayYesConversation so far — objects with role (system / user / assistant) and content.
content partsarrayNoFor images, set content to an array of {"type":"text"} and {"type":"image_url"} parts. Models with the IMG badge accept images.
temperaturenumberNoSampling temperature 0–2. Higher is more creative. Default 1.
max_tokensintegerNoUpper bound on generated tokens for this completion.
streambooleanNoIf true, tokens are sent as server-sent events. Default false. See Streaming.

Pick a model

Every chat model uses the same endpoint — only the model ID changes.

Use case Model ID Notes
Best coding / reasoningclaude-opus-5.51M context · image input
Fast general chatgpt-6-luna900K context · image input
Cheapest paiddeepseek-v4.1-flash-1017$0.005 in / $0.24 out per 1M
Long multimodalgemini-4-argon1M context · image + video
Image + video inkimi-k3.1-pro1M context · IMG + VID
Free tierqwen/qwen3.7-flash:free$0.00 · 1M context · IMG + VID
Speechgemini-3.8-flash-ttsUse /v1/audio/speech

Image input

Send an image URL (HTTPS or data:) as an image_url part. The model must be marked IMG in the model table.

curl https://YOUR-DOMAIN/v1/chat/completions \
  -H "Authorization: Bearer $NOVA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-4-argon",
  "messages": [{
    "role": "user",
    "content": [
      { "type": "text", "text": "Describe this image in one sentence." },
      { "type": "image_url", "image_url": { "url": "https://example.com/photo.jpg" } }
    ]
  }]
}'

Video input is only available on models marked VID. The accepted video part is provider-specific — contact support for the exact schema before sending video.

Response

{
  "id": "chatcmpl-9f2c84ab",
  "object": "chat.completion",
  "created": 1762830000,
  "model": "glm-5.3-flash",
  "choices": [
    {
      "index": 0,
      "message": { "role": "assistant", "content": "Hello! How can I help you today?" },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 9,
    "total_tokens": 21
  }
}

Streaming

Set "stream": true to receive tokens as server-sent events as they are generated. The stream terminates with a data: [DONE] line.

data: {"id": "chatcmpl-9f2c84ab", "choices": [{"delta": {"content": "Hel"}}]}

data: {"id": "chatcmpl-9f2c84ab", "choices": [{"delta": {"content": "lo!"}}]}

data: [DONE]
stream = client.chat.completions.create(
    model="gpt-6-luna",
    messages=[{"role": "user", "content": "Write a haiku about GPUs."}],
    stream=True,
)

for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")
const stream = await client.chat.completions.create({
  model: "gpt-6-luna",
  messages: [{ role: "user", content: "Write a haiku about GPUs." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}

Text-to-Speech

Two Gemini TTS models turn text into audio. The endpoint follows the OpenAI /audio/speech shape and returns raw audio bytes. Billing is per 1,000 input characters.

POST https://YOUR-DOMAIN/v1/audio/speech

Request body

Parameter Type Required Description
modelstringYesgemini-3.8-flash-lite-tts or gemini-3.8-flash-tts.
inputstringYesThe text to synthesize. Keep each request under a few thousand characters for best latency.
voicestringNoVoice name. Defaults to Kore.
extra fieldsanyNoAdditional audio options are forwarded to the upstream provider; supported values depend on the model.

Pricing

Model Price Best for
gemini-3.8-flash-lite-tts$0.0055 / 1k charsHigh-volume narration, short prompts
gemini-3.8-flash-tts$0.0080 / 1k charsMore natural delivery, longer scripts

1,000 characters costs $0.0055 (Lite) or $0.0080 (Full). Failed requests are not billed.

cURL

curl https://YOUR-DOMAIN/v1/audio/speech \
  -H "Authorization: Bearer $NOVA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-3.8-flash-tts",
  "input": "Hello from NovaCompute. This is a speech test.",
  "voice": "Kore"
}' \
  --output speech.wav

Use --output — the response body is audio, not JSON.

Python

import os, requests

response = requests.post(
    "https://YOUR-DOMAIN/v1/audio/speech",
    headers={"Authorization": f"Bearer {os.environ['NOVA_API_KEY']}"},
    json={
        "model": "gemini-3.8-flash-tts",
        "input": "Hello from NovaCompute.",
        "voice": "Kore",
    },
    timeout=60,
)
response.raise_for_status()

with open("speech.wav", "wb") as f:
    f.write(response.content)

Browser (demo only)

Never ship an API key in client-side code. For a quick local demo, proxy the request through your own server. The Playground already does this and plays the result.

const response = await fetch("/v1/audio/speech", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "gemini-3.8-flash-tts",
    input: "Hello from NovaCompute.",
    voice: "Kore",
  }),
});

const blob = await response.blob();
const audio = new Audio(URL.createObjectURL(blob));
audio.play();

Response: binary audio (audio/wav or audio/mpeg, depending on the upstream). Save the bytes with the matching extension.

Try limit: the Playground allows 5 TTS requests per day per account. API keys are billed per 1,000 characters and count toward the plan TTS cap (20/60/150 per day) and the account daily request cap.

Long text: split scripts into chunks (sentence boundaries work well) and concatenate the audio on your side.

Models

Pass any of these IDs in the model field. IMG and VID show accepted media input.

Model API ID · context Media Input / 1M Output / 1M

Prices are per 1M tokens unless marked per 1,000 characters. Free models cost $0.00.

Billing

Every account has a USD balance. Chat requests are charged per token at the model's input/output rate; TTS is charged per 1,000 characters. Failed requests from our side (5xx) are not billed. You can top up and see itemised usage in Dashboard → Billing.

Subscriptions

Sub plans replace per-token billing with a daily paid-token quota. Free models stay unlimited (fair use), and premium models include a smaller daily token allowance (shown on Models). PayPal is captured server-side and activates the plan automatically. Bank transfers auto-credit when a bank webhook is connected; otherwise support verifies the receipt before activation. Activation also adds bonus credit: Starter +$3, Pro +$5, Ultra +$12. After the daily quota is used, further paid requests bill from your balance instead of blocking.

Plan Price Quota tokens / day TTS / day
Starter$4.99/mo1.5M20 requests
Pro$12.99/mo6M60 requests
Ultra$29.99/mo20M150 requests

Quotas reset daily. See Pricing for the full comparison and checkout.

What is billed

  • Chat: input tokens + output tokens, at the rates in the model table.
  • TTS: input characters only — $0.0055 or $0.0080 per 1,000 characters.
  • Free models: $0.00, no balance required.
  • Failed requests (5xx from NovaCompute): $0.00.

Errors

Errors return a consistent JSON shape:

{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit reached: 600 requests per minute."
  }
}
Status Type Meaning
400invalid_request_errorMalformed body, missing parameter, or a TTS model used on the chat endpoint.
401authentication_errorMissing or invalid API key.
402insufficient_balance_errorBalance exhausted — top up in the dashboard.
429rate_limit_errorRate cap hit, or the Playground try_limit_reached (5/day). Retry with backoff.
502upstream_errorEvery upstream attempt failed. The request is not billed — retry or switch model.
500 / 503server_errorTemporary service issue — not billed. Auto-routing usually retries for you.

Rate limits

Every API key has a requests-per-minute cap and a daily request cap. Limits are checked before the upstream call; over-limit requests return 429 with Retry-After and rate-limit headers.

Limit Value Applies to
Playground “Try”5 requests / dayAccount (chat + TTS combined)
Free balance30 RPM · 500 / dayPer API key
Pay-as-you-go120 RPM · 5,000 / dayPer API key with a funded balance
Starter60 RPM · 1,000 / dayPer API key
Pro300 RPM · 5,000 / dayPer API key
Ultra600 RPM · 20,000 / dayPer API key
TTSCounts as 1 requestPlan TTS caps: 20 / 60 / 150 per day

Need a guaranteed RPM or SLA? Contact sales for a committed-use tier.