Coding harness

Cursor

Run Cursor chat on sference with one command — sference launch cursor configures Cursor's own-API-key mode, with Cursor's own models alongside.

Cursor

Cursor's own-API-key (BYOK) mode accepts any OpenAI-compatible endpoint. The sference CLI configures it for you: one command writes the sference base URL, your key, and the live model catalog into Cursor's settings, and new chats use sference models at open-model token prices.

Requires a paid Cursor plan

BYOK is a paid-plan feature. Cursor must be signed in on Pro, Business, or Enterprise — the launcher checks and refuses on the free plan.

Fastest path: sference launch cursor

curl -fsSL https://raw.githubusercontent.com/s-ference/sference/main/install.sh | sh
sference auth login
sference launch cursor

Quit Cursor first — it rewrites its settings from memory on exit, which would discard the change (the launcher refuses while Cursor is running; --force overrides, and you then fully restart Cursor). Start Cursor again and new chats use moonshotai/Kimi-K3 on sference; every catalog model is in the model picker.

CommandWhat it does
sference launch cursorTurn sference routing on (writes Cursor's settings in one transaction)
sference launch cursor --model zai-org/GLM-5.3Pick the default model for new chats
sference launch cursor --sference-onlyHide Cursor-provided models, leaving only sference models
sference launch cursor --dry-runPrint what would change without writing anything
sference launch cursor statusShow whether Cursor chats on sference right now
sference launch cursor offRestore Cursor's previous settings
sference launch cursor off --revoke-keyAlso revoke the API key the launcher created

Re-running sference launch cursor is safe and idempotent — it is also how new catalog models get into Cursor's picker later.

Key handling. With an sk_... key (SFERENCE_API_KEY or --api-key) that key is stored in Cursor directly. With a device login the launcher creates a dedicated API key (tagged sference-cli-cursor, listed in Console → API Keys) so your 24-hour device token never lands in another app. If Cursor already has an OpenAI key saved, the launcher refuses rather than overwrite it — pass --replace-existing-key to replace it (the old key cannot be restored).

Going back. sference launch cursor off restores the exact settings from before the first run (kept in ~/.sference/cursor/backup.json), removing only the key the launcher wrote. Add --revoke-key to also revoke a launcher-created key server-side.

What runs where

BYOK covers chat and the model picker only. Tab completions, chat titles, Agent Review (Bugbot), and cloud agents keep running on Cursor's own models — that is inherent to Cursor, not a launcher limitation. Picking a Cursor-provided model (grok, composer, …) in a chat while BYOK is on errors, because Cursor sends that model to the sference endpoint too; use --sference-only if you want those rows hidden.

Choosing a model

ModelInput / output per 1MUse for
zai-org/GLM-5.3-Flash0.20 / 0.60Quick chats, small edits
zai-org/GLM-5.31.20 / 4.20General coding turns, agent mode
deepseek-ai/DeepSeek-V4.1-Flash-10170.50 / 1.50Long-context work at low cost
moonshotai/Kimi-K33.00 / 15.00Hard planning turns (the launcher's default)

Live ids and rates: GET https://api.sference.com/v1/models.

Cost control

  • Prefix caching is the main lever — Cursor resends the system prompt and file context every turn. Keep the stable part first. See Prompt caching.
  • Per-engineer attribution. The launcher-created key is unique per machine and shows up separately in GET /control/v1/usage/by-key. See Usage & analytics.

Vision

Some catalog models accept images (check capabilities.image_input.supported on GET /v1/models; moonshotai/Kimi-K3 is one). Cursor's image attachments in chat go through as content parts. See Images and vision.

Alternative: manual setup

The launcher automates exactly this, so prefer it — but the underlying settings are ordinary Cursor BYOK settings: Settings → Models → OpenAI API Key, then enable Override OpenAI Base URL:

FieldValue
Base URLhttps://api.sference.com/v1
API Keyyour sk_... sference key
Modela catalog id, e.g. zai-org/GLM-5.3

Add each model you want by name — Cursor does not enumerate the provider's catalog when you configure it by hand.

Overriding the base URL affects all custom models

Cursor's override applies to the OpenAI-compatible provider as a whole. If you already use a custom OpenAI-compatible endpoint, switch between the two rather than expecting both to be active at once. Cursor's own hosted models are unaffected.