Select an endpoint and copy a working example for this model.
from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.apertis.ai/v1") response = client.chat.completions.create( model="ERNIE-Lite-8K-0308", messages=[ {"role": "user", "content": "Hello!"} ], max_tokens=1024, temperature=0.7) print(response.choices[0].message.content) # Optional: Enable context compression to reduce token usage# response = client.chat.completions.create(# model="ERNIE-Lite-8K-0308",# messages=[{"role": "user", "content": "Hello!"}],# extra_body={"compression": {"enabled": True, "model": "gpt-4.1-mini"}}# )modelmessagesmax_tokenstemperaturetop_pstreamtoolsreasoning_effortstream_optionsthinkingextra_bodyUse these namespaced identifiers in Cursor IDE to avoid conflicts with built-in models.
See how this model compares to others from the same provider.
ERNIE-4.5-21B-A3B-Thinking is Baidu's upgraded lightweight MoE model focused on deeper, higher-quality reasoning. It's tuned to perform strongly on logic, math, science, coding, text generation, and advanced academic benchmarks, delivering top-tier capability with efficient compute usage.
This is a multimodal Mixture-of-Experts chat model with 28B total parameters and 3B active per token, designed for strong text and vision understanding. It uses modality-isolated expert routing for efficiency, supports a long 131K-token context window, and delivers high-throughput inference. Advanced post-training (SFT, DPO, UPO) and RLVR alignment further enhance cross-modal reasoning and generation quality.
This is a text-based Mixture-of-Experts (MoE) model with 21B total parameters and 3B active per token, designed for efficient, high-quality generation and understanding. It supports a long 131K-token context window and achieves fast inference through parallel expert routing and quantization. Advanced post-training methods (SFT, DPO, UPO) and specialized routing/balancing techniques optimize performance across diverse tasks.
ERNIE X1 32K is a large language model designed with an extended 32K-token context window, enabling deeper understanding and reasoning over long documents and multi-turn interactions. It balances strong performance across general reasoning, comprehension, and instruction following, making it well suited for tasks that require handling extended contexts such as document analysis, summarization, and detailed multi-step workflows.
See how this model compares to others from the same provider.
ERNIE-4.5-21B-A3B-Thinking is Baidu's upgraded lightweight MoE model focused on deeper, higher-quality reasoning. It's tuned to perform strongly on logic, math, science, coding, text generation, and advanced academic benchmarks, delivering top-tier capability with efficient compute usage.
This is a multimodal Mixture-of-Experts chat model with 28B total parameters and 3B active per token, designed for strong text and vision understanding. It uses modality-isolated expert routing for efficiency, supports a long 131K-token context window, and delivers high-throughput inference. Advanced post-training (SFT, DPO, UPO) and RLVR alignment further enhance cross-modal reasoning and generation quality.
This is a text-based Mixture-of-Experts (MoE) model with 21B total parameters and 3B active per token, designed for efficient, high-quality generation and understanding. It supports a long 131K-token context window and achieves fast inference through parallel expert routing and quantization. Advanced post-training methods (SFT, DPO, UPO) and specialized routing/balancing techniques optimize performance across diverse tasks.
ERNIE X1 32K is a large language model designed with an extended 32K-token context window, enabling deeper understanding and reasoning over long documents and multi-turn interactions. It balances strong performance across general reasoning, comprehension, and instruction following, making it well suited for tasks that require handling extended contexts such as document analysis, summarization, and detailed multi-step workflows.
No observed failures in the current observation window