Skip to content
Docs · 2026-05-25

TL;DR: Any client built for OpenAI works with jusCode. Set base_url to https://api.juscode.co/v1 and api_key to a jcg_ token. Both /v1/chat/completions and /v1/responses are supported. Streaming, tool use, vision, and JSON mode all pass through.

OpenAI-compatible drop-in

If your tool can talk to api.openai.com, it can talk to jusCode. Change two lines of config (base_url and api_key) and you're routed through jusCode with no other code changes. We support both the Chat Completions API (/v1/chat/completions) and the Responses API (/v1/responses).

TL;DR

base_url:  https://api.juscode.co/v1
api_key:   jcg_your_key_here   (mint at https://juscode.co/developer)
model:     jusCode-auto        (or any provider/model, we'll route it)

That's the entire integration.

Per-tool quickstart

Cursor

Settings → Models → Override OpenAI Base URL: https://api.juscode.co/v1
Settings → Models → OpenAI API key: jcg_…

Toggle "Use custom OpenAI key for all models" → on.

Aider

export OPENAI_API_BASE="https://api.juscode.co/v1"
export OPENAI_API_KEY="jcg_..."
aider --model openai/jusCode-auto

Cline (VS Code extension)

Cline Settings → API Provider: "OpenAI Compatible"
  Base URL: https://api.juscode.co/v1
  API Key:  jcg_...
  Model:    jusCode-auto

Continue (VS Code / JetBrains)

~/.continue/config.json:

{
  "models": [{
    "title": "jusCode",
    "provider": "openai",
    "apiBase": "https://api.juscode.co/v1",
    "apiKey": "jcg_...",
    "model": "jusCode-auto"
  }]
}

Goose (Block)

goose configure
# Provider: OpenAI
# Host: https://api.juscode.co
# API key: jcg_...
# Model: jusCode-auto

OpenAI SDK (Python)

from openai import OpenAI

client = OpenAI(
    base_url="https://api.juscode.co/v1",
    api_key="jcg_...",
)

resp = client.chat.completions.create(
    model="jusCode-auto",
    messages=[{"role": "user", "content": "Refactor this function for readability."}],
)
print(resp.choices[0].message.content)

OpenAI SDK (Node)

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.juscode.co/v1",
  apiKey: process.env.JUSCODE_API_KEY,
});

const resp = await client.chat.completions.create({
  model: "jusCode-auto",
  messages: [{ role: "user", content: "Explain this stack trace." }],
});
console.log(resp.choices[0].message.content);

curl

curl https://api.juscode.co/v1/chat/completions \
  -H "Authorization: Bearer jcg_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jusCode-auto",
    "messages": [{"role":"user","content":"Hello"}],
    "stream": true
  }'

What we forward, normalize, or override

FeatureBehavior
modeljusCode-auto lets us pick; a specific id (e.g. anthropic/claude-sonnet-4.5) is honored
messagespassed through
tools / function_callnormalized between OpenAI and Anthropic shapes automatically
stream: trueSSE forwarded transparently; usage frame included at end
temperature, top_p, max_tokenspassed through (clamped to model limits)
seed, logprobspassed if upstream supports; ignored if not
usage.cost (response)set by jusCode in microdollars, even when upstream doesn't report it

Responses API

The newer Responses endpoint (/v1/responses) is supported with the same auth and base URL. Use it if your harness prefers stateful conversations:

curl https://api.juscode.co/v1/responses \
  -H "Authorization: Bearer jcg_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jusCode-auto",
    "input": "Write a Python function to compute Fibonacci."
  }'

Errors you might see

StatusCodeWhat it means
401INVALID_KEYWrong / revoked / expired jcg_ token
402INSUFFICIENT_CREDITSWallet is empty; top up at /developer → Billing
403SEAT_REQUIRED>1 member, no seat sub; subscribe in Billing
429RATE_LIMITPer-key or per-tenant RPM; wait or raise the cap
502UPSTREAM_ERRORUpstream model temporarily down; retry

Uninstall

Remove the jusCode env vars in one command:

curl -fsSL https://juscode.co/install/uninstall.sh | sh      # macOS · Linux · WSL
irm https://juscode.co/install/uninstall.ps1 | iex           # Windows PowerShell

This clears OPENAI_API_BASE / OPENAI_API_KEY (on Windows, only when they point at jusCode, so a real OpenAI key is left alone). Tools that store the key in their own settings (Cursor, Cline, Continue) also need that entry removed by hand. Full details: Uninstall jusCode.


Agent-readable raw markdown: /docs/openai-drop-in.md