DEV Community

Namak7678
Namak7678

Posted on Edited on

Use an OpenAI-Compatible API in Cursor, Continue, and Open WebUI (N3mak Gateway)

If a tool already speaks the OpenAI Chat Completions shape, you can usually point it at any compatible base URL. This guide walks through three common setups — Cursor, Continue, and Open WebUI — using the public N3mak AI Gateway.

No vendor lock-in magic: you set a base URL, a Bearer key, and a model id. Everything below is what the gateway actually accepts today.

What you need

Base URL https://n3mak-gateway.n3mak.workers.dev/v1
API key Starts with n3k_ (use n3k_YOUR_KEY in examples — never paste a live key into docs or git)
Default model gpt-oss-20b
Auth header Authorization: Bearer n3k_YOUR_KEY

The gateway exposes OpenAI-style routes including:

  • GET /v1/models (requires a valid Bearer key)
  • POST /v1/chat/completions (non-stream and simple SSE stream)

If you omit model, the worker defaults to gpt-oss-20b.

Models by plan (exact public ids)

Plan Allowed model ids
Trial gpt-oss-20b
Pioneer ($3) gpt-oss-20b, llama-3.1-8b
Starter ($9) Pioneer list + gpt-oss-120b, mistral-small-3.1-24b, qwen2.5-coder-32b
Pro ($49) All of the above + llama-3.3-70b

Use the short public ids above in clients. Prefer those over prefixed aliases.

Marketing note: day-to-day we point people at the free trial and Pioneer. Higher plans exist in the worker; promote them only when you need their model list or limits.

Quick smoke test (curl)

Replace the placeholder locally — do not commit a real key.

curl https://n3mak-gateway.n3mak.workers.dev/v1/chat/completions \
  -H "Authorization: Bearer n3k_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-oss-20b",
    "messages": [{"role": "user", "content": "Hello from N3mak"}]
  }'
Enter fullscreen mode Exit fullscreen mode

Optional discovery:

curl https://n3mak-gateway.n3mak.workers.dev/v1/models \
  -H "Authorization: Bearer n3k_YOUR_KEY"
Enter fullscreen mode Exit fullscreen mode

1) Cursor

  1. Open Cursor Settings → Models (macOS Cmd+Shift+J / Windows & Linux Ctrl+Shift+J).
  2. Under API Keys, paste your key into OpenAI API Key → n3k_YOUR_KEY.
  3. Enable Override OpenAI Base URL.
  4. Set the URL to exactly:

https://n3mak-gateway.n3mak.workers.dev/v1

Include /v1. Do not append /chat/completions.

  1. Add custom model with name / id: gpt-oss-20b (Pioneer keys may also use llama-3.1-8b.)
  2. Select that model in Chat or the local Agent and send a short test message.

Cursor caveats

  • Override is global for OpenAI-family traffic while it is on. Cursor-managed OpenAI models may also be routed to your custom base URL. Turn override off when you want Cursor's own subscription models again.
  • Bring-your-own-key / custom gateway applies to local Chat & Agent only. It does not cover Cursor Tab, Auto, Cloud/Background Agents, Automations, Cursor CLI, or the Cursor API/SDK.

2) Continue

Edit ~/.continue/config.yaml (or your project Continue config):

name: N3mak
version: 0.0.1
schema: v1

models:
  - name: N3mak gpt-oss-20b
    provider: openai
    model: gpt-oss-20b
    apiBase: https://n3mak-gateway.n3mak.workers.dev/v1
    apiKey: n3k_YOUR_KEY
Enter fullscreen mode Exit fullscreen mode

Reload Continue / restart the IDE extension, then pick N3mak gpt-oss-20b.

Continue caveats

  • Keep apiBase ending in /v1.
  • N3mak's worker exposes chat completions. Keep model on the allow-list for your plan. If a client tries a Responses-style path and misbehaves, Continue's docs mention forcing /chat/completions via useResponsesApi: false — use that only if you hit the issue.

3) Open WebUI

  1. Open WebUI → Settings → Admin → Connections.
  2. Under Manage OpenAI API Connections, click ➕ Add Connection.
  3. URL / Base URL: https://n3mak-gateway.n3mak.workers.dev/v1
  4. API Key: n3k_YOUR_KEY
  5. Provider (Advanced): leave Default (plain OpenAI-compatible).
  6. Click Verify Connection (it calls GET /v1/models). If verify fails but chat works, add model ids manually (gpt-oss-20b, plus any others allowed on your plan).
  7. Save, then select the model in chat.

Environment alternative:

OPENAI_API_BASE_URL=https://n3mak-gateway.n3mak.workers.dev/v1
OPENAI_API_KEY=n3k_YOUR_KEY
Enter fullscreen mode Exit fullscreen mode

Open WebUI caveats

  • Chat needs POST /v1/chat/completions. GET /v1/models helps discovery.
  • Embeddings / TTS / image endpoints are not assumed here — this guide only covers chat.
  • Use exactly …/v1 (no trailing-slash games).

Troubleshooting

Symptom Likely cause
model_not_found Typo — use the exact public ids from the table
model_not_allowed / 403 Model not on your plan's allow-list
401 Missing or bad Bearer n3k_… key
Cursor "works" but subscription models break Leave Override OpenAI Base URL on — turn it off when not using the custom gateway

Security

  • Never commit real n3k_ keys to git, screenshots, or public posts.
  • Rotate a key if it leaks (bot / support path).

Try it free (no card)

Want a key before you buy?

Type /trial in @N3mak_bot.

  • 24 hours
  • 20 requests/day (also 5 requests/minute)
  • Model: gpt-oss-20b only
  • No card — no Whop payment on the trial path

After the trial, Pioneer ($3) uses the same gateway style; paid keys are delivered through @N3mak_bot within a few hours of Whop payment (not instant). Store: n3mak-buy.vercel.app · Pioneer checkout: whop.com/checkout/plan_n2uiwphhI5YG7.


Disclosure: this article was written by the **N3mak team* (company: AI N3mak globally), the makers of the N3mak AI Gateway. Steps for Cursor, Continue, and Open WebUI follow those products' public docs plus our live gateway behavior. We do not claim to be cheaper than any other provider — configure the clients, measure for your workload, and decide.*

Top comments (0)