Xchat1/cursor2api-go

Free gemini-3-flash | cursor不倒我不倒🙏 ❌ 这次倒下啦

What it solves

Cursor2API is a Go service that turns Cursor Web into an OpenAI-compatible API endpoint. Instead of using the original Cursor Web interface directly, you can call it with standard OpenAI chat/completions requests, making it easy to plug into any tool or app that already speaks the OpenAI API format.

How it works

The service runs as a local HTTP server (default port 8002) and translates incoming OpenAI-style requests into Cursor Web calls. It supports non-streaming and streaming chat, tool/function calling (tools, tool_choice, tool_calls), API key authentication, and automatic exposure of a -thinking variant for each base model. Configuration is done via environment variables (PORT, API_KEY, MODELS, TIMEOUT, DEBUG, KILO_TOOL_STRICT). It also includes a health check endpoint and a debug mode that logs detailed request info. Deployment is possible via source build, Docker, Docker Compose, or a Linux systemd service.

Who it's for

Developers who want to use Cursor Web's capabilities (currently the Gemini 3 Flash model) inside any application that supports a custom OpenAI API endpoint, such as ChatGPT Next Web, Lobe Chat, or other agent orchestrators. It is also useful for those who need a lightweight, self-hosted gateway with tool-calling support and minimal setup.

Highlights

  • OpenAI chat/completions compatible API, so existing OpenAI clients work with minimal changes.
  • Supports streaming and non-streaming responses.
  • Full tool-calling support (tools, tool_choice, tool_calls).
  • Automatically publishes a -thinking model (e.g., gemini-3-flash-thinking) derived from the base model.
  • Configurable via environment variables, including KILO_TOOL_STRICT for better compatibility with orchestrators that force tool use.
  • Available as Docker image, Docker Compose, systemd service, or local scripts (Linux/macOS and Windows).
  • Built-in health check and optional debug logging for easier troubleshooting.

Related

  • Project
  • Project
  • Project
  • Project