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_chatC

Chat with a Chinese LLM (DeepSeek, Qwen, GLM, Kimi, MiniMax, Doubao...).

NameRequiredDescriptionDefault
modelYes
promptYes
systemNo

Output Schema

NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden, yet it says nothing about cost implications, latency/blocking behavior, streaming, or error handling when a model name is invalid. The presence of an output schema covers the return value, but the operational profile of a paid LLM call is undisclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single tight sentence that front-loads the core purpose and gives useful examples. The trailing ellipsis is slightly vague about the exact model list, which novai_list_models would presumably resolve.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema handles return values, but with three parameters at 0% schema coverage, no annotations, and a crowded sibling set requiring differentiation, the definition leaves too much for the agent to infer. It should at minimum clarify cost/selection posture and the role of the system prompt.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% — parameters have only bare titles — but the description compensates for the most important one by naming concrete model values (DeepSeek, Qwen, GLM, Kimi, MiniMax, Doubao), which the schema provides no enum for. The 'prompt' and 'system' parameters remain undocumented, but their intent is largely self-evident from their names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (chat) and resource (Chinese LLM) and enumerates representative models, so an agent knows exactly what it does. It does not, however, distinguish itself from siblings like novai_cheapest or novai_free_models, which could plausibly also send a prompt to an LLM.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus novai_cheapest (presumably cost-optimized) or novai_free_models (presumably free-tier). With six siblings in the same family, the absence of any routing context leaves the agent to guess.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

novai_cheapestB

Cheapest model in a category from the live first-party price leaderboard.

NameRequiredDescriptionDefault
categoryNoChat / LLM

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It discloses the data source ('live first-party price leaderboard'), which adds useful context, but does not describe what is returned (e.g., model details, price fields), handling of missing categories, or that it is a read-only lookup.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that states the core purpose without any filler. Every word contributes to identifying the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with no annotations or output schema, the description is minimally adequate. It conveys purpose and data source but omits important context such as accepted category values, the default category, and the shape of the returned result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single 'category' parameter has 0% schema description coverage, so the description must compensate. It only references 'a category' without listing valid categories, clarifying the default ('Chat / LLM'), or explaining whether omission selects a default category.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool returns the cheapest model in a category from a live first-party price leaderboard. It identifies the resource and distinguishing quality (cheapest), but does not explicitly contrast itself with siblings like novai_pricing_feed or novai_list_models.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'in a category' implies usage for finding the lowest-priced model within a category, but there is no explicit guidance on when to choose this tool over alternatives such as novai_pricing_feed or novai_free_models. No exclusions or prerequisites are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

novai_free_modelsB

Models that are free and unlimited on NovAI (no token cap).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden, and it does disclose a useful trait: the models have no token cap. However, it does not explicitly state that this is a read-only listing, whether any authentication is required, or other operational behavior. For a zero-parameter listing tool this is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single compact sentence with zero wasted words, and the key qualifier 'no token cap' is front-loaded. It is appropriately sized for a simple zero-parameter listing tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple zero-parameter schema, existing output schema, and absence of annotations, the description provides enough core context about what data is returned. The main remaining gap is lack of explicit action phrasing and sibling routing, which is minor for such a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is no parameter semantics to explain and the schema is trivially complete. Baseline 4 is appropriate because the description does not need to compensate for any parameter documentation gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies the returned resource (free, unlimited models with no token cap) but uses a noun phrase with no action verb, so it does not explicitly say it lists or returns models. It adds the meaningful qualifier 'no token cap' beyond the tool name, but does not clearly distinguish itself from siblings like novai_list_models.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to use this tool versus alternatives such as novai_list_models or novai_cheapest. The implied use case is retrieving free models, but no conditions, exclusions, or sibling routing are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

novai_generate_imageC

Generate images with Chinese image models (Seedream, Hunyuan, CogView...).

NameRequiredDescriptionDefault
modelYes
promptYes

Output Schema

NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It does not disclose authentication needs, cost implications, rate limits, latency/sync behavior, content-policy constraints, or what happens on generation failure. The presence of an output schema reduces the need to explain return values, but critical operational traits remain unstated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is a single front-loaded sentence with no filler or redundancy. It is concise, though its brevity reflects under-specification rather than deliberate economy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a generation tool with no annotations, zero schema description coverage, and only two parameters, the description is too thin. The output schema helps with return values, but the definition lacks guidance on model selection, cost, constraints, and expected behavior — information an agent needs to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema documents both parameters only as bare titles with 0% description coverage. The description mentions model families in passing but does not explain how they map to the `model` parameter, nor does it add any meaning about the `prompt` parameter. With two undocumented parameters, the description does not compensate for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource — generating images — and names concrete model families (Seedream, Hunyuan, CogView). It is distinguishable from siblings, which are chat/model-listing/pricing tools rather than image generators, though it does not explicitly contrast with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives, no prerequisites, and no exclusions. The model-family examples hint at available options but do not tell an agent which model to pick or under what circumstances.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

