# Laminarity API — full agent context
> Authoritative client integration context for the Laminarity OpenAI-compatible routing API.
## Operating rules
- Keep `LAMINARITY_API_KEY` secret and use it only from a trusted server or local agent process.
- Use base URL `https://api.laminarity.ai/v1`.
- Query `GET /models` with the same bearer key before pinning a model; results are project-specific.
- Use `model: "auto"` for Laminarity routing and automatic provider fallback.
- A concrete model id bypasses routing and disables Laminarity fallback for that request.
- Prefer portable fields in `auto` workflows. Apply reasoning effort only to a compatible concrete model.
- Unknown request fields are ignored for forward SDK compatibility. Invalid known fields return an OpenAI-shaped `400` error.
- Laminarity does not currently implement Assistants, Embeddings, image-generation, audio, or moderation APIs.
## Authentication and endpoints
```text
Base URL: https://api.laminarity.ai/v1
Header: Authorization: Bearer $LAMINARITY_API_KEY
GET: /models
POST: /chat/completions
POST: /responses
```
The dashboard uses a separate Firebase authentication boundary. A Firebase token does not authenticate public client endpoints.
Source: https://docs.laminarity.ai/guides/quickstart
# Quickstart
Make an authenticated request, understand `auto`, and inspect the selected provider.
> Verification: contract-tested; checked 2026-09-01; curl, Laminarity public OpenAPI 3.1
## 1. Create a project key
Create an API key in the Laminarity dashboard and store it as `LAMINARITY_API_KEY`. Keys are shown once and must only be used in trusted server-side environments.
```bash
export LAMINARITY_API_KEY=pr-...
```
## 2. List the models available to the key
The models endpoint is authenticated and filtered by the key's project policies and price caps. `auto` appears first when at least one concrete model is eligible.
```bash
curl https://api.laminarity.ai/v1/models \
-H "Authorization: Bearer $LAMINARITY_API_KEY"
```
## 3. Create a chat completion
Use `model: "auto"` to let Laminarity select an eligible model and automatically fall back when appropriate.
```bash
curl https://api.laminarity.ai/v1/chat/completions \
-H "Authorization: Bearer $LAMINARITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [
{"role": "developer", "content": "Answer concisely."},
{"role": "user", "content": "Why is the sky blue?"}
],
"max_completion_tokens": 300
}'
```
## 4. Read the routing result
Responses retain the OpenAI chat-completions shape and add `router_metadata`. It records the selected provider and model, routing reason, latency, and fallback details. OpenAI-compatible clients may ignore this additive field; use the raw response when your application needs it.
> Note: Passing a concrete model id skips Laminarity model selection and automatic fallback. Use `auto` when you want routing.
---
Source: https://docs.laminarity.ai/guides/responses-api
# Responses API (beta)
Use Laminarity's stateless OpenAI Responses-compatible subset for basic response and tool flows.
> Verification: contract-tested; checked 2026-09-01; OpenAI Python SDK, Laminarity public OpenAPI 3.1
## Create a response
The beta Responses endpoint is a stateless translation layer over Laminarity's Chat Completions orchestration. It accepts a string or compatible item list as `input`. `instructions` becomes the developer message, and `model: "auto"` retains Laminarity selection and fallback.
```bash
curl https://api.laminarity.ai/v1/responses \
-H "Authorization: Bearer $LAMINARITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"instructions": "Answer concisely.",
"input": "Give me one launch checklist item."
}'
```
## Use the OpenAI SDK
```python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["LAMINARITY_API_KEY"],
base_url="https://api.laminarity.ai/v1",
)
response = client.responses.create(
model="auto",
instructions="Answer concisely.",
input="Give me one launch checklist item.",
)
print(response.output_text)
```
## Stream typed events
Set `stream: true` to receive Responses-style server-sent events. Text streams emit `response.created`, one or more `response.output_text.delta` events, and `response.completed`. Tool arguments use `response.function_call_arguments.delta`; failures use an `error` event.
## Replay tool results
Function tools are supported. Send the returned `function_call` item and a matching `function_call_output` item in the next request's `input` list.
`previous_response_id` is not supported because Laminarity does not persist response state; `store` is accepted for compatibility but does not add persistence. Replay prior output items explicitly instead. Built-in hosted tools and full reasoning continuity are not part of the current subset.
The streaming lifecycle is intentionally smaller than the full OpenAI API. Unknown top-level fields are ignored, so a successful request does not prove an unsupported feature was executed.
> Note: Chat Completions remains the recommended default for agents and broad OpenAI-compatible clients. The Responses subset shares the same project restrictions, `auto` behavior, price controls, and fallback rules.
## Upstream documentation
- [OpenAI Responses API reference](https://platform.openai.com/docs/api-reference/responses)
---
Source: https://docs.laminarity.ai/guides/hermes-agent
# Hermes Agent
Connect Hermes Agent through a named OpenAI-compatible provider while preserving Laminarity routing.
> Verification: source-checked; checked 2026-09-01; Hermes Agent custom provider
## Store the key
Put the Laminarity key in Hermes' private environment file. Do not place the key directly in `config.yaml`.
```dotenv
# ~/.hermes/.env
LAMINARITY_API_KEY=pr-...
```
## Configure the provider
Define a named custom provider and explicitly select the Chat Completions transport. This prevents Hermes from guessing a different OpenAI API mode from the model name.
```yaml
# ~/.hermes/config.yaml
providers:
laminarity:
api: https://api.laminarity.ai/v1
key_env: LAMINARITY_API_KEY
transport: chat_completions
default_model: auto
model:
default: auto
provider: custom:laminarity
context_length: 64000
# Enable if this agent should send images through Laminarity:
# supports_vision: true
```
> Note: `context_length` controls Hermes history and compression. It is not a Laminarity API limit; 64,000 is a conservative starting value for the virtual `auto` model.
## Verify the connection
Check model access first, then Hermes' local configuration, then a basic chat, and finally a tool-using prompt.
```bash
curl https://api.laminarity.ai/v1/models \
-H "Authorization: Bearer $LAMINARITY_API_KEY"
hermes doctor
hermes chat -q "Reply with exactly: Laminarity connected"
```
## Routing and fallback
`custom:laminarity:auto` keeps Laminarity routing and provider fallback enabled. Selecting a concrete model such as `custom:laminarity:gpt-5.4` pins the request and disables Laminarity routing and fallback.
Avoid adding a second Hermes fallback layer initially. If Hermes auxiliary tasks must also use Laminarity, set their provider to `main` in the Hermes configuration.
> Note: This configuration is based on the current Hermes provider schema. Run the verification flow against staging before treating a particular Hermes release as production-certified.
## Troubleshooting
A `401` usually means the key or `/v1` base URL is wrong. A `402` means the balance or key spend cap was exceeded. A `404 model_not_found` means the model is unknown or excluded by project policy—run `/v1/models` again. A `429` indicates the account rate limit was reached.
## Upstream documentation
- [Hermes custom providers](https://hermes-agent.nousresearch.com/docs/integrations/providers)
- [Hermes configuration](https://hermes-agent.nousresearch.com/docs/user-guide/configuration/)
- [Hermes verification quickstart](https://hermes-agent.nousresearch.com/docs/getting-started/quickstart/)
---
Source: https://docs.laminarity.ai/guides/openai-sdks
# OpenAI SDKs
Use the official Python or TypeScript SDK with Laminarity's base URL.
> Verification: contract-tested; checked 2026-09-01; OpenAI Python SDK, OpenAI JavaScript SDK
## Python
```python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["LAMINARITY_API_KEY"],
base_url="https://api.laminarity.ai/v1",
)
available = client.models.list()
print([model.id for model in available.data])
completion = client.chat.completions.create(
model="auto",
messages=[{"role": "user", "content": "Give me one launch checklist item."}],
)
print(completion.choices[0].message.content)
```
## TypeScript
```typescript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.LAMINARITY_API_KEY,
baseURL: "https://api.laminarity.ai/v1",
});
const completion = await client.chat.completions.create({
model: "auto",
messages: [{ role: "user", content: "Give me one launch checklist item." }],
});
console.log(completion.choices[0].message.content);
```
## Compatibility boundary
Laminarity implements `chat.completions`, `responses`, and `models`; it does not currently implement Assistants, Embeddings, or image-generation APIs. The most portable cross-provider features are messages, streaming, tools, vision input, temperature/top-p/stop, and completion-token limits.
Advanced fields are accepted for SDK compatibility but may only be honored by providers that support them. Keep provider-specific options out of `auto` workflows unless your project restrictions guarantee the target provider.
## Upstream documentation
- [OpenAI official SDK documentation](https://developers.openai.com/api/docs/libraries)
- [OpenAI Python SDK](https://github.com/openai/openai-python)
- [OpenAI Node SDK](https://github.com/openai/openai-node)
---
Source: https://docs.laminarity.ai/guides/vercel-ai-sdk
# Vercel AI SDK
Stream a server-side chat through the OpenAI-compatible provider adapter.
> Verification: source-checked; checked 2026-09-01; Vercel AI SDK OpenAI-compatible provider
## Create the provider
Keep this code in a server route or server action. Never expose a Laminarity key through a browser bundle or a `NEXT_PUBLIC_*` variable.
```typescript
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { streamText } from "ai";
const laminarity = createOpenAICompatible({
name: "laminarity",
apiKey: process.env.LAMINARITY_API_KEY!,
baseURL: "https://api.laminarity.ai/v1",
includeUsage: true,
});
export async function POST(request: Request) {
const { messages } = await request.json();
const result = streamText({
model: laminarity("auto"),
messages,
});
return result.toUIMessageStreamResponse();
}
```
## Model choice
Use `laminarity("auto")` for routing and fallback. Use a concrete id returned by `/v1/models` only when the application intentionally pins a provider model.
## Upstream documentation
- [Vercel AI SDK OpenAI-compatible providers](https://ai-sdk.dev/providers/openai-compatible-providers)
---
Source: https://docs.laminarity.ai/guides/langchain
# LangChain
Point ChatOpenAI at Laminarity for invoke, stream, and tool-enabled agent flows.
> Verification: source-checked; checked 2026-09-01; LangChain ChatOpenAI
## Python
```python
import os
from langchain_openai import ChatOpenAI
model = ChatOpenAI(
model="auto",
api_key=os.environ["LAMINARITY_API_KEY"],
base_url="https://api.laminarity.ai/v1",
)
response = model.invoke("Give me one launch checklist item.")
print(response.content)
```
## Tools and metadata
Use LangChain's normal `bind_tools` flow; Laminarity translates OpenAI-compatible tool definitions and tool results across eligible providers. Some wrappers do not preserve Laminarity's additive `router_metadata`, so use the raw OpenAI SDK or REST API when routing diagnostics are required.
## Upstream documentation
- [LangChain providers and models](https://docs.langchain.com/oss/python/concepts/providers-and-models)
---
Source: https://docs.laminarity.ai/guides/opencode
# OpenCode
Configure Laminarity as an OpenAI-compatible OpenCode provider with model discovery, tools, and explicit reasoning variants.
> Verification: contract-tested; checked 2026-09-01; OpenCode 1.18.26 custom provider — The real CLI configuration, model list, streaming, max_tokens output limit, and low reasoning variant pass a local OpenAI-compatible contract test. Production-key certification is tracked separately.
## Store the credential
Run `/connect`, choose `Other`, enter `laminarity` as the provider id, and paste a Laminarity project key. The provider id must match the key used in `opencode.json`.
OpenCode stores connected credentials outside the project. Do not place a real key in `opencode.json` or commit it to source control.
## Configure Laminarity
Use the OpenAI-compatible AI SDK package so OpenCode calls `/v1/chat/completions`. Keep `auto` available for Laminarity routing, and add only concrete model ids returned to your project key by `GET /v1/models`.
```json
{
"$schema": "https://opencode.ai/config.json",
"model": "laminarity/auto",
"provider": {
"laminarity": {
"npm": "@ai-sdk/openai-compatible",
"name": "Laminarity",
"options": {
"baseURL": "https://api.laminarity.ai/v1"
},
"models": {
"auto": {
"name": "Laminarity Auto",
"tool_call": true,
"limit": { "context": 64000, "output": 16000 }
},
"gpt-5.6-sol": {
"name": "GPT-5.6 Sol via Laminarity",
"tool_call": true,
"reasoning": true,
"variants": {
"none": { "reasoningEffort": "none" },
"low": { "reasoningEffort": "low" },
"medium": { "reasoningEffort": "medium" },
"high": { "reasoningEffort": "high" },
"xhigh": { "reasoningEffort": "xhigh" },
"max": { "reasoningEffort": "max" }
}
}
}
}
}
}
```
> Note: The conservative `auto` context setting controls OpenCode history and compaction; it is not a promise that every routed model has the same native context window.
## Discover models before adding them
The list is authenticated and filtered by project policy and price caps. Re-run it before copying a concrete id into the OpenCode model map.
```bash
curl https://api.laminarity.ai/v1/models \
-H "Authorization: Bearer $LAMINARITY_API_KEY"
```
## Reasoning variants
OpenCode supplies built-in variants for its built-in providers, but a custom provider needs model-specific variants. Define only the effort values advertised for that concrete model by `/v1/models`.
Do not add a reasoning variant to `laminarity/auto`. Automatic requests use Laminarity's model-specific execution profile; a single client-side effort is not portable across every eligible provider.
For GPT-5.6 tool calls, omit reasoning effort or select `none`. Laminarity normalizes legacy `max_tokens` to the modern completion-token field for compatible models.
## Verify the connection
After the basic prompt succeeds, verify a tool-using request and cycle through variants on one concrete reasoning model. A successful `auto` request proves routing connectivity; it does not prove every concrete model is enabled for the key.
```bash
opencode models laminarity
opencode run --model laminarity/auto "Reply with exactly: Laminarity connected"
```
## Java ports built on LangChain4j
If your OpenCode port replaces the AI SDK provider layer with LangChain4j, keep the OpenCode model-selection UI and variant names separate from transport configuration. Map the selected model to `modelName`, map the selected effort to `reasoningEffort`, and use Laminarity's `/v1` base URL and bearer key in the LangChain4j model builder.
Use the LangChain4j guide's runnable Java and Spring Boot configurations as the transport contract. The upstream TypeScript configuration above does not apply verbatim to a Java port.
## Troubleshooting
A missing provider usually means the `/connect` provider id differs from the `provider` key. A missing model means it was not declared in the custom provider map. Refresh `/v1/models` after project-policy changes.
A `400` names an incompatible known parameter. A `401` indicates a missing or invalid key, `402` indicates balance or key-spend limits, `404 model_not_found` indicates an unavailable id, and `429` indicates rate limits.
## Upstream documentation
- [OpenCode custom providers](https://opencode.ai/docs/providers/)
- [OpenCode model variants](https://opencode.ai/docs/models/)
---
Source: https://docs.laminarity.ai/guides/langchain4j
# LangChain4j
Use Laminarity from plain Java, streaming Java, Spring Boot, or a LangChain4j-backed agent provider.
> Verification: contract-tested; checked 2026-09-01; LangChain4j OpenAI integration 1.19.0, Spring Boot starter 1.19.0-beta29 — The plain Java example compiles on Java 17 and passes bearer-auth, max_completion_tokens, and response-parsing contract tests. Production-key certification is tracked separately.
## Add the dependency
```xml
dev.langchain4j
langchain4j-open-ai
1.19.0
```
## Plain Java
Use `auto` for Laminarity selection and fallback. Set `modelName` to an id returned by `/v1/models` only when you intentionally want a direct, no-fallback request.
```java
import dev.langchain4j.model.chat.ChatModel;
import dev.langchain4j.model.openai.OpenAiChatModel;
ChatModel model = OpenAiChatModel.builder()
.baseUrl("https://api.laminarity.ai/v1")
.apiKey(System.getenv("LAMINARITY_API_KEY"))
.modelName("auto")
.maxCompletionTokens(300)
.build();
String answer = model.chat("Give me one launch checklist item.");
System.out.println(answer);
```
## Spring Boot
```properties
langchain4j.open-ai.chat-model.base-url=https://api.laminarity.ai/v1
langchain4j.open-ai.chat-model.api-key=${LAMINARITY_API_KEY}
langchain4j.open-ai.chat-model.model-name=auto
langchain4j.open-ai.chat-model.max-completion-tokens=300
langchain4j.open-ai.chat-model.max-retries=0
```
> Note: Keep provider retries at zero initially. Laminarity already owns fallback for `auto`, and a second retry layer can duplicate billable work.
## Reasoning and token limits
Prefer `maxCompletionTokens` over the deprecated `maxTokens`. Laminarity accepts both and translates the legacy field for modern compatible models.
Set `reasoningEffort` only when using a concrete model that advertises the requested effort in `/v1/models`. Leave it unset for `auto`, because Laminarity applies the selected model's execution profile.
```java
OpenAiChatModel model = OpenAiChatModel.builder()
.baseUrl("https://api.laminarity.ai/v1")
.apiKey(System.getenv("LAMINARITY_API_KEY"))
.modelName("gpt-5.6-sol")
.reasoningEffort("high")
.maxCompletionTokens(1200)
.maxRetries(0)
.build();
```
## Streaming and tools
Use `OpenAiStreamingChatModel` for token streaming and LangChain4j AI Services or normal tool specifications for function calls. Begin with `auto`; pin a concrete model only when its tool and reasoning behavior is required.
Some wrappers do not retain Laminarity's additive `router_metadata`. Use the raw REST response or an OpenAI SDK when the selected provider and fallback trace must be inspected.
## OpenCode Java-port mapping
Treat the OpenCode provider id as UI configuration and LangChain4j as the HTTP transport. Resolve the selected OpenCode model to `modelName`, translate the selected variant to `reasoningEffort`, and never hard-code the project key in Java source.
Cache model discovery only briefly or refresh it on demand. `/v1/models` is project-specific, so a list obtained with one key must not be reused as an authority for another project.
## Compatibility boundary
Laminarity supports the Chat Completions path used by `OpenAiChatModel` and `OpenAiStreamingChatModel`. It does not provide LangChain4j embedding, image-generation, audio, or moderation endpoints.
Do not enable request and response logging in production when prompts may contain secrets or personal data.
## Upstream documentation
- [LangChain4j OpenAI integration](https://docs.langchain4j.dev/integrations/language-models/open-ai/)
- [LangChain4j repository](https://github.com/langchain4j/langchain4j)
---
Source: https://docs.laminarity.ai/guides/kilo-code
# Kilo Code
Add Laminarity as a custom OpenAI-compatible Kilo Code provider with model discovery and explicit capabilities.
> Verification: contract-tested; checked 2026-09-01; Kilo Code CLI 7.5.6 — The real CLI loads the trusted configuration and model list, sends max_tokens, and parses a streaming Chat Completions response against a local contract server. Production-key certification is tracked separately.
## Add a custom provider
Open Kilo Code Settings, choose Providers, select Custom provider, and use `laminarity` as the provider id. Select OpenAI Compatible, enter `https://api.laminarity.ai/v1`, and provide a Laminarity project key.
Kilo can fetch models from the authenticated OpenAI-compatible `/models` endpoint. Review the returned list before saving because project policy and price caps can change it.
## Trusted CLI configuration
For the CLI, use Kilo's documented `openai-compatible` provider id. Put this in Kilo's trusted global config or pass it through `KILO_CONFIG`; do not commit it as a project-level `kilo.json` or `opencode.json`.
Kilo intentionally refuses `{env:...}` resolution in repository config because an untrusted repository could otherwise point the key at an attacker-controlled base URL. A connected credential from the Providers UI is the safer choice for project use.
```json
{
"$schema": "https://app.kilo.ai/config.json",
"model": "openai-compatible/auto",
"provider": {
"openai-compatible": {
"options": {
"apiKey": "{env:LAMINARITY_API_KEY}",
"baseURL": "https://api.laminarity.ai/v1"
},
"models": {
"auto": {
"name": "Laminarity Auto",
"tool_call": true,
"limit": { "context": 64000, "output": 16000 }
}
}
}
}
}
```
## Capabilities and variants
Declare `tool_call`, `reasoning`, attachment support, and token limits for concrete models rather than relying on custom-model fallbacks. Add reasoning variants only to concrete models and only for effort values advertised by `/v1/models`.
Use `openai-compatible/auto` in the CLI, or `laminarity/auto` when that is the provider id created through the UI. A concrete id pins one model and disables Laminarity fallback.
## Verify
Confirm the provider appears in `kilo models`, run a short text request, then run a tool-using request. If a model is missing, refresh discovery and confirm the same key can retrieve it from `/v1/models`. Treat a warning that an environment reference was ignored as evidence that the config is in an untrusted project location; move the credential configuration to a trusted location.
## Upstream documentation
- [Kilo Code custom models](https://kilo.ai/docs/code-with-ai/agents/custom-models)
---
Source: https://docs.laminarity.ai/guides/cline
# Cline
Connect Cline to Laminarity through its OpenAI-compatible provider settings.
> Verification: source-checked; checked 2026-09-01; Cline OpenAI Compatible provider
## Configure the provider
Open Cline Settings and select OpenAI Compatible as the API provider. Enter `https://api.laminarity.ai/v1` as the base URL, paste a Laminarity project key, and use `auto` as the model id.
Use a concrete id from `/v1/models` only if you intend to bypass Laminarity routing and fallback.
## Verify agent behavior
Start with a short response, then ask Cline to inspect a file and make a harmless tool call. Verify streaming completes and that Cline receives the tool result before trying a long coding task.
If Cline asks for model limits, start with a conservative 64,000-token context and 16,000-token output cap for `auto`; these control client-side history and are not universal native model limits.
## Troubleshooting
Refresh `/v1/models` when a concrete model is rejected. Remove OpenAI-only options if an `auto` request reports that the selected provider does not support them. Keep the key in Cline's secret storage rather than workspace settings.
## Upstream documentation
- [Cline OpenAI-compatible provider](https://docs.cline.bot/provider-config/openai-compatible)
---
Source: https://docs.laminarity.ai/guides/openclaw
# OpenClaw
Configure an explicit OpenAI Completions provider for Laminarity without enabling native-provider request shaping.
> Verification: contract-tested; checked 2026-09-01; OpenClaw 2026.7.1-2 custom model provider — The real CLI schema validator and local-agent Chat Completions flow pass with isolated state and a fake key. Production-key certification is tracked separately.
## Configure the provider
Set `api` explicitly to `openai-completions`. This keeps OpenClaw on the Chat Completions transport and avoids native OpenAI-only request shaping.
```json
{
models: {
mode: "merge",
providers: {
laminarity: {
baseUrl: "https://api.laminarity.ai/v1",
apiKey: "${LAMINARITY_API_KEY}",
api: "openai-completions",
timeoutSeconds: 300,
models: [
{
id: "auto",
name: "Laminarity Auto",
reasoning: false,
input: ["text", "image"],
contextWindow: 64000,
maxTokens: 16000
}
]
}
}
},
agents: {
defaults: { model: { primary: "laminarity/auto" } }
}
}
```
## Model metadata
OpenClaw custom providers do not discover every capability automatically. Add concrete models from `/v1/models` and declare reasoning, image input, context, and output limits accurately when you pin them.
Keep `auto` non-reasoning in the client configuration. Laminarity applies the selected model's execution profile during automatic routing.
## Verify
Use OpenClaw's model list and connection test, then run one short response and one tool call. Connection tests make a real provider request and may consume tokens.
## Upstream documentation
- [OpenClaw model providers](https://docs.openclaw.ai/concepts/model-providers)
- [OpenClaw custom providers](https://docs.openclaw.ai/gateway/config-tools)
---
Source: https://docs.laminarity.ai/guides/aider
# Aider
Point Aider's OpenAI-compatible client at Laminarity for routed or model-pinned coding sessions.
> Verification: source-checked; checked 2026-09-01; Aider OpenAI-compatible API support
## Configure the environment
Aider prefixes OpenAI-compatible model ids with `openai/`; the API receives the suffix `auto`. Keep the Laminarity key in the environment or a private `.env` file, not in committed Aider configuration.
```bash
export OPENAI_API_BASE=https://api.laminarity.ai/v1
export OPENAI_API_KEY="$LAMINARITY_API_KEY"
aider --model openai/auto
```
## Pinning and reasoning
Use `openai/auto` for Laminarity routing and fallback. Use `openai/` only after confirming the id with `/v1/models`; concrete requests do not receive Laminarity fallback.
Aider exposes reasoning effort controls for supported models. Apply them only to a compatible concrete model, and leave reasoning unset for `auto`.
## Verify
Start Aider in a temporary repository, ask for a one-line edit, inspect the diff, and undo it. This verifies streaming and edit-tool behavior without risking an active worktree.
## Upstream documentation
- [Aider OpenAI-compatible APIs](https://aider.chat/docs/llms/openai-compat.html)
- [Aider reasoning models](https://aider.chat/docs/config/reasoning.html)
---
Source: https://docs.laminarity.ai/guides/continue
# Continue
Configure Continue's IDE or CLI agent to use Laminarity through Chat Completions.
> Verification: source-checked; checked 2026-09-01; Continue YAML configuration — Prepared as second-wave coverage; client execution certification is pending.
## Store the key
Put `LAMINARITY_API_KEY` in a workspace `.env`, `.continue/.env`, or the global `~/.continue/.env`. Continue IDE extensions do not necessarily inherit variables exported by your shell.
## Configure the model
Set `useResponsesApi: false` so GPT-family names do not make Continue switch to the Responses endpoint. Laminarity's Chat Completions path is the broadest agent and tool compatibility surface.
```yaml
name: Laminarity
version: 1.0.0
schema: v1
models:
- name: Laminarity Auto
provider: openai
model: auto
apiBase: https://api.laminarity.ai/v1
apiKey: ${{ secrets.LAMINARITY_API_KEY }}
useResponsesApi: false
roles:
- chat
- edit
- apply
```
## Model selection
Use `auto` for routing and fallback. Duplicate the model entry with a concrete id from `/v1/models` only when a role must pin one model. Do not configure Continue autocomplete against Laminarity until a completion/FIM endpoint is available.
## Upstream documentation
- [Continue OpenAI-compatible providers](https://docs.continue.dev/customize/model-providers/top-level/openai)
- [Continue secret configuration](https://docs.continue.dev/faqs)
---
Source: https://docs.laminarity.ai/guides/llamaindex
# LlamaIndex
Use LlamaIndex's OpenAILike adapter for Laminarity chat and streaming workflows.
> Verification: source-checked; checked 2026-09-01; llama-index-llms-openai-like — Prepared as second-wave coverage; package contract and live execution are pending.
## Install and configure
```python
pip install llama-index-llms-openai-like
from llama_index.llms.openai_like import OpenAILike
import os
llm = OpenAILike(
model="auto",
api_base="https://api.laminarity.ai/v1",
api_key=os.environ["LAMINARITY_API_KEY"],
is_chat_model=True,
is_function_calling_model=True,
context_window=64000,
)
response = llm.complete("Give me one launch checklist item.")
```
## Compatibility boundary
Use the OpenAILike chat and stream methods. Laminarity does not expose an embeddings endpoint, so configure a separate LlamaIndex embedding model when an index requires one.
The context value is a conservative client-side setting for `auto`; it is not a universal native model limit. Pin only ids returned by `/v1/models`.
## Upstream documentation
- [LlamaIndex OpenAILike API](https://docs.llamaindex.ai/en/stable/api_reference/llms/openai_like/)
---
Source: https://docs.laminarity.ai/guides/open-webui
# Open WebUI
Connect Open WebUI to Laminarity with authenticated model discovery and Chat Completions.
> Verification: source-checked; checked 2026-09-01; Open WebUI OpenAI-compatible connection — Prepared as second-wave coverage; UI and native-tool execution certification are pending.
## Add the connection
In Open WebUI, open Settings, Admin, Connections, and add an OpenAI API connection. Use `https://api.laminarity.ai/v1` as the URL and a Laminarity project key as the API key.
Connection verification calls `/models` with bearer authentication, which Laminarity supports. Optionally filter the visible model ids; include `auto` to preserve routing and fallback.
## Tools and concrete models
Verify plain chat and streaming before enabling native tools. Test at least one complete tool-result round trip because OpenAI-compatible providers can differ in streamed tool-call details.
A concrete id selected in Open WebUI pins the request and disables Laminarity fallback. Refresh the model list after project-policy changes.
## Security
Store the project key in Open WebUI's server-side connection settings. Do not expose an administrative Laminarity key to untrusted Open WebUI users; use a project key with appropriate spend and model limits.
## Upstream documentation
- [Open WebUI OpenAI-compatible connections](https://docs.openwebui.com/getting-started/quick-start/connect-a-provider/starting-with-openai-compatible/)
---
Source: https://docs.laminarity.ai/guides/litellm
# LiteLLM
Call Laminarity through LiteLLM's OpenAI-compatible client or expose it behind a LiteLLM proxy alias.
> Verification: source-checked; checked 2026-09-01; LiteLLM OpenAI-compatible endpoints — Prepared as second-wave coverage; SDK and proxy execution certification are pending.
## Python SDK
The `openai/` prefix selects LiteLLM's OpenAI-compatible Chat Completions transport; Laminarity receives `auto` as the model id.
```python
import os
from litellm import completion
response = completion(
model="openai/auto",
api_base="https://api.laminarity.ai/v1",
api_key=os.environ["LAMINARITY_API_KEY"],
messages=[{"role": "user", "content": "Give me one launch checklist item."}],
max_retries=0,
)
```
## Proxy configuration
```yaml
model_list:
- model_name: laminarity-auto
litellm_params:
model: openai/auto
api_base: https://api.laminarity.ai/v1
api_key: os.environ/LAMINARITY_API_KEY
max_retries: 0
```
## Avoid duplicate routing layers
Disable LiteLLM retries and model fallback for the Laminarity alias when using `auto`; Laminarity already selects and falls back between eligible providers. Layered retries can duplicate latency and billable work.
LiteLLM supports endpoints that Laminarity does not, including embeddings, images, and audio. Point only Chat Completions and the documented stateless Responses subset at Laminarity.
## Upstream documentation
- [LiteLLM OpenAI-compatible endpoints](https://docs.litellm.ai/docs/providers/openai_compatible)
## Request compatibility
Portable features across the current routing pool include developer/system/user/assistant/tool messages, text, vision input, streaming, tools and tool results, temperature, top-p, stop sequences, and completion-token limits.
Provider-dependent fields include strict tool schemas, parallel-tool behavior, structured output details, reasoning controls, service tiers, caching, prediction, audio output, moderation, and web-search options. Accepted does not mean uniformly implemented across every provider.
## Authoritative resources
- OpenAPI: https://docs.laminarity.ai/openapi.json
- Interactive reference: https://docs.laminarity.ai/reference
- Compact agent index: https://docs.laminarity.ai/llms.txt
- Dashboard: https://app.laminarity.ai/dashboard