Skip to content

Cursor, Continue, LiteLLM & other clients

Because the gateway is OpenAI-compatible (and Anthropic-compatible on a different base URL), most AI editors and libraries work by filling in two fields: a base URL and an API key.

Because the gateway is OpenAI-compatible (and Anthropic-compatible on a different base URL), most AI editors and libraries work by filling in two fields: a base URL and an API key.

  • OpenAI dialect: https://www.sleepyai.org/api/v1
  • Anthropic dialect: https://www.sleepyai.org/api
  • Key: your virtual key from Dashboard → API Keys

Cursor

Cursor's Settings → Models → OpenAI API Key area accepts a custom endpoint:

  1. Override OpenAI Base URL → https://www.sleepyai.org/api/v1
  2. OpenAI API Key → your Sleepy virtual key
  3. Choose a model id from the catalogue (or let Cursor list them).

Cursor then routes chat/completions through Sleepy, and every request shows up in Dashboard → Usage.

If Cursor only exposes an "Anthropic" option for a Claude-style model, use base URL https://www.sleepyai.org/api for that entry instead.

Continue (VS Code / JetBrains)

Add an OpenAI-compatible provider in config.json:

{
  "models": [
    {
      "title": "Sleepy GPT-4o",
      "provider": "openai",
      "model": "gpt-4o",
      "apiBase": "https://www.sleepyai.org/api/v1",
      "apiKey": "ork_..."
    }
  ]
}

For a Claude-style model, use Continue's anthropic provider with "apiBase": "https://www.sleepyai.org/api".

LiteLLM

Point LiteLLM's OpenAI-compatible base at Sleepy, or map a model alias:

model_list:
  - model_name: sleepy/gpt-4o
    litellm_params:
      model: openai/gpt-4o
      api_base: https://www.sleepyai.org/api/v1
      api_key: os.environ/SLEEPY_API_KEY

Then call litellm.completion(model="sleepy/gpt-4o", …) as usual.

Other OpenAI-compatible tools

Anything that reads OPENAI_BASE_URL / OPENAI_API_KEY works with:

export OPENAI_BASE_URL="https://www.sleepyai.org/api/v1"
export OPENAI_API_KEY="ork_..."

That covers LangChain, LlamaIndex, most agent frameworks, and one-off scripts.

Claude Code

Claude Code is Anthropic-native, so it needs the Anthropic base URL (…/api) and its own env vars. See the dedicated guide: Anthropic clients.

Tips & gotchas

  • Don't reuse base URLs between dialects. OpenAI wants …/api/v1; Anthropic wants …/api. Mixing them gives 404s.
  • Model ids must come from the catalogue (GET /v1/models). Unknown ids are rejected 403, not passed through.
  • Limits are shared. Requests from these clients draw on the same RPM, rolling windows, and monthly allowance as everything else — see Usage limits.
  • Key generation requires a plan with the API Key Generation feature. If you don't see it, use the CLI / VS Code extension (OAuth) instead.

Next: OpenAI clients · API overview