novai_list_modelsA

List all Chinese AI model ids live on the NovAI gateway.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden; it does at least disclose that the list is 'live', implying a dynamically fetched rather than cached result. It says nothing about authentication requirements, rate limits, ordering, or whether the list can change between calls — meaningful gaps even for a zero-parameter read.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler — the resource and scope arrive immediately, and nothing is repeated from structured fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description need not explain return values, and a zero-parameter read tool needs little else. The remaining omission is whether the call requires credentials or has usage constraints, which keeps it just under a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing for the description to disambiguate; the baseline of 4 applies. No parameter detail is needed or missing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('List') and resource ('Chinese AI model ids') plus the scope qualifier 'live on the NovAI gateway', so the agent knows it enumerates model identifiers. It does not explicitly name or distinguish itself from the sibling novai_free_models, which sounds adjacent, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The implication is that this is the tool for discovering available model ids, but there is no explicit when-to-use guidance, no mention of when to prefer novai_free_models or novai_cheapest instead, and no stated prerequisites such as authentication.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

novai_pricing_feedA

Full live price leaderboard (all categories, cheapest-first).

NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of disclosure. It reveals that the data is live, covers all categories, and is ordered cheapest-first, but it does not mention pagination, freshness limits, rate limits, or response structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single compact phrase with zero wasted words. The key scope information, 'full live price leaderboard (all categories, cheapest-first),' is front-loaded and immediately useful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, no-output-schema listing tool, the description tells the agent what the tool returns and how it is scoped. It is nearly complete, though it could say more about the return format or data freshness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is no parameter semantics to explain, and the baseline for zero parameters is 4. The description adds no misleading parameter guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies a specific resource: a live price leaderboard covering all categories, ordered cheapest-first. It is distinguishable from narrower siblings like novai_cheapest and novai_list_models by emphasizing 'full' and 'all categories,' though it does not explicitly name an alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied: use this for the complete leaderboard rather than a filtered or single-cheapest result. However, the description does not explicitly state when to choose this over novai_cheapest or other siblings, nor does it provide exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

novai_transparencyC

Platform hard metrics: 0% platform fee, 1.0x multiplier, refunds, limits.

NameRequiredDescriptionDefault

No parameters

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It lists content categories but does not disclose whether the operation is read-only, whether the metrics are static or current, whether authentication is required, or what the response looks like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence fragment with no wasted prose, but it is under-specified rather than effectively concise. It front-loads the topic area but not an actionable verb or scope.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple zero-parameter tool, the description gives a minimal indication of the metric areas covered. However, with no annotations and no output schema, it should more clearly state what is returned and whether the values reflect current platform policy.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and full schema coverage, so there are no parameter semantics for the description to clarify. The baseline for a parameterless tool applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a resource area, 'Platform hard metrics,' and lists topics such as fee, multiplier, refunds, and limits, but never states the operative verb (retrieve, return, display) or clarifies what 'hard metrics' means. It also does not distinguish this tool from siblings like novai_pricing_feed, leaving the exact purpose only partially inferable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to use this tool, when not to use it, or which sibling tool to choose instead. The agent must infer usage from the name and the terse metric list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 7 tool updatesv0.1.1
    • First observednovai_chat
    • First observednovai_cheapest
    • First observednovai_free_models
    • First observednovai_generate_image
    • First observednovai_list_models
    • First observednovai_pricing_feed
    • First observednovai_transparency

TDQS

B3.4/5.0

Scored across 7 tools

Disambiguation4/5

The tools mostly have distinct purposes: chat, image generation, model listing, pricing leaderboard, cheapest option, free models, and platform transparency. However, novai_cheapest, novai_free_models, novai_list_models, and novai_pricing_feed all revolve around model selection and pricing, which could cause some overlap confusion.

Naming Consistency4/5

All tools use a consistent novai_ prefix and snake_case, making them predictable. Yet the naming mixes verbs (chat, generate_image, list_models) with adjectives/nouns (cheapest, free_models, pricing_feed, transparency), a minor deviation from a strict verb_noun pattern.

Tool Count5/5

Seven tools is well-scoped for an AI model gateway, with each tool covering a distinct capability such as chatting, image generation, model discovery, pricing, and transparency. No tool feels redundant or missing from a count perspective.

Completeness4/5

The surface covers core gateway operations: model listing, pricing discovery, free/cheapest model lookup, chat, image generation, and platform metrics. Minor gaps like account balance, usage tracking, or embeddings support are not critical for the stated purpose but could be useful.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers