Skip to main content
Glama

novai-python

OpenAI-compatible SDK + MCP server for 120+ Chinese frontier AI models (DeepSeek, Qwen, GLM, Kimi, Seedance, MiniMax, Hunyuan, CogVideoX, ...) via NovAI — one key, one endpoint, 0% platform fee (raw provider list price; vs OpenRouter ~5.5% markup).

  • Endpoint: https://aiapi-pro.com/v1 (change one base_url line from any OpenAI code)

  • Free: $2 signup credit, no card; plus 5 free models (no credit charge; 10 calls/day on the free tier) (glm-4.7-flash, glm-4.6v-flash, glm-4.1v-thinking-flash, cogview-3-flash, cogvideox-flash)

  • Live pricing: https://aiapi-pro.com/china-ai-leaderboard.json

Install

PyPI package name: aiapi-pro (import name: novai). Once published:

pip install aiapi-pro
export NOVAI_API_KEY=nvai-...   # https://aiapi-pro.com/register ($2 free)

From source (always current):

pip install git+https://github.com/vvvvking/novai-python.git
export NOVAI_API_KEY=nvai-...   # https://aiapi-pro.com/register ($2 free)

Related MCP server: avots-mcp

SDK quickstart

from novai import chat, list_models, generate_image, pricing

print(chat("deepseek-v4-flash", "Explain MCP in one sentence."))
print(generate_image("cogview-3-flash", "a red panda astronaut"))  # free model
print(pricing()["categories"][0]["models"][0])  # cheapest chat model, live

Any existing OpenAI code works by swapping the base URL:

from openai import OpenAI
c = OpenAI(base_url="https://aiapi-pro.com/v1", api_key="nvai-...")

MCP server

Expose the models as tools to any MCP client (Claude Desktop, Cursor, Cline, ...):

{
  "mcpServers": {
    "novai": {
      "command": "python",
      "args": ["-m", "novai.mcp_server"],
      "env": { "NOVAI_API_KEY": "nvai-..." }
    }
  }
}

Tools provided: novai_list_models, novai_chat, novai_generate_image, novai_free_models, novai_cheapest, novai_pricing_feed, novai_transparency.

Transparency

0% platform fee, 1.0x price multiplier, $5 min top-up, 60 req/min, unused-balance 7-day refund, failed video/3D jobs refunded in full. Machine-readable: https://aiapi-pro.com/transparency.json. Chinese image models apply a visible "AI-generated" corner watermark per China labeling rules (https://aiapi-pro.com/watermark-notice).

License

MIT

Available Tools

7 tools
novai_chatA

Send a chat completion to a Chinese LLM (DeepSeek, Qwen, GLM, Kimi, MiniMax, Doubao...).

Args: model: model id from novai_list_models (e.g. deepseek-v4-flash). prompt: user message. system: optional system prompt. Returns the assistant reply as text. Requires NOVAI_API_KEY. For image generation use novai_generate_image instead.

Inputs: model (required), prompt (required), system. Returns: result

novai_cheapestA

Return the cheapest model in one category from the live price leaderboard.

Args: category: one of "Chat / LLM", "Image", "Video", "3D", "Audio", "Embedding" (default "Chat / LLM"). Returns a single model record with name, price_usd, unit and url. Use novai_pricing_feed when you need the full ranked feed across all categories.

Inputs: category.

novai_free_modelsA

List the 5 models that are free to call on NovAI (GLM Flash family: text, vision, image, video).

Use when the user wants zero-cost calls. These models are charged $0 but have a free-tier rate limit (10 free-model calls/day, 5 requests/min). For the full paid+free catalogue use novai_list_models. Returns a list of model ids.

Inputs: no named parameters. Returns: result

novai_generate_imageA

Generate images with a Chinese image model (Seedream, Hunyuan Image, CogView, Wan...).

Args: model: image model id (e.g. doubao-seedream-5.0, cogview-3-flash). prompt: image description. Returns a list of generated image URLs. Billed per image: check novai_pricing_feed for the per-image price before calling. For chat use novai_chat instead.

Inputs: model (required), prompt (required). Returns: result

novai_list_modelsA

List every model id available on the NovAI gateway (111 models).

Use when the user asks which models exist. For zero-cost models use novai_free_models; for prices use novai_cheapest or novai_pricing_feed. Returns a sorted list of model id strings (no prices).

Inputs: no named parameters. Returns: result

novai_pricing_feedA

Return the complete live price leaderboard (all categories, models ranked by normalized cost).

Use for comparisons or cost tables. For one quick answer use novai_cheapest instead. Returns {generated_at, categories: [{category, models: [{name, price_usd, unit, url}]}]}. Units differ (per 1M tokens / per generation / per image / flat) - always compare by unit.

Inputs: no named parameters.

novai_transparencyA

Return NovAI's published platform metrics: 0% platform fee, 1.0x price multiplier, refund policy, rate limits and billed units.

Use when the user asks how billing or pricing policy works. For actual model prices use novai_pricing_feed. Returns a JSON object.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a distinct purpose, and the descriptions explicitly resolve the near-overlaps: novai_list_models vs novai_free_models, and novai_cheapest vs novai_pricing_feed each point to the other with clear 'use X instead' guidance. Chat and image generation are cleanly separated by modality.

    Naming Consistency4/5

    All tools share the novai_ prefix and snake_case, which is highly predictable. Minor deviation: some names are verb-led (novai_chat, novai_list_models, novai_generate_image) while others are noun-led (novai_free_models, novai_cheapest, novai_pricing_feed, novai_transparency), but each is still self-explanatory.

    Tool Count5/5

    Seven tools is well within the ideal range and each one earns its place: model discovery, chat, image generation, and three distinct pricing/policy views. No redundancy or filler.

    Completeness3/5

    Core workflows (discover models, chat, generate images, check pricing/policy) are covered, but the pricing tool exposes Video, 3D, Audio, and Embedding categories with no corresponding callable tools, and there is no multi-turn/conversation-state or token-accounting support. These are notable gaps an agent would hit when users ask for non-chat modalities.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Hosted multi-model AI media + chat MCP server. Generates images, video, audio, face-swaps and talking-avatars, and chats across 300+ models (Claude, GPT, Gemini, DeepSeek…) - all from one balance and one API key.
      16
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server that pools free tiers of multiple LLM providers behind an OpenAI-compatible endpoint, enabling model routing, failover, and usage tracking through tools like tokenmax, capacity, and benchmark.
      1,168 PyPI
      152
      MIT