Skip to content

Commit 5c25b26

Browse files
Merge pull request #439 from aimlapi/agent/add-laguna-m1-docs
Add Laguna M.1 API documentation
2 parents a451e02 + f5c3434 commit 5c25b26

3 files changed

Lines changed: 149 additions & 1 deletion

File tree

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@
288288
* [Sonar](api-references/text-models-llm/perplexity/sonar.md)
289289
* [Sonar Pro](api-references/text-models-llm/perplexity/sonar-pro.md)
290290
* [Poolside](api-references/text-models-llm/Poolside/README.md)
291+
* [Laguna M.1](api-references/text-models-llm/Poolside/laguna-m.1.md)
291292
* [Laguna S 2.1](api-references/text-models-llm/Poolside/laguna-s-2.1.md)
292293
* [Sakana AI](api-references/text-models-llm/Sakana-AI/README.md)
293294
* [Fugu Ultra](api-references/text-models-llm/Sakana-AI/fugu-ultra.md)

docs/api-references/model-database.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Laguna M.1
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+
* `poolside/laguna-m.1`
9+
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
<a href="https://aimlapi.com/app/poolside/laguna-m.1" class="button primary">Try in Playground</a>
14+
{% endcolumn %}
15+
{% endcolumns %}
16+
17+
## Model Overview
18+
19+
Laguna M.1 is available through the AI/ML API.
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.
40+
41+
**4️⃣ (Optional) Tune the request**\
42+
See the API schema below for optional generation settings.
43+
44+
**5️⃣ Run your code**\
45+
Run the updated code in your development environment.
46+
47+
{% hint style="success" %}
48+
For a detailed walkthrough, use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).
49+
{% endhint %}
50+
51+
</details>
52+
53+
## API Schema
54+
55+
{% openapi-operation spec="laguna-m-1" path="/v1/chat/completions" method="post" %}
56+
[OpenAPI laguna-m-1](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/Poolside/laguna-m.1.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+
67+
response = requests.post(
68+
"https://api.aimlapi.com/v1/chat/completions",
69+
headers={
70+
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
71+
"Content-Type": "application/json",
72+
},
73+
json={'model': 'poolside/laguna-m.1', 'messages': ['<message>']},
74+
)
75+
76+
print(response.json())
77+
```
78+
{% endcode %}
79+
{% endtab %}
80+
81+
{% tab title="JavaScript" %}
82+
{% code overflow="wrap" %}
83+
```javascript
84+
const response = await fetch('https://api.aimlapi.com/v1/chat/completions', {
85+
method: 'POST',
86+
headers: {
87+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
88+
'Content-Type': 'application/json',
89+
},
90+
body: JSON.stringify({
91+
"model": "poolside/laguna-m.1",
92+
"messages": [
93+
"<message>"
94+
]
95+
}),
96+
});
97+
98+
console.log(await response.json());
99+
```
100+
{% endcode %}
101+
{% endtab %}
102+
{% endtabs %}
103+
104+
<details>
105+
106+
<summary>Response</summary>
107+
108+
{% code overflow="wrap" %}
109+
```json
110+
{
111+
"id": "chatcmpl-CQ9FPg3osank0dx0k46Z53LTqtXMl",
112+
"object": "chat.completion",
113+
"created": 1762343744,
114+
"choices": [
115+
{
116+
"index": 0,
117+
"message": {
118+
"role": "assistant",
119+
"content": "Hello! I'm just a program, so I don't have feelings, but I'm here and ready to help you. How can I assist you today?",
120+
"refusal": null,
121+
"annotations": null,
122+
"audio": null,
123+
"tool_calls": null
124+
},
125+
"finish_reason": "stop",
126+
"logprobs": null
127+
}
128+
],
129+
"model": "poolside/laguna-m.1",
130+
"usage": {
131+
"prompt_tokens": 137,
132+
"completion_tokens": 914,
133+
"total_tokens": 1051,
134+
"completion_tokens_details": null,
135+
"prompt_tokens_details": null
136+
},
137+
"meta": {
138+
"usage": {
139+
"credits_used": 120000,
140+
"usd_spent": 0.06
141+
}
142+
}
143+
}
144+
```
145+
{% endcode %}
146+
147+
</details>

0 commit comments

Comments
 (0)