Three copy-paste snippets. One curl. The integration is wired.
Pick the editor you already use — Claude Code, Cursor, or Aider. Patch the file with the snippet below, paste your existing provider key into API_KEY, then run the curl. A 200 response means the proxy is alive and your key rides through.
The five-minute path
Copy · paste · curl — done.
- Pick the section for your editor and copy the snippet.
- Drop it into the file or project root
.env. - Run the verification curl — 200 = wired.
The setup
Pick your editor. Paste the snippet. Done.
The proxy host is api.promptflint.devand your existing provider key rides in unchanged — only the host swaps. Each section below is one config file. Copy, paste, restart your editor, and the swap is live.
01
Claude Code
Edit ~/.claude/settings.json — the editor reads it on launch. Replace the host with the proxy and keep your existing sk-ant-… key. The "env" block is the exact contract Claude Code reads.
File: ~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.promptflint.dev",
"ANTHROPIC_API_KEY": "sk-ant-…your-existing-key"
}
}02
Cursor
Drop the file at ~/.cursor/.env (or a project-root .env). Use the Anthropic block, or the OpenAI-shape block if you also use GPT models — both point at the same proxy host.
File: ~/.cursor/.env
# Anthropic
ANTHROPIC_BASE_URL=https://api.promptflint.dev
ANTHROPIC_API_KEY=sk-ant-…your-existing-key
# Optional OpenAI-shape models
OPENAI_BASE_URL=https://api.promptflint.dev
OPENAI_API_KEY=sk-…your-existing-key03
Aider
Aider's provider env uses ANTHROPIC_API_BASE / OPENAI_API_BASE — note the underscore _BASE, not _URL — and reads it from the project-root .env. Get the key name right or Aider silently falls back to upstream.
File: .env (project root)
# Anthropic
ANTHROPIC_API_BASE=https://api.promptflint.dev
ANTHROPIC_API_KEY=sk-ant-…your-existing-key
# or OpenAI
OPENAI_API_BASE=https://api.promptflint.dev
OPENAI_API_KEY=sk-…your-existing-keyThe verification
One curl. Same contract. A 200 means the swap is wired.
The proxy exposes /compress — hit it with the key you just patched in. It accepts both your Promptflint token and your Anthropic key, so the curl works the moment your editor config is wired.
curl https://api.promptflint.dev/compress \
-H "Authorization: Bearer $PROMPTFLINT_KEY_OR_ANTHROPIC_KEY" \
-H "content-type: application/json" \
-d '{"prompt":"Refactor this 800-line file into modules. Preserve all exports."}'A 200 response with original_tokens / compressed_tokens confirms the proxy is alive and your key rides through the swap.
Troubleshooting
Three failure modes — and the one line that earns the contract.
ANTHROPIC_API_BASEin Aider (notANTHROPIC_BASE_URL) — an underscore off, and the var is read but ignored.- Quotes around JSON in the curl — escape them inside single quotes, the example above shows the wrapping right.
- Forgetting to restart the editor after the config patch — Claude Code and Cursor read
.envon launch, not on every prompt.
Need a human?
Stuck on the patch — write to us.
We'll trade notes on the key name for your tool, or walk a route through the proxy.
promptflint@polsia.app
Plug it in
BASE_URL swapped. API_KEY kept. That is the entire integration.
No SDK. No agent-side code. Your provider key keeps working against the same Anthropic or OpenAI contract — only now the compression stack is between you and the model.
Inbox
The first 200 is free.
Run the curl above against api.promptflint.dev/compress — the response shows the compression the proxy is doing on real traffic from your pipeline.
api.promptflint.dev