Skip to content

Commit d3db0dc

Browse files
Andrei Titovgitbook-bot
authored andcommitted
GITBOOK-433: feat: add docs for claude 4.5, depseek 3.2
1 parent f51f5bb commit d3db0dc

10 files changed

Lines changed: 483 additions & 2 deletions

File tree

docs/SUMMARY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
* [Claude 3.7 Sonnet](api-references/text-models-llm/anthropic/claude-3.7-sonnet.md)
3838
* [Claude 4 Opus](api-references/text-models-llm/anthropic/claude-4-opus.md)
3939
* [Claude 4 Sonnet](api-references/text-models-llm/anthropic/claude-4-sonnet.md)
40+
* [Claude Sonnet 4.5](api-references/text-models-llm/anthropic/claude-4-sonnet-1.md)
4041
* [Claude 4.1 Opus](api-references/text-models-llm/anthropic/claude-opus-4.1.md)
4142
* [Cohere](api-references/text-models-llm/Cohere/README.md)
4243
* [command-a](api-references/text-models-llm/cohere/command-a.md)
@@ -46,6 +47,8 @@
4647
* [DeepSeek Prover V2](api-references/text-models-llm/deepseek/deepseek-prover-v2.md)
4748
* [DeepSeek Chat V3.1](api-references/text-models-llm/deepseek/deepseek-chat-v3.1.md)
4849
* [DeepSeek Reasoner V3.1](api-references/text-models-llm/deepseek/deepseek-reasoner-v3.1.md)
50+
* [DeepSeek V3.2 Exp thinking](api-references/text-models-llm/deepseek/deepseek-reasoner-v3.1-1.md)
51+
* [DeepSeek V3.2 Exp Non-thinking](api-references/text-models-llm/deepseek/deepseek-reasoner-v3.1-2.md)
4952
* [Google](api-references/text-models-llm/Google/README.md)
5053
* [gemini-2.0-flash-exp](api-references/text-models-llm/Google/gemini-2.0-flash-exp.md)
5154
* [gemini-2.0-flash](api-references/text-models-llm/google/gemini-2.0-flash.md)

