模型
比較 60+ 顶尖 AI 模型的定價、性能和特性,通过統一 API 無縫集成。
{{ model.name }}
{{ model.provider }}
{{ model.description }}
輸入:
{{commonSite.currencySymbol}}{{ band.input }}{{ band.unit_suffix }}
輸出:
{{commonSite.currencySymbol}}{{ band.output }}{{ band.unit_suffix }}
命中緩存:
{{commonSite.currencySymbol}}{{ band.cache_read }}{{ band.unit_suffix }}
緩存創建:
{{commonSite.currencySymbol}}{{ band.cache_creation }}{{ band.unit_suffix }}
{{ band.range_label }}
輸入:
{{commonSite.currencySymbol}}{{ band.input }}{{ band.unit_suffix }}
輸出:
{{commonSite.currencySymbol}}{{ band.output }}{{ band.unit_suffix }}
命中緩存:
{{commonSite.currencySymbol}}{{ band.cache_read }}{{ band.unit_suffix }}
緩存創建:
{{commonSite.currencySymbol}}{{ band.cache_creation }}{{ band.unit_suffix }}
計費:
{{commonSite.currencySymbol}}{{ model.callPrice.price }}{{ model.callPrice.unit_suffix }}
{{ price.label }}
文本生成: {{commonSite.currencySymbol}}{{ price.text }}{{ price.unit_suffix }}
視頻輸入: {{commonSite.currencySymbol}}{{ price.video }}{{ price.unit_suffix }}
對比模型
| 比較項 |
{{ model.name }}
{{ model.provider }}
|
|---|---|
| 模型分類 | {{ model.categoryLabel || '-' }} |
| 計費模式 | {{ model.billingModeLabel }} |
| 上下文長度 | {{ model.contextLength }} |
| 價格配置 |
{{ group.title }}
{{ row.label }} {{commonSite.currencySymbol}}{{ row.amount }}{{ row.unitSuffix }}
|
| 能力標籤 | {{ model.tagNames.length ? model.tagNames.join('、') : '-' }} |
| 發布日期 | {{ model.releaseDate }} |
添加模型 模型描述
{{ activeModel.description }}
模型能力
發布日期
{{ activeModel.releaseDate }}
輸出能力
上下文長度: {{ activeModel.contextLength }}
{{ group.title }}
{{ row.label }} {{commonSite.currencySymbol}}{{ row.amount }}{{ row.unitSuffix }}
{{ group.title }}
{{ row.label }} {{commonSite.currencySymbol}}{{ row.amount }}{{ row.unitSuffix }}
代碼示例 (Python)
{{ activeModel.description }}
import requests
url = "{{ commonSite.siteType == 'overseas' ? 'https://gw.apismart.ai' : 'https://gw.meowrouter.cn' }}/v1/images/generations"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"model": "{{ activeModel ? activeModel.modelSlug : '模型詳情' }}",
"prompt": "A mountain village in the morning light, ink painting style",
"size": "2K"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
# Image URL (valid for 15 days, please save in time)
print(result["data"][0]["url"])
print(f"Generated {result['usage']['generated_images']} images, cost ¥{result['usage']['generated_images'] * 0.22:.2f}")
import requests
import time
API_KEY = "YOUR_API_KEY"
BASE = "{{ commonSite.siteType == 'overseas' ? 'https://gw.apismart.ai' : 'https://gw.meowrouter.cn' }}"
# 1. Create video task
data = {
"model": "{{ activeModel ? activeModel.modelSlug : '模型詳情' }}",
"content": [
{"type": "text", "text": "A cat running on the beach, cinematic, sunset, 4k"}
],
"duration": 4,
"resolution": "720p",
"ratio": "16:9",
"watermark": False
}
resp = requests.post(
f"{BASE}/v1/video/tasks",
headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
json=data
).json()
task_id = resp["id"]
print(f"Task created: {task_id}")
# 2. Poll until completion
while True:
s = requests.get(
f"{BASE}/v1/video/tasks/{task_id}",
headers={"Authorization": f"Bearer {API_KEY}"}
).json()
if s["status"] == "succeeded":
print(f"Generation successful! Video: {s['content']['video_url']}")
break
elif s["status"] == "failed":
print(f"Failed: {s['error']['message']}")
break
time.sleep(5)
import requests
import time
API_KEY = "YOUR_API_KEY"
BASE = "{{ commonSite.siteType == 'overseas' ? 'https://gw.apismart.ai' : 'https://gw.meowrouter.cn' }}"
# 1. Create video task
data = {
"model": "happyhorse-1.0",
"prompt": "Miniature city night view, flashing lights, a train slowly passing by",
"duration": 5,
"size": "720P"
}
resp = requests.post(
f"{BASE}/v1/video/tasks",
headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
json=data
).json()
task_id = resp["id"]
print(f"Task created: {task_id}")
# 2. Poll until completion
while True:
s = requests.get(
f"{BASE}/v1/video/tasks/{task_id}",
headers={"Authorization": f"Bearer {API_KEY}"}
).json()
if s["status"] == "succeeded":
print(f"Generation successful! Video: {s['content']['video_url']}")
break
elif s["status"] == "failed":
print(f"Failed: {s['error']['message']}")
break
time.sleep(5)
import requests
url = "{{ commonSite.siteType == 'overseas' ? 'https://gw.apismart.ai' : 'https://gw.meowrouter.cn' }}/v1/chat/completions"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"model": "{{ activeModel ? activeModel.modelSlug : '模型詳情' }}",
"messages": [{"role": "user", "content": "Hello!"}],
"temperature": 0.7
}
response = requests.post(url, headers=headers, json=data)
print(response.json()["choices"][0]["message"]["content"])
快速集成
只需使用 model= {{ activeModel.modelSlug }} 即可在代碼中調用模型。詳情請參閱文檔。

