Skip to content

Commit 460ea3d

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-1024: docs: add descriptions for 5 great chat model developers
1 parent 27e83ac commit 460ea3d

7 files changed

Lines changed: 412 additions & 259 deletions

File tree

Lines changed: 297 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,299 @@
11
# Anthropic
22

3-
The chat models from this provider have some unique characteristics. In addition to the standard `v1/chat/completions` endpoint, you can also call Anthropic models via the `/messages` endpoint. This capability is described in more detail in the [Capabilities](../../../capabilities/anthropic.md) section.
3+
## Overview
4+
5+
**Anthropic** is an AI research and product company founded by former OpenAI researchers. The company is best known for its strong emphasis on AI safety, interpretability, and long-term alignment. Anthropic describes its mission as building “reliable, interpretable, and steerable” AI systems that can be safely deployed at scale.
6+
7+
Its product lineup spans lightweight **Haiku** models for fast inference, **Sonnet** models aimed at general-purpose production workloads, and **Opus** models designed for advanced reasoning, coding, and research tasks. Beyond chat assistants, Anthropic is actively expanding into agentic tooling with products such as [Claude Code](../../../integrations/claude-code.md) and enterprise integrations focused on automation, software engineering, and organizational workflows.
8+
9+
***
10+
11+
The chat models from this provider have some unique characteristics. Models from Anthropic can be accessed not only via the standard `/v1/chat/completions` endpoint but also through dedicated endpoints — `/messages` and `/v1/batches` and `/v1/batches/cancel/{batch_id}`.\
12+
The sections below describe their API schemas, usage specifics, and example requests.
13+
14+
Supported capabilities:
15+
16+
* **Text completions:** Build advanced chat bots or text processors.
17+
* **Function Calling:** Utilize tools for specific tasks and API calling.
18+
* **Stream mode:** Get the text chat model responses as they are generated, rather than waiting for the entire response to be completed.
19+
* **Batch Processing:** Send multiple independent requests in a single API call.
20+
* **Vision Tasks:** Process and analyze images.
21+
22+
## Text Completions
23+
24+
Ask something and get an answer in a chat-like conversation format.
25+
26+
{% openapi-operation spec="messages" path="/v1/messages" method="post" %}
27+
[OpenAPI messages](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/capabilities/messages.json)
28+
{% endopenapi-operation %}
29+
30+
### **Example: Simple Text Response**
31+
32+
{% tabs %}
33+
{% tab title="Python" %}
34+
{% code overflow="wrap" %}
35+
```python
36+
import requests
37+
import json # for getting a structured output with indentation
38+
39+
url = "https://api.aimlapi.com/messages"
40+
headers = {
41+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
42+
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
43+
"Content-Type": "application/json"
44+
}
45+
payload = {
46+
"model": "claude-sonnet-4-20250514",
47+
"max_tokens": 1024,
48+
"system": "You are a robot. You always optimize for clarity, structure, and accuracy.",
49+
"messages": [
50+
{
51+
"role": "user",
52+
"content": "How are you?"
53+
}
54+
]
55+
}
56+
response = requests.post(url, json=payload, headers=headers)
57+
data = response.json()
58+
print(json.dumps(data, indent=2, ensure_ascii=False))
59+
```
60+
{% endcode %}
61+
{% endtab %}
62+
{% endtabs %}
63+
64+
<details>
65+
66+
<summary>Response</summary>
67+
68+
{% code overflow="wrap" %}
69+
```json5
70+
{
71+
"model": "claude-sonnet-4-20250514",
72+
"id": "msg_01SUmNmSRFZsoa6h96MxJEHH",
73+
"type": "message",
74+
"role": "assistant",
75+
"content": [
76+
{
77+
"type": "text",
78+
"text": "I'm functioning well, thank you for asking! I'm ready to help you with any questions or tasks you might have. How can I assist you today?"
79+
}
80+
],
81+
"stop_reason": "end_turn",
82+
"stop_sequence": null,
83+
"stop_details": null,
84+
"usage": {
85+
"input_tokens": 27,
86+
"cache_creation_input_tokens": 0,
87+
"cache_read_input_tokens": 0,
88+
"cache_creation": {
89+
"ephemeral_5m_input_tokens": 0,
90+
"ephemeral_1h_input_tokens": 0
91+
},
92+
"output_tokens": 35,
93+
"service_tier": "standard",
94+
"inference_geo": "not_available"
95+
},
96+
"meta": {
97+
"usage": {
98+
"credits_used": 1576,
99+
"usd_spent": 0.000788
100+
}
101+
}
102+
}
103+
```
104+
{% endcode %}
105+
106+
</details>
107+
108+
***
109+
110+
## **Function Calling**
111+
112+
To process text and use function calling, follow the examples below:
113+
114+
### **Example: Get Weather Information**
115+
116+
{% code overflow="wrap" %}
117+
```python
118+
import requests
119+
120+
url = "https://api.aimlapi.com/messages"
121+
headers = {
122+
"Authorization": "Bearer YOUR_AIMLAPI_KEY",
123+
"Content-Type": "application/json"
124+
}
125+
payload = {
126+
"model": "anthropic/claude-sonnet-4.5",
127+
"max_tokens": 1024,
128+
"tools": [
129+
{
130+
"name": "get_weather",
131+
"description": "Get the current weather in a given location",
132+
"input_schema": {
133+
"type": "object",
134+
"properties": {
135+
"location": {
136+
"type": "string",
137+
"description": "The city and state, e.g. San Francisco, CA"
138+
}
139+
}
140+
}
141+
}
142+
],
143+
"messages": [
144+
{
145+
"role": "user",
146+
"content": "What is the weather like in San Francisco?"
147+
}
148+
]
149+
}
150+
response = requests.post(url, json=payload, headers=headers)
151+
print(response.json())
152+
```
153+
{% endcode %}
154+
155+
***
156+
157+
## Streaming Mode
158+
159+
To enable streaming of responses, set `stream=True` in your request payload.
160+
161+
```python
162+
import requests
163+
164+
url = "https://api.aimlapi.com/messages"
165+
headers = {
166+
"Authorization": "Bearer YOUR_AIMLAPI_KEY",
167+
"Content-Type": "application/json"
168+
}
169+
payload = {
170+
"model": "anthropic/claude-sonnet-4.5",
171+
"max_tokens": 1024,
172+
"tools": [
173+
{
174+
"name": "get_weather",
175+
"description": "Get the current weather in a given location",
176+
"input_schema": {
177+
"type": "object",
178+
"properties": {
179+
"location": {
180+
"type": "string",
181+
"description": "The city and state, e.g. San Francisco, CA"
182+
}
183+
}
184+
}
185+
}
186+
],
187+
"messages": [
188+
{
189+
"role": "user",
190+
"content": "What is the weather like in San Francisco?"
191+
}
192+
]
193+
```
194+
195+
***
196+
197+
## **Batch Processing**
198+
199+
Due to the complexity of its description, this capability has been placed on [a separate page](../../../capabilities/batch-processing.md).
200+
201+
***
202+
203+
## **Vision**
204+
205+
{% hint style="info" %}
206+
**Note:** API only support [Base64 string](../../../glossary/concepts.md#base64) as image input.
207+
{% endhint %}
208+
209+
Possible media types:
210+
211+
* `image/jpeg`
212+
* `image/png`
213+
* `image/gif`
214+
* `image/webp`
215+
216+
{% code overflow="wrap" %}
217+
```python
218+
import httpx
219+
import base64
220+
from openai import OpenAI
221+
222+
client = OpenAI(
223+
base_url='https://api.aimlapi.com',
224+
api_key='<YOUR_AIMLAPI_KEY>'
225+
)
226+
227+
image_url = "https://upload.wikimedia.org/wikipedia/commons/a/a7/Camponotus_flavomarginatus_ant.jpg"
228+
image_media_type = "image/jpeg"
229+
image_data = base64.standard_b64encode(httpx.get(image_url).content).decode("utf-8")
230+
231+
response = client.chat.completions.create(
232+
model="anthropic/claude-sonnet-4.5",
233+
messages=[
234+
{
235+
"role": "user",
236+
"content": [
237+
{
238+
"type": "image",
239+
"source": {
240+
"type": "base64",
241+
"media_type": image_media_type,
242+
"data": imag1_data,
243+
},
244+
},
245+
{
246+
"type": "text",
247+
"text": "Describe this image."
248+
}
249+
],
250+
}
251+
],
252+
)
253+
print(response)
254+
```
255+
{% endcode %}
256+
257+
***
258+
259+
## Response Format
260+
261+
The responses from the AI/ML API for Anthropic models will typically include the generated text or results from the tool called. Here is an example response for a weather query:
262+
263+
{% code overflow="wrap" %}
264+
```json
265+
{
266+
"model": "claude-sonnet-4-20250514",
267+
"id": "msg_014iMvypzB9GafRthc8CQHsR",
268+
"type": "message",
269+
"role": "assistant",
270+
"content": [
271+
{
272+
"type": "text",
273+
"text": "I'm doing well, thank you for asking! I'm here and ready to help with whatever you'd like to discuss or work on. How are you doing today?"
274+
}
275+
],
276+
"stop_reason": "end_turn",
277+
"stop_sequence": null,
278+
"stop_details": null,
279+
"usage": {
280+
"input_tokens": 11,
281+
"cache_creation_input_tokens": 0,
282+
"cache_read_input_tokens": 0,
283+
"cache_creation": {
284+
"ephemeral_5m_input_tokens": 0,
285+
"ephemeral_1h_input_tokens": 0
286+
},
287+
"output_tokens": 37,
288+
"service_tier": "standard",
289+
"inference_geo": "not_available"
290+
},
291+
"meta": {
292+
"usage": {
293+
"credits_used": 1529,
294+
"usd_spent": 0.0007645
295+
}
296+
}
297+
}
298+
```
299+
{% endcode %}
Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1-
[#references:start]: <> ({ "template": "models" })
2-
[#references:start]: <> ({ "template": "models" })
3-
# Models
4-
[#references:end]: <> ({})
5-
[#references:end]: <> ({})
1+
# DeepSeek
2+
3+
DeepSeek is an AI research company focused on developing high-performance large language models for reasoning, coding, mathematics, and agentic workflows. The company is best known for the DeepSeek model family, which emphasizes strong analytical capabilities, efficient inference architectures, and competitive performance across software engineering and complex reasoning benchmarks. DeepSeek places significant focus on scalable reasoning systems, long-context processing, and reinforcement-learning-based model improvement, while continuing to expand multimodal and tool-augmented AI capabilities.
4+
5+
***
6+
7+
The currently supported model families include:
8+
9+
* **DeepSeek Chat models** — general-purpose conversational and instruction-following models optimized for production workloads, assistant applications, content generation, and developer integrations.
10+
* **DeepSeek Reasoner models** — advanced reasoning-oriented models designed for multi-step analytical tasks, mathematics, software engineering, logical problem solving, and complex agentic workflows. These models are optimized for deeper reasoning and structured analytical generation.
11+
* **DeepSeek Terminus models** — production-oriented models focused on scalable inference, balanced reasoning quality, and enterprise integration scenarios.
12+
* **DeepSeek Flash models** — lightweight low-latency variants optimized for fast response times and cost-efficient high-throughput workloads.
13+
* **DeepSeek Pro models** — higher-capability models intended for advanced reasoning, coding, research, and complex instruction-following workflows.
14+
15+
All DeepSeek models in this provider are accessed through the standard `/v1/chat/completions` endpoint, providing a unified OpenAI-compatible integration layer across the entire model catalog.
16+
17+
Supported capabilities vary depending on the specific model, with different models offering different combinations of the features listed below.
18+
19+
* **Text completions** — Build conversational systems and advanced text-processing pipelines.
20+
* **Function Calling** — Utilize tools, APIs, and structured workflows.
21+
* **Stream mode** — Receive partial responses incrementally as tokens are generated.
22+
* **Reasoning Tasks** — Execute advanced analytical, mathematical, and multi-step reasoning workflows.
23+
* **Coding Tasks** — Generate, analyze, refactor, and debug source code across multiple programming languages.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
11
# Google
22

3+
Google develops multiple families of AI models focused on reasoning, coding, multimodal understanding, and long-context interaction across text, images, audio, and video. As part of the broader Google ecosystem, the company integrates frontier AI capabilities into developer platforms, productivity tools, search systems, and enterprise infrastructure.
4+
5+
The currently supported model families include:
6+
7+
* **Gemini models** — Google’s flagship multimodal and reasoning-oriented models designed for production AI workloads. The Gemini lineup includes:
8+
* **Flash models** optimized for low latency and cost efficiency.
9+
* **Pro models** intended for balanced general-purpose production use.
10+
* Advanced reasoning-capable variants focused on coding, analytical tasks, tool usage, and agentic workflows.\
11+
Gemini models place strong emphasis on multimodal processing, long context windows, native tool integration, and real-time interaction capabilities.
12+
* **Gemma models** — lightweight open-weight models designed for efficient deployment, customization, and research workflows. Gemma models are optimized for smaller-scale inference environments while still supporting strong reasoning, coding, and conversational capabilities across a wide range of applications.
13+
14+
All Google models in this developer are accessed through the standard `/v1/chat/completions` endpoint, providing a unified OpenAI-compatible integration layer across the entire model catalog.
15+
16+
***
17+
18+
Supported capabilities vary depending on the specific model, with different models offering different combinations of the features listed below.
19+
20+
* **Text completions**: Build conversational systems and advanced text-processing pipelines.
21+
* **Function Calling**: Utilize tools, APIs, and structured workflows.
22+
* **Stream mode**: Receive partial responses incrementally as tokens are generated.
23+
* **Batch Processing**: Execute multiple independent requests within a single API call.
24+
* **Vision Tasks**: Process and analyze images and visual inputs.
25+
* **Audio Tasks**: Transcribe, generate, and process audio content.
26+
* **Video Tasks**: Analyze and reason over video inputs.
27+
28+
***
29+
30+
Other model categories from this provider are available as well.
31+
32+
* [Image](../../image-models/google/)&#x20;
33+
* [Video](../../video-models/google/)&#x20;
34+
* [Music](../../vision-models/ocr-optical-character-recognition/google/)&#x20;
35+
* [Vision(OCR)](../../music-models/google/)&#x20;
36+
* [Embedding](../../embedding-models/Google/)

0 commit comments

Comments
 (0)