docs/api-references/model-database.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/api-references/text-models-llm/README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# Claude Sonnet 4.5
2+
3+
4+
5+
<table data-header-hidden data-full-width="true"><thead><tr><th width="546.4443969726562" valign="top"></th><th width="202.666748046875" valign="top"></th></tr></thead><tbody><tr><td valign="top"><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This documentation is valid for the following model: </p><p><code>claude-sonnet-4-5</code><br><code>anthropic/claude-sonnet-4-5</code></p><p><code>claude-sonnet-4-5-20250929</code></p></div></td><td valign="top"><a href="https://aimlapi.com/app/?model=claude-sonnet-4-20250514&#x26;mode=chat" class="button primary">Try in Playground</a></td></tr></tbody></table>
6+
7+
## Model Overview
8+
9+
A major improvement over [Claude 4 Sonnet,](claude-4-sonnet.md) offering better coding abilities, stronger reasoning, and more accurate responses to your instructions.
10+
11+
## How to Make a Call
12+
13+
<details>
14+
15+
<summary>Step-by-Step Instructions</summary>
16+
17+
### :digit\_one: Setup You Can’t Skip
18+
19+
:black\_small\_square: [**Create an Account**](https://aimlapi.com/app/sign-up): Visit the AI/ML API website and create an account (if you don’t have one yet).\
20+
:black\_small\_square: [**Generate an API Key**](https://aimlapi.com/app/keys): After logging in, navigate to your account dashboard and generate your API key. Ensure that key is enabled on UI.
21+
22+
### &#x20;:digit\_two: Copy the code example
23+
24+
At the bottom of this page, you'll find [a code example](claude-4-sonnet-1.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
25+
26+
### :digit\_three: Modify the code example
27+
28+
:black\_small\_square: Replace `<YOUR_AIMLAPI_KEY>` with your actual AI/ML API key from your account.\
29+
:black\_small\_square: Insert your question or request into the `content` field—this is what the model will respond to.
30+
31+
### :digit\_four: <sup><sub><mark style="background-color:yellow;">(Optional)<mark style="background-color:yellow;"><sub></sup> Adjust other optional parameters if needed
32+
33+
Only `model` and `messages` are required parameters for this model (and we’ve already filled them in for you in the example), but you can include optional parameters if needed to adjust the model’s behavior. Below, you can find the corresponding [API schema](claude-4-sonnet-1.md#api-schema), which lists all available parameters along with notes on how to use them.
34+
35+
### :digit\_five: Run your modified code
36+
37+
Run your modified code in your development environment. Response time depends on various factors, but for simple prompts it rarely exceeds a few seconds.
38+
39+
{% hint style="success" %}
40+
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).
41+
{% endhint %}
42+
43+
</details>
44+
45+
## API Schema
46+
47+
{% openapi-operation spec="claude-sonnet-4-5" path="/v1/chat/completions" method="post" %}
48+
[OpenAPI claude-sonnet-4-5](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/Anthropic/claude-sonnet-4-5.json)
49+
{% endopenapi-operation %}
50+
51+
## Code Example
52+
53+
{% tabs %}
54+
{% tab title="Python" %}
55+
{% code overflow="wrap" %}
56+
```python
57+
import requests
58+
import json # for getting a structured output with indentation
59+
60+
response = requests.post(
61+
"https://api.aimlapi.com/v1/chat/completions",
62+
headers={
63+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
64+
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
65+
"Content-Type":"application/json"
66+
},
67+
json={
68+
"model":"anthropic/claude-sonnet-4.5",
69+
"messages":[
70+
{
71+
"role":"user",
72+
"content":"Hello" # insert your prompt here, instead of Hello
73+
}
74+
],
75+
"enable_thinking": False
76+
}
77+
)
78+
79+
data = response.json()
80+
print(json.dumps(data, indent=2, ensure_ascii=False))
81+
```
82+
{% endcode %}
83+
{% endtab %}
84+
85+
{% tab title="JavaScript" %}
86+
{% code overflow="wrap" %}
87+
```javascript
88+
async function main() {
89+
try {
90+
const response = await fetch('https://api.aimlapi.com/v1/chat/completions', {
91+
method: 'POST',
92+
headers: {
93+
// Insert your AIML API Key instead of YOUR_AIMLAPI_KEY
94+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
95+
'Content-Type': 'application/json',
96+
},
97+
body: JSON.stringify({
98+
model: 'anthropic/claude-sonnet-4.5',
99+
messages:[
100+
{
101+
role:'user',
102+
103+
// Insert your question for the model here, instead of Hello:
104+
content: 'Hello'
105+
}
106+
]
107+
}),
108+
});
109+
110+
if (!response.ok) {
111+
throw new Error(`HTTP error! Status ${response.status}`);
112+
}
113+
114+
const data = await response.json();
115+
console.log(JSON.stringify(data, null, 2));
116+
117+
} catch (error) {
118+
console.error('Error', error);
119+
}
120+
}
121+
122+
main();
123+
```
124+
{% endcode %}
125+
{% endtab %}
126+
{% endtabs %}
127+
128+
<details>
129+
130+
<summary>Response</summary>
131+
132+
{% code overflow="wrap" %}
133+
```json5
134+
{
135+
"id": "msg_011MNbgezv2p5BBE9RvnsZV9",
136+
"object": "chat.completion",
137+
"model": "claude-sonnet-4-20250514",
138+
"choices": [
139+
{
140+
"index": 0,
141+
"message": {
142+
"reasoning_content": "",
143+
"content": "Hello! How are you doing today? Is there anything I can help you with?",
144+
"role": "assistant"
145+
},
146+
"finish_reason": "end_turn",
147+
"logprobs": null
148+
}
149+
],
150+
"created": 1748522617,
151+
"usage": {
152+
"prompt_tokens": 50,
153+
"completion_tokens": 630,
154+
"total_tokens": 680
155+
}
156+
}
157+
```
158+
{% endcode %}
159+
160+
</details>
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# DeepSeek V3.2 Exp thinking
2+
3+
4+
5+
<table data-header-hidden data-full-width="true"><thead><tr><th width="546.4443969726562" valign="top"></th><th width="202.666748046875" valign="top"></th></tr></thead><tbody><tr><td valign="top"><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This documentation is valid for the following model: <br><code>deepseek/deepseek-thinking-v3.2-exp</code></p></div></td><td valign="top"><a href="https://aimlapi.com/app/?model=deepseek/deepseek-thinking-v3.2-exp&#x26;mode=chat" class="button primary">Try in Playground</a></td></tr></tbody></table>
6+
7+
## Model Overview
8+
9+
September 2025 update of [the DeepSeek R1](../DeepSeek/deepseek-r1.md) reasoning model. Skilled at complex problem-solving, mathematical reasoning, and programming assistance.
10+
11+
## How to Make a Call
12+
13+
<details>
14+
15+
<summary>Step-by-Step Instructions</summary>
16+
17+
### :digit\_one: Setup You Can’t Skip
18+
19+
:black\_small\_square: [**Create an Account**](https://aimlapi.com/app/sign-up): Visit the AI/ML API website and create an account (if you don’t have one yet).\
20+
:black\_small\_square: [**Generate an API Key**](https://aimlapi.com/app/keys): After logging in, navigate to your account dashboard and generate your API key. Ensure that key is enabled on UI.
21+
22+
### &#x20;:digit\_two: Copy the code example
23+
24+
At the bottom of this page, you'll find [a code example](deepseek-reasoner-v3.1-1.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
25+
26+
### :digit\_three: Modify the code example
27+
28+
:black\_small\_square: Replace `<YOUR_AIMLAPI_KEY>` with your actual AI/ML API key from your account.\
29+
:black\_small\_square: Insert your question or request into the `content` field—this is what the model will respond to.
30+
31+
### :digit\_four: <sup><sub><mark style="background-color:yellow;">(Optional)<mark style="background-color:yellow;"><sub></sup> Adjust other optional parameters if needed
32+
33+
Only `model` and `messages` are required parameters for this model (and we’ve already filled them in for you in the example), but you can include optional parameters if needed to adjust the model’s behavior. Below, you can find the corresponding [API schema](deepseek-reasoner-v3.1-1.md#api-schema), which lists all available parameters along with notes on how to use them.
34+
35+
### :digit\_five: Run your modified code
36+
37+
Run your modified code in your development environment. Response time depends on various factors, but for simple prompts it rarely exceeds a few seconds.
38+
39+
{% hint style="success" %}
40+
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).
41+
{% endhint %}
42+
43+
</details>
44+
45+
## API Schema
46+
47+
{% openapi-operation spec="deepseek-thinking-v3-2" path="/v1/chat/completions" method="post" %}
48+
[OpenAPI deepseek-thinking-v3-2](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/DeepSeek/deepseek-thinking-v3.2.json)
49+
{% endopenapi-operation %}
50+
51+
## Code Example
52+
53+
{% tabs %}
54+
{% tab title="Python" %}
55+
{% code overflow="wrap" %}
56+
```python
57+
import requests
58+
import json # for getting a structured output with indentation
59+
60+
response = requests.post(
61+
"https://api.aimlapi.com/v1/chat/completions",
62+
headers={
63+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
64+
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
65+
"Content-Type":"application/json"
66+
},
67+
json={
68+
"model":"deepseek/deepseek-thinking-v3.2-exp",
69+
"messages":[
70+
{
71+
"role":"user",
72+
"content":"Hello" # insert your prompt here, instead of Hello
73+
}
74+
],
75+
}
76+
)
77+
78+
data = response.json()
79+
print(json.dumps(data, indent=2, ensure_ascii=False))
80+
```
81+
{% endcode %}
82+
{% endtab %}
83+
84+
{% tab title="JavaScript" %}
85+
{% code overflow="wrap" %}
86+
```javascript
87+
async function main() {
88+
const response = await fetch('https://api.aimlapi.com/v1/chat/completions', {
89+
method: 'POST',
90+
headers: {
91+
// Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>
92+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
93+
'Content-Type': 'application/json',
94+
},
95+
body: JSON.stringify({
96+
model: 'deepseek/deepseek-thinking-v3.2-exp',
97+
messages:[
98+
{
99+
role:'user',
100+
content: 'Hello' // Insert your question instead of Hello
101+
}
102+
],
103+
}),
104+
});
105+
106+
const data = await response.json();
107+
console.log(JSON.stringify(data, null, 2));
108+
}
109+
110+
main();
111+
```
112+
{% endcode %}
113+
{% endtab %}
114+
{% endtabs %}
115+
116+
<details>
117+
118+
<summary>Response</summary>
119+
120+
{% code overflow="wrap" %}
121+
```json5
122+
{
123+
"id": "ca664281-d3c3-40d3-9d80-fe96a65884dd",
124+
"system_fingerprint": "fp_feb633d1f5_prod0820_fp8_kvcache",
125+
"object": "chat.completion",
126+
"choices": [
127+
{
128+
"index": 0,
129+
"finish_reason": "stop",
130+
"logprobs": null,
131+
"message": {
132+
"role": "assistant",
133+
"content": "Hello! How can I help you today? 😊",
134+
"reasoning_content": ""
135+
}
136+
}
137+
],
138+
"created": 1756386069,
139+
"model": "deepseek-reasoner",
140+
"usage": {
141+
"prompt_tokens": 1,
142+
"completion_tokens": 325,
143+
"total_tokens": 326,
144+
"prompt_tokens_details": {
145+
"cached_tokens": 0
146+
},
147+
"completion_tokens_details": {
148+
"reasoning_tokens": 80
149+
},
150+
"prompt_cache_hit_tokens": 0,
151+
"prompt_cache_miss_tokens": 5
152+
}
153+
}
154+
```
155+
{% endcode %}
156+
157+
</details>

0 commit comments

Comments
 (0)