Skip to content

Configure Zed Editor ​

Zed is a high-performance code editor. Add an OpenAI-compatible service through its native LLM Providers settings to select and use LAYSO AI models in Zed Agent.

One key for every platform model

One LAYSO AI API key can access platform models. Successful requests have itemized charges at the selected model's current price; failed tasks are not charged.

Prerequisites ​

Configuration steps ​

Step 1: open Agent settings ​

Press ⌘ + Shift + P on macOS or Ctrl + Shift + P on Windows / Linux, then search for and run:

text
agent: open settings

Step 2: open LLM Providers ​

Search for LLM Providers in the settings sidebar, find AI → General → LLM Providers, and select Configure.

Step 3: add an OpenAI-compatible provider ​

On the LLM Providers page, select + Add Provider in the top-right corner, then choose OpenAI under Compatible APIs.

Step 4: enter the LAYSO AI and model settings ​

Enter these values on the Add OpenAI-Compatible Provider page:

FieldValue
Provider NameLAYSO AI
API URLhttps://api.layso.ai/v1
API KeyComplete key copied from the LAYSO AI API Keys page
Model NameExact model ID copied from Models & Pricing
Max Completion TokensContext length shown on the model page
Max Output TokensMaximum output length supported by the model

To configure more models, select + Add Model. When finished, select Save Provider in the bottom-right corner.

The API URL ends at /v1; do not append /chat/completions, /responses, or a model name. Treat the model and token values in the screenshot as examples and use the current information from Models & Pricing.

Step 5: select the LAYSO AI model ​

Return to Zed Agent and create a new thread. Select the model name at the bottom-right of the input box, expand LAYSO AI in the picker, and choose the model you added.

Step 6: send a test message ​

Confirm that the selected model appears at the bottom-right of the input box, then send a short message such as:

text
Introduce yourself in one sentence.

After receiving a normal response, verify the model, token use, and itemized charge in the LAYSO AI user app.

Scope ​

This guide configures Zed's native Agent. It does not change Claude Code, Codex CLI, Gemini CLI, or OpenCode when those tools run as ACP External Agents in Zed. Configure each External Agent's provider and credentials through its own guide.

Troubleshooting ​

SymptomWhat to check
LLM Providers is missingUpgrade Zed, run agent: open settings, and search for LLM Providers
The provider or model is missingConfirm that you selected Save Provider, then reopen the Agent thread or restart Zed
401 / 403Copy the API key again and make sure it contains no spaces, line breaks, or missing characters
404The API URL must be https://api.layso.ai/v1; do not duplicate /v1 or append a request path
Unknown modelCopy the exact model ID from Models & Pricing instead of using a display name or guessed alias
Output is truncatedCheck that Max Completion Tokens and Max Output Tokens match the model's current limits

Security and billing ​

  • API keys saved through the Zed settings UI are stored in the system keychain, not in project files.
  • Never expose a complete API key in screenshots, logs, chat messages, or a Git repository.
  • LAYSO AI charges only for requests that reach the platform and complete successfully; failed tasks are not charged.

Official references ​

LAYSO AI API 文档