Skip to content

Cursor compatibility ​

Cursor's bring-your-own-key (BYOK) settings and OpenAI Base URL override require an active Cursor Pro subscription. Even for Pro users, these settings cover only part of its standard chat traffic and cannot move every Cursor AI feature to LAYSO AI.

Cursor has explicit third-party API limitations

  • Cursor Pro is required: the free plan cannot use the custom API key and Base URL setup described here. Without Pro, use one of the alternatives below.
  • Tab completion does not use custom APIs: it continues to use Cursor's built-in models.
  • Custom APIs primarily cover standard chat models: reasoning, Agent, and Composer behavior can depend on the current client implementation.
  • Cursor-owned models do not run through LAYSO AI: Auto, Composer, or Cursor-managed models may fall back to Cursor services or return an error.
  • The OpenAI Base URL is a global override: separate endpoints cannot currently be stored per custom model.
  • Requests still pass through Cursor's backend: Cursor performs final prompt construction there even when you supply your own key.

For these reasons, Cursor's built-in AI features are not the recommended primary way to use LAYSO AI.

Cursor supports most VS Code extensions. Keep Cursor as the editor and connect LAYSO AI through an extension instead of relying on Cursor's built-in BYOK support.

  1. Open the Extensions panel in Cursor.
  2. Install Cline, or follow the GitHub Copilot guide to install OAI Compatible Provider for Copilot.
  3. Follow the matching guide to enter the LAYSO AI Base URL, API key, and exact model ID.
  4. Reload Cursor and select the LAYSO AI model from the extension's model picker.
Extension approachBest forTutorial
ClineA coding agent inside Cursor with a custom OpenAI-compatible providerCline setup guide
GitHub CopilotLAYSO AI models in Chat / Agent through OAI Compatible ProviderGitHub Copilot setup guide

Other alternatives ​

For complete access to LAYSO AI models, tool calling, and coding-agent workflows, use one of the dedicated integrations:

ToolWhy use itTutorial
Claude CodeAnthropic-native compatibility for terminal and multi-file workClaude Code tutorial
Codex CLIOpenAI Responses API for agentic codingCodex CLI tutorial
Gemini CLIGemini models and long-context tasksGemini CLI tutorial
OpenCodeOpen-source terminal agent with custom providersOpenCode tutorial
Zed EditorClear in-editor model-provider configurationZed tutorial

Keep using the Cursor editor ​

If you prefer Cursor's editing experience, keep it as your editor and run a LAYSO AI-configured Claude Code, Codex CLI, or Gemini CLI inside the integrated terminal.

Open the terminal with:

  • macOS: hold Control and press the backtick key near the top-left of the keyboard.
  • Windows / Linux: hold Ctrl and press the backtick key near the top-left of the keyboard.

Then run a tool from the project directory:

bash
# Claude Code
claude "Analyze this project and suggest the next changes"

# Codex CLI
codex "Fix the currently failing tests"

# Gemini CLI
gemini "Summarize the structure of this repository"

The CLI reads the same project directory that is open in Cursor. You can keep reviewing and editing files in Cursor while the selected CLI sends model requests using its LAYSO AI configuration.

Test Cursor's custom API support with Pro ​

The following steps are only for users with an active Cursor Pro subscription. Without Pro, the custom API controls or verification flow are unavailable; use one of the alternatives above instead.

If you have Pro and only need standard chat models, you can try Cursor's OpenAI-compatible path. This does not imply that Tab, Auto, Composer, Background Agent, or other Cursor-specific features will use LAYSO AI.

Step 1: Prepare a key and model ID ​

  1. Create a key on the LAYSO AI API Keys page ↗.
  2. Choose a model on the Models & Pricing page ↗ and copy its exact model ID.

Step 2: Open Cursor Models settings ​

Go to Cursor Settings → Models and find OpenAI API Key and Override OpenAI Base URL. If the fields are missing, first confirm that the signed-in account has an active Cursor Pro subscription. If Pro is active but the controls are still absent, update Cursor.

Step 3: Enter the OpenAI-compatible settings ​

FieldValue
OpenAI API KeyKey copied from the LAYSO AI Keys page
Override OpenAI Base URLhttps://api.layso.ai/v1
Custom ModelExact model ID copied from Models & Pricing

Click Verify, then manually add the model ID under Custom Models. Do not select a Cursor-owned model, Auto, or Composer when testing the custom endpoint.

Step 4: Verify with standard chat ​

Explicitly select the custom model in chat and send a short message. If Agent mode returns tool-schema, Responses API, or looping errors, switch to standard Chat / Ask mode. That is a Cursor BYOK compatibility boundary and does not necessarily indicate a bad key or LAYSO AI outage.

To restore Cursor's built-in models, disable Override OpenAI Base URL first. The setting is global and can route built-in OpenAI-compatible selections to the custom endpoint while it remains enabled.

Why the integration is incomplete ​

Tab uses a specialized model ​

Cursor's documentation says custom API keys work with standard chat models only. Features that need specialized models, including Tab Completion, continue to use Cursor's built-in models and cannot be redirected to LAYSO AI with a Base URL change.

Agent and tool calling depend on the client ​

Different Cursor releases can use different message and tool-call formats for Agent requests. Standard chat may connect while tool calls, long-running tasks, or Background Agent fail. This page therefore treats the setup as a compatibility test, not a guarantee of complete Agent support.

Auto and Cursor-owned models are not custom providers ​

Auto chooses from Cursor-managed models. Composer and Cursor Tab are also Cursor-owned capabilities. Entering a LAYSO AI Base URL does not convert them into LAYSO AI requests.

Base URLs are not isolated per model ​

Override OpenAI Base URL globally affects OpenAI-compatible traffic. Separate endpoints and keys cannot currently be stored per custom model, so you normally need to disable the override when returning to Cursor-managed models.

Requests do not bypass Cursor's backend ​

Cursor's privacy documentation states that requests still pass through its backend for final prompt construction, even with your own key. If code and prompts must travel only between a local tool and LAYSO AI, use a standalone client such as Claude Code, Codex CLI, Gemini CLI, or OpenCode.

Troubleshooting ​

Verify fails ​

  • Confirm that the signed-in account has an active Cursor Pro subscription; the free plan cannot use this setup.
  • Copy the key again from the API Keys page and remove spaces or line breaks.
  • The Base URL must be https://api.layso.ai/v1.
  • Confirm your network can reach LAYSO AI.
  • If the same key works in another LAYSO AI integration but Cursor still rejects it, treat the issue as a client compatibility problem first.

The custom model is unavailable ​

Select the exact model ID that you manually added, not a Cursor-managed model. Use the Models & Pricing page as the source of truth.

Tab still creates Cursor usage ​

This is expected. Tab does not use the custom API and remains subject to Cursor's own models and billing rules.

There is no LAYSO AI charge record ​

LAYSO AI creates an itemized charge only when the request reaches LAYSO AI and completes successfully. No LAYSO AI charge is created when Cursor rejects the model before sending, switches to a built-in model, or the task fails.

Billing and privacy boundaries ​

  • Successful LAYSO AI requests are billed at the current model price and receive an itemized charge.
  • Failed tasks are not charged by LAYSO AI.
  • Cursor-managed models, Tab, and subscription fees belong to Cursor's billing, not LAYSO AI.
  • Never expose a complete API key in screenshots, logs, or project files.
  • Cursor BYOK does not bypass Cursor's backend. Review Cursor's privacy documentation when code privacy is a strict requirement.

LAYSO AI API 文档