返回模型列表
Baidu

ERNIE 5.1

百度 ERNIE 5.1 大语言模型,支持长文本理解与生成。

快速参数

上下文

128K

最大输出

—

出品方

Baidu

规格数

1

模态

输出 text

规格与平台指导价(每百万 tokens)

高质量
输入 $0.588235输出 $2.647059

推荐套餐

ERNIE 5.1 体验套餐

充值即用,按量计费;新用户享 $1 体验额度。

购买套餐

API 接入

Model IDbaidu/ernie-5.1

cURL

curl https://intertoken.ai/v1/chat/completions \
  -H "Authorization: Bearer $TOKENPORTAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "baidu/ernie-5.1",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Python (openai SDK)

from openai import OpenAI

client = OpenAI(
    base_url="https://intertoken.ai/v1",
    api_key="$TOKENPORTAL_API_KEY",
)

resp = client.chat.completions.create(
    model="baidu/ernie-5.1",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

立即使用此模型

免费注册,获取 API Key,30 秒接入