A Python skill that provides a unified interface to 42+ NVIDIA NIM API models — LLM chat, vision analysis, text embeddings, image generation, and more.
python
from model_center import ModelCenter
center = ModelCenter()
# List all models
models = center.list_models()
print("Available categories:", list(models.keys()))
# Get model info
info = center.get_model_info('nemotron-3-super-8b')
print(f"Model: {info['name']}, Provider: {info['provider']}")
# Compare pricing
comparisons = center.compare_pricing(['nemotron-3-super-8b', 'llama-3.1-70b-instruct'])
for c in comparisons:
print(f"{c['name']}: ${c['input_price']}/M in, ${c['output_price']}/M out")
# Get recommendations
rec = center.recommend_model('code generation', 'low', False)
print(f"Recommended: {rec}")
# Estimate cost
cost = center.estimate_cost('nemotron-3-super-8b', 1000, 500)
print(f"Estimated cost: ${cost['total_cost']}")
# Chat with a model (requires NVIDIA_API_KEY env var)
# response = center.chat_completion(
# model='nemotron-3-super-8b',
# messages=[{'role': 'user', 'content': 'Hello'}],
# temperature=0.7,
# max_tokens=100
# )
Get an API key from build.nvidia.com
Set the NVIDIA_API_KEY environment variable:
powershell
$env:NVIDIA_API_KEY = "nvapi-..."
Install dependency: pip install requests
Import and use ModelCenter or NVIDIAAPIClient from model_center.py
MethodDescriptionlist_models(category)List all models or by categoryget_model_info(model_id)Get detailed model informationcompare_pricing(model_ids)Compare pricing across modelsrecommend_model(use_case, budget, need_vision)AI-powered model recommendationestimate_cost(model, input_tokens, output_tokens)Estimate API call costchat_completion(model, messages, ...)Chat completion API callgenerate_image(model, prompt, ...)Image generation API callget_embedding(model, input_text)Embedding API callchat(model, message, system_prompt)Simple chat interface
The implementation lives in model_center.py (548 lines) in this skill directory.
学习时间: 2026-06-01 20:57
u-blox: u-center 2系列视频1:如何下载、安装以及首次运行u-center 2
大虾试车真香: 【大虾沉浸式试驾】Model 3长续航全轮驱动版 👉百公里加速·隔音·电耗全知道!
学习时间: 2026-06-01 21:02
融合时间: 自动合并
学习时间: 2026-06-01 21:08
学习时间: 2026-06-02 09:21
学习时间: 2026-06-02 09:34