Skip to content

Commit 6a0fc18

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-784: docs: add 9 ernies
1 parent f9ef8db commit 6a0fc18

11 files changed

Lines changed: 1463 additions & 2 deletions

docs/SUMMARY.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,20 @@
4343
* [Claude 4.5 Haiku](api-references/text-models-llm/anthropic/claude-4.5-haiku.md)
4444
* [Claude 4.5 Opus](api-references/text-models-llm/anthropic/claude-4.5-opus.md)
4545
* [Baidu](api-references/text-models-llm/baidu/README.md)
46+
* [ernie-4.5-8k-preview](api-references/text-models-llm/baidu/ernie-4.5-8k-preview.md)
47+
* [ernie-4.5-0.3b](api-references/text-models-llm/baidu/ernie-4.5-0.3b.md)
4648
* [ernie-4.5-21b-a3b](api-references/text-models-llm/baidu/ernie-4.5-21b-a3b.md)
4749
* [ernie-4.5-21b-a3b-thinking](api-references/text-models-llm/baidu/ernie-4.5-21b-a3b-thinking.md)
48-
* [ernie-4.5-300b-a47b](api-references/text-models-llm/baidu/ernie-4.5-300b-a47b.md)
4950
* [ernie-4.5-vl-28b-a3b](api-references/text-models-llm/baidu/ernie-4.5-vl-28b-a3b.md)
5051
* [ernie-4.5-vl-424b-a47b](api-references/text-models-llm/baidu/ernie-4.5-vl-424b-a47b.md)
52+
* [ernie-4.5-300b-a47b](api-references/text-models-llm/baidu/ernie-4.5-300b-a47b.md)
53+
* [ernie-4.5-300b-a47b-paddle](api-references/text-models-llm/baidu/ernie-4.5-300b-a47b-paddle.md)
54+
* [ernie-4.5-turbo-128k](api-references/text-models-llm/baidu/ernie-4.5-turbo-128k.md)
55+
* [ernie-4.5-turbo-vl-32k](api-references/text-models-llm/baidu/ernie-4.5-turbo-vl-32k.md)
56+
* [ernie-5.0-thinking-preview](api-references/text-models-llm/baidu/ernie-5.0-thinking-preview.md)
57+
* [ernie-5.0-thinking-latest](api-references/text-models-llm/baidu/ernie-5.0-thinking-latest.md)
58+
* [ernie-x1-turbo-32k](api-references/text-models-llm/baidu/ernie-x1-turbo-32k.md)
59+
* [ernie-x1.1-preview](api-references/text-models-llm/baidu/ernie-x1.1-preview.md)
5160
* [Cohere](api-references/text-models-llm/Cohere/README.md)
5261
* [command-a](api-references/text-models-llm/cohere/command-a.md)
5362
* [DeepSeek](api-references/text-models-llm/DeepSeek/README.md)

