为什么要选择 Laguna S 2.1 Free?
Laguna S 2.1 Free 专注解决代码 Agent 执行中的工具调用稳定性问题。
核心优势与特点
- 工具调用对齐:深度优化 JSON Schema 与 Function Calling 输出格式,不易崩溃。
- 轻量且高效:适合高频次任务拆解与多轮 Agent 对话。
- OpenCode 限时免费:无门槛免费使用。
OpenCode Zen 网关提供的免费 Laguna S 2.1 Free API。
Laguna S 2.1 Free 专注解决代码 Agent 执行中的工具调用稳定性问题。
OpenCode Zen 联合各大模型厂商为收集开发者社区反馈,目前限时免费提供该模型。只需在 https://opencode.ai/auth 免费获取 API Key 即可使用标准 OpenAI 格式调用。
可在任何支持 OpenAI 格式的客户端(如 OpenAI Python SDK、Cursor、OpenCode CLI 或本站 Playground)中填写 Base URL 为 https://opencode.ai/zen/v1 即可调用。
Pick a model, paste your own free key, and run. Your key is sent once to call the provider and never stored on our servers.
Pick a model, paste your own free key, and run. Your key is sent once to call the provider and never stored on our servers.
curl https://opencode.ai/zen/v1/chat/completions \
-H "Authorization: Bearer $OPENCODE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "laguna-s.1-free",
"messages": [{"role": "user", "content": "Hello!"}]
}'from openai import OpenAI
client = OpenAI(
base_url="https://opencode.ai/zen/v1",
api_key="YOUR_OPENCODE_API_KEY",
)
response = client.chat.completions.create(
model="laguna-s.1-free",
messages=[{"role": "user", "content": "Write a python function."}],
)
print(response.choices[0].message.content)