Laguna XS 2.1 overview
Laguna XS 2.1 specs
- Model ID
poolside/laguna-xs-2.1- Developer
- Poolside
- Context window
- 262,144 tokens
- Max output
- 32,768 tokens
- Input
- Image, Text
- Output
- Text
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.
Agentic and multi-step workflows
Reliable tool-calling and instruction-following suit agent loops that plan, call tools, and iterate.
Complex reasoning
Extended reasoning improves reliability on multi-step math, logic, and technical analysis.
Long-document analysis
Summarize and extract from contracts, papers, and reports without aggressive chunking.
Use cases
Agentic coding is a documented use case for Laguna XS 2.1, including software engineering work and rapid agentic iteration in Poolside’s coding agent.
Long-horizon coding work is another documented use case, with the model described as suited to long-horizon work on local machines and long-horizon coding work.
Terminal-style tasks are explicitly listed as a use case, including tool-use workflows and shell-driven multi-step tasks.
Local text generation is also documented as an intended use case for the model.
Capabilities
- Function calling
- Reasoning
- Streaming
- Structured outputs
- Web search
Laguna XS 2.1 API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $0.0635 | 1M tokens |
| Output | $0.127 | 1M tokens |
| Cached input | $0.0317 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Laguna XS 2.1 vs other models: token prices
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| Laguna XS 2.1 | $0.0635 | $0.127 |
| $0.0529 | $0.1058 | |
| Reka Edge | $0.1058 | $0.1058 |
| Nova Micro 1.0 | $0.037 | $0.1481 |
| $0.0952 | $0.1904 |
How to use the Laguna XS 2.1 API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "poolside/laguna-xs-2.1",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "poolside/laguna-xs-2.1",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "poolside/laguna-xs-2.1",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
Laguna XS 2.1 FAQ
What is the context window of Laguna XS 2.1?
Laguna XS 2.1 has a 262,144 tokens context window and can return up to 32,768 tokens.
What inputs and outputs does Laguna XS 2.1 support?
Laguna XS 2.1 takes image, text as input and returns text.
What is the model ID for Laguna XS 2.1?
Use poolside/laguna-xs-2.1 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
How much does Laguna XS 2.1 cost?
Laguna XS 2.1 costs $0.0635 input and $0.127 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Does Laguna XS 2.1 support streaming?
Yes, Laguna XS 2.1 can stream responses as they are generated.
Can Laguna XS 2.1 read images?
Yes, Laguna XS 2.1 accepts image input alongside text.
Does Laguna XS 2.1 support tool calling?
Yes, it supports function calling, parallel tool calls, and structured output.