docs/api-references/model-database.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# ernie-4.5-0.3b
2+
3+
{% columns %}
4+
{% column width="66.66666666666666%" %}
5+
{% hint style="info" %}
6+
This documentation is valid for the following list of our models:
7+
8+
* `baidu/ernie-4.5-0.3b`
9+
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
<a href="https://aimlapi.com/app/baidu/ernie-4-5-0-3b" class="button primary">Try in Playground</a>
14+
{% endcolumn %}
15+
{% endcolumns %}
16+
17+
## Model Overview
18+
19+
A small dense language model suitable for edge-side use and budget-constrained inference.
20+
21+
{% hint style="success" %}
22+
[Create AI/ML API Key](https://aimlapi.com/app/keys)
23+
{% endhint %}
24+
25+
<details>
26+
27+
<summary>How to make the first API call</summary>
28+
29+
**1️⃣ Required setup (don’t skip this)**\
30+
**Create an account:** Sign up on the AI/ML API website (if you don’t have one yet).\
31+
**Generate an API key:** In your account dashboard, create an API key and make sure it’s **enabled** in the UI.
32+
33+
**2️ Copy the code example**\
34+
At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project.
35+
36+
**3️ Update the snippet for your use case**\
37+
**Insert your API key:** replace `<YOUR_AIMLAPI_KEY>` with your real AI/ML API key.\
38+
**Select a model:** set the `model` field to the model you want to call.\
39+
**Provide input:** fill in the request input field(s) shown in the example (for example, `messages` for chat/LLM models, or other inputs for image/video/audio models).
40+
41+
**4️ (Optional) Tune the request**\
42+
Depending on the model type, you can add optional parameters to control the output (e.g., generation settings, quality, length, etc.). See the API schema below for the full list.
43+
44+
**5️ Run your code**\
45+
Run the updated code in your development environment. Response time depends on the model and request size, but simple requests typically return quickly.
46+
47+
{% hint style="success" %}
48+
If you need a more detailed walkthrough for setting up your development environment and making a request step by step — feel free to use our [Quickstart guide](../../../quickstart/setting-up.md).
49+
{% endhint %}
50+
51+
</details>
52+
53+
## API Schema
54+
55+
{% openapi-operation spec="ernie-4-5-0-3b" path="/v1/chat/completions" method="post" %}
56+
[OpenAPI ernie-4-5-0-3b](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/baidu/ernie-4.5-0.3b.json)
57+
{% endopenapi-operation %}
58+
59+
## Code Example
60+
61+
{% tabs %}
62+
{% tab title="Python" %}
63+
{% code overflow="wrap" %}
64+
```python
65+
import requests
66+
import json # for getting a structured output with indentation
67+
68+
response = requests.post(
69+
"https://api.aimlapi.com/v1/chat/completions",
70+
headers={
71+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
72+
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
73+
"Content-Type":"application/json"
74+
},
75+
json={
76+
"model":"baidu/ernie-4.5-0.3b",
77+
"messages":[
78+
{
79+
"role":"user",
80+
"content":"Hi! What do you think about mankind?" # insert your prompt
81+
}
82+
]
83+
}
84+
)
85+
86+
data = response.json()
87+
print(json.dumps(data, indent=2, ensure_ascii=False))
88+
```
89+
{% endcode %}
90+
{% endtab %}
91+
92+
{% tab title="JavaScript" %}
93+
{% code overflow="wrap" %}
94+
```javascript
95+
async function main() {
96+
const response = await fetch('https://api.aimlapi.com/v1/chat/completions', {
97+
method: 'POST',
98+
headers: {
99+
// insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>
100+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
101+
'Content-Type': 'application/json',
102+
},
103+
body: JSON.stringify({
104+
model: 'baidu/ernie-4.5-0.3b',
105+
messages:[
106+
{
107+
role:'user',
108+
content: 'Hi! What do you think about mankind?' // insert your prompt here
109+
}
110+
],
111+
}),
112+
});
113+
114+
const data = await response.json();
115+
console.log(JSON.stringify(data, null, 2));
116+
}
117+
118+
main();
119+
```
120+
{% endcode %}
121+
{% endtab %}
122+
{% endtabs %}
123+
124+
<details>
125+
126+
<summary>Response</summary>
127+
128+
{% code overflow="wrap" %}
129+
```json5
130+
{
131+
"id": "379ee72b089c50331cb4d6981414358b",
132+
"object": "chat.completion",
133+
"created": 1768943001,
134+
"model": "baidu/ernie-4.5-0.3b",
135+
"choices": [
136+
{
137+
"index": 0,
138+
"message": {
139+
"role": "assistant",
140+
"content": "Of course! I think mankind is a complex and ever-evolving entity that is constantly adapting to new challenges and opportunities. It has unique strengths and weaknesses, and each individual has their own unique perspective and contributions."
141+
},
142+
"finish_reason": "stop"
143+
}
144+
],
145+
"usage": {
146+
"prompt_tokens": 20,
147+
"completion_tokens": 46,
148+
"total_tokens": 66,
149+
"prompt_tokens_details": null,
150+
"completion_tokens_details": null
151+
},
152+
"system_fingerprint": ""
153+
}
154+
```
155+
{% endcode %}
156+
157+
</details>
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# ernie-4.5-300b-a47b-paddle
2+
3+
{% columns %}
4+
{% column width="66.66666666666666%" %}
5+
{% hint style="info" %}
6+
This documentation is valid for the following list of our models:
7+
8+
* `baidu/ernie-4.5-300b-a47b-paddle`
9+
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
<a href="https://aimlapi.com/app/baidu/ernie-4-5-300b-a47b-paddle" class="button primary">Try in Playground</a>
14+
{% endcolumn %}
15+
{% endcolumns %}
16+
17+
## Model Overview
18+
19+
A super-large language model, positioned as of August 2025 as a leading Chinese MoE architecture and a foundation model for enterprise applications.
20+
21+
{% hint style="success" %}
22+
[Create AI/ML API Key](https://aimlapi.com/app/keys)
23+
{% endhint %}
24+
25+
<details>
26+
27+
<summary>How to make the first API call</summary>
28+
29+
**1️⃣ Required setup (don’t skip this)**\
30+
**Create an account:** Sign up on the AI/ML API website (if you don’t have one yet).\
31+
**Generate an API key:** In your account dashboard, create an API key and make sure it’s **enabled** in the UI.
32+
33+
**2️ Copy the code example**\
34+
At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project.
35+
36+
**3️ Update the snippet for your use case**\
37+
**Insert your API key:** replace `<YOUR_AIMLAPI_KEY>` with your real AI/ML API key.\
38+
**Select a model:** set the `model` field to the model you want to call.\
39+
**Provide input:** fill in the request input field(s) shown in the example (for example, `messages` for chat/LLM models, or other inputs for image/video/audio models).
40+
41+
**4️ (Optional) Tune the request**\
42+
Depending on the model type, you can add optional parameters to control the output (e.g., generation settings, quality, length, etc.). See the API schema below for the full list.
43+
44+
**5️ Run your code**\
45+
Run the updated code in your development environment. Response time depends on the model and request size, but simple requests typically return quickly.
46+
47+
{% hint style="success" %}
48+
If you need a more detailed walkthrough for setting up your development environment and making a request step by step — feel free to use our [Quickstart guide](../../../quickstart/setting-up.md).
49+
{% endhint %}
50+
51+
</details>
52+
53+
## API Schema
54+
55+
{% openapi-operation spec="ernie-4-5-300b-a47b-paddle" path="/v1/chat/completions" method="post" %}
56+
[OpenAPI ernie-4-5-300b-a47b-paddle](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/baidu/ernie-4.5-300b-a47b-paddle.json)
57+
{% endopenapi-operation %}
58+
59+
## Code Example
60+
61+
{% tabs %}
62+
{% tab title="Python" %}
63+
{% code overflow="wrap" %}
64+
```python
65+
import requests
66+
import json # for getting a structured output with indentation
67+
68+
response = requests.post(
69+
"https://api.aimlapi.com/v1/chat/completions",
70+
headers={
71+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
72+
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
73+
"Content-Type":"application/json"
74+
},
75+
json={
76+
"model":"baidu/ernie-4.5-300b-a47b-paddle",
77+
"messages":[
78+
{
79+
"role":"user",
80+
"content":"Hi! What do you think about mankind?" # insert your prompt
81+
}
82+
]
83+
}
84+
)
85+
86+
data = response.json()
87+
print(json.dumps(data, indent=2, ensure_ascii=False))
88+
```
89+
{% endcode %}
90+
{% endtab %}
91+
92+
{% tab title="JavaScript" %}
93+
{% code overflow="wrap" %}
94+
```javascript
95+
async function main() {
96+
const response = await fetch('https://api.aimlapi.com/v1/chat/completions', {
97+
method: 'POST',
98+
headers: {
99+
// insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>
100+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
101+
'Content-Type': 'application/json',
102+
},
103+
body: JSON.stringify({
104+
model: 'baidu/ernie-4.5-300b-a47b-paddle',
105+
messages:[
106+
{
107+
role:'user',
108+
content: 'Hi! What do you think about mankind?' // insert your prompt here
109+
}
110+
],
111+
}),
112+
});
113+
114+
const data = await response.json();
115+
console.log(JSON.stringify(data, null, 2));
116+
}
117+
118+
main();
119+
```
120+
{% endcode %}
121+
{% endtab %}
122+
{% endtabs %}
123+
124+
<details>
125+
126+
<summary>Response</summary>
127+
128+
{% code overflow="wrap" %}
129+
```json5
130+
{
131+
"id": "9a0e333a0cfa4d86c89a1f7bd3a2919f",
132+
"object": "chat.completion",
133+
"created": 1768943231,
134+
"model": "baidu/ernie-4.5-300b-a47b-paddle",
135+
"choices": [
136+
{
137+
"index": 0,
138+
"message": {
139+
"role": "assistant",
140+
"content": "The question \"What do you think about mankind?\" invites a reflection on humanity's complexities. Here's a structured response:\n\n**Step 1: Define the scope** \nMankind encompasses both collective achievements and individual flaws. It's a species marked by creativity, empathy, and resilience, yet also by conflict, inequality, and environmental impact.\n\n**Step 2: Highlight positive traits** \nHumanity has demonstrated remarkable capacity for innovation (e.g., technology, medicine), cultural expression (art, literature), and moral progress (civil rights, environmental awareness). Cooperation during crises, such as disaster relief or global health initiatives, underscores collective potential.\n\n**Step 3: Acknowledge challenges** \nPersistent issues like war, poverty, and systemic injustice reveal ethical gaps. Environmental degradation and climate change further highlight unsustainable practices. These contradictions often stem from short-term thinking or unequal resource distribution.\n\n**Step 4: Emphasize growth potential** \nHistory shows humanity's ability to learn and adapt. Movements for social justice, renewable energy transitions, and scientific breakthroughs suggest progress is possible when values align with action.\n\n**Final Answer** \nMankind is a paradoxical yet hopeful entity—capable of profound compassion and destructive shortsightedness. Its future hinges on balancing self-interest with collective responsibility, leveraging intelligence and empathy to address shared challenges."
141+
},
142+
"finish_reason": "stop"
143+
}
144+
],
145+
"usage": {
146+
"prompt_tokens": 13,
147+
"completion_tokens": 289,
148+
"total_tokens": 302,
149+
"prompt_tokens_details": null,
150+
"completion_tokens_details": null
151+
},
152+
"system_fingerprint": "",
153+
"meta": {
154+
"usage": {
155+
"credits_used": 615
156+
}
157+
}
158+
}
159+
```
160+
{% endcode %}
161+
162+
</details>

0 commit comments

Comments
 (0)