whatisgithub

What is composer-api?

standardagents/composer-api — explained in plain English

Analysis updated 2026-05-18

39TypeScriptAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A Cloudflare Worker that exposes Cursor's Composer 2.5 AI as an OpenAI-compatible API endpoint any existing tool can call.

Mindmap

mindmap
  root((composer-api))
    What it does
      Exposes Composer as API
      Translates OpenAI format
      Streams responses
    Tech stack
      TypeScript
      Cloudflare Workers
      Cloudflare D1
    Use cases
      Point OpenAI clients at Composer
      Power OpenCode tool loops
      Self host own instance
    Audience
      Developers building on Composer
      Cursor API users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Point any OpenAI-compatible tool or library at Composer 2.5 by swapping the API base URL.

USE CASE 2

Use Composer 2.5 as the underlying model for OpenCode's tool-execution loop via a dedicated route.

USE CASE 3

Deploy a personal Cloudflare Worker instance to call Cursor's Composer model outside the Cursor editor.

USE CASE 4

Stream chat completions from Composer 2.5 using the standard OpenAI chat completions format.

What is it built with?

TypeScriptCloudflare WorkersCloudflare D1

How does it compare?

standardagents/composer-apichaos-xxl/zelda-hyrule-uicoasty-ai/open-cowork
Stars393939
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyeasy
Complexity3/52/53/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Self-hosting requires a Cloudflare account, a private Cursor backend URL, and configured Wrangler secrets.

So what is it?

Cursor is a code editor that includes an AI assistant called Composer 2.5, but Cursor does not offer that AI as a general-purpose API endpoint that other tools can call. This project bridges that gap. It runs as a small server (a Cloudflare Worker) that accepts requests in the standard OpenAI format and translates them into the internal format that Cursor uses, then streams the response back to the caller. The live deployment is hosted at cursor-api.standardagents.ai. The practical effect is that any tool or library that already knows how to talk to OpenAI can be pointed at this server instead. You supply your own Cursor API key as the authentication token. The key is forwarded directly to Cursor per request and is not stored by the server. The supported endpoints are the standard chat completions endpoint, the responses endpoint, and a models list endpoint. The available model name is composer-2.5. The project includes a second route specifically for a tool called OpenCode. That route keeps a stable conversation identifier across multiple messages, which OpenCode needs to manage its own tool-execution loop locally while still using Composer as the underlying language model. A few OpenAI features are intentionally not supported because Cursor does not expose them through this path: requesting multiple completions at once, log probability outputs, audio output, and background jobs. Token usage counts in responses are estimated from character counts rather than exact token accounting, because Cursor's stream does not include that data. The server is built on Cloudflare's Worker platform and uses a Cloudflare D1 database for an optional legacy flow that stores encrypted keys. Deploying your own instance requires a Cloudflare account, a private Cursor backend URL (which is not public), and a few Wrangler secrets. The README lists the required configuration values and the build and deploy commands.

Copy-paste prompts

Prompt 1
Point my OpenAI-compatible client at cursor-api.standardagents.ai using my Cursor API key.
Prompt 2
Deploy my own instance of composer-api on Cloudflare Workers with the required Wrangler secrets.
Prompt 3
Explain how the OpenCode route keeps a stable conversation identifier across messages.
Prompt 4
Which OpenAI features are not supported by this Composer API bridge, and why?
Prompt 5
Set up chat completions against the composer-2.5 model through this Cloudflare Worker.

Frequently asked questions

What is composer-api?

A Cloudflare Worker that exposes Cursor's Composer 2.5 AI as an OpenAI-compatible API endpoint any existing tool can call.

What language is composer-api written in?

Mainly TypeScript. The stack also includes TypeScript, Cloudflare Workers, Cloudflare D1.

How hard is composer-api to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is composer-api for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.