推理提供商文档

Novita

Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

Novita

所有受支持的 Novita 模型都可以在这里找到。

Novita 是 AI 开发者寻求低成本、可靠且简单的 AI 模型发布解决方案的首选推理平台。

提供 200 多个 API(LLM、图像、视频、音频),并提供完全托管的部署——企业级、可扩展且免维护。

支持的任务

聊天补全 (LLM)

了解更多关于聊天补全 (LLM) 的信息,请点击这里

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="novita",
    api_key=os.environ["HF_TOKEN"],
)

completion = client.chat.completions.create(
    model="openai/gpt-oss-120b",
    messages=[
        {
            "role": "user",
            "content": "What is the capital of France?"
        }
    ],
)

print(completion.choices[0].message)

聊天补全 (VLM)

了解更多关于聊天补全 (VLM) 的信息,请点击这里

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="novita",
    api_key=os.environ["HF_TOKEN"],
)

completion = client.chat.completions.create(
    model="zai-org/GLM-4.1V-9B-Thinking",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Describe this image in one sentence."
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
                    }
                }
            ]
        }
    ],
)

print(completion.choices[0].message)

文本到视频

了解更多关于文本到视频的信息,请点击此处

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="novita",
    api_key=os.environ["HF_TOKEN"],
)

video = client.text_to_video(
    "A young man walking on the street",
    model="Wan-AI/Wan2.1-T2V-14B",
)
< > 在 GitHub 上更新