Routeway Logo
Back to Models
baiduBA

ERNIE 5.1

Available

Description

ERNIE 5.1 is Baidu's latest Wenxin model, with broad upgrades to agentic workflows, knowledge, reasoning, deep search, and multimodal understanding

At a Glance

Key pricing and model details available for this model.

Input price

$0.67

per 1M tokens

Output price

$2.70

per 1M tokens

Context window

119K

tokens

Hallucination rate

0%

Token Pricing

Token pricing normalized to per-million-token rates.

Input / 1M tokens

$0.67

Output / 1M tokens

$2.70

Cache Read / 1M tokens

Free

Token Pricing Details

Rates are shown per 1M tokens for easier comparison.

Input / 1M tokens$0.67
Input unit1M tokens
Output / 1M tokens$2.70
Output unit1M tokens
Cache Read / 1M tokensFree
Cache Read unit1M tokens

Feature Availability

Capabilities explicitly listed in the current payload.

LLM

Available

Yes

Vision

Available

Yes

Function calling

Available

Yes

Reasoning

Available

Yes

Supported Parameters

frequency_penalty
logit_bias
max_completion_tokens
presence_penalty
reasoning_effort
stop
temperature
top_p
tool_choice
tools

Code Samples

Quick start with the Routeway API

import OpenAI from 'openai';

const openai = new OpenAI({
  baseURL: "https://api.routeway.ai/v1",
  apiKey: "<YOUR_API_KEY>",
});

async function main() {
  const completion = await openai.chat.completions.create({
    model: "ernie-5.1",
    messages: [
      {
        role: "user",
        content: "Explain quantum computing in simple terms"
      }
    ]
  });

  console.log(completion.choices[0].message);
}

main();