Your coding agent sets up Keydan in one prompt

Paste the prompt into the agent you already use. It changes the client configuration the project has, keeps the key out of the code and shows you a test answer.

setup prompt
Set up this project to call AI models through Keydan.

- API key: read it from the KEYDAN_API_KEY environment variable; never write it into code or commit it.
- Chat Completions clients: base URL API_BASE_URL/v1
- Messages clients: base URL API_BASE_URL (without /v1)
- Models: kd-auto picks the model for each request; explicitly, kd-balanced by default, kd-max for hard tasks, kd-fast for quick and cheap ones (GET /v1/models lists them).
- Fallbacks: send "models": ["kd-balanced", "kd-fast"] so a busy model hands the request to the next one.
- Errors: retry 429 and 503 with backoff and honour retry-after; send an Idempotency-Key header on retries.
- Long answers: use "stream": true.

Change the client configuration the project already has instead of adding a new library, then run one test
request and show me the answer.

Works in the tools you already use

Editors
  • VS Code
  • Cursor
  • Windsurf
  • JetBrains
  • Zed
  • Neovim
Agents
  • Hermes Agent
  • Claude Code
  • Cline
  • Roo Code
  • Kilo Code
  • OpenCode
  • GitHub Actions
Automation and bots
  • n8n
  • LangChain
  • Open WebUI
  • Docker
  • Telegram bots
  • Prepaid onlyno debts and no surprise charges: past the plan only if you turn it on
  • A key per tooleach with its own limit; revoked in a second
  • Every request in the logtokens, model and price of each call
  • Two standard API formatsthe libraries your tools already use

What the agent does

  1. Reads the key from KEYDAN_API_KEY and never writes it into code.
  2. Sets the base URL for the client the project already has.
  3. Picks kd-balanced by default, kd-max for hard tasks, kd-fast for quick ones.
  4. Adds fallback models and retries 429 and 503 with backoff.
  5. Sends one test request and shows you the answer.

Or set it up by hand

Two environment variables are enough for most clients with a custom base URL.

Quickstart →
shell
# Chat Completions clients
export KEYDAN_API_KEY="…"
export KEYDAN_BASE_URL="$KEYDAN_API_BASE/v1"

# Messages clients
export KEYDAN_BASE_URL="$KEYDAN_API_BASE"

Which model when

Full catalogue →

Models for coding agents
kd-autoLet Keydan choose for each request
kd-balancedThe default for everyday work
kd-maxHard tasks and long reasoning
kd-fastQuick and cheap steps

Ready-made scenarios: copy and hand to your agent

The six tasks people start with most often. Paste the text into Cline, Claude Code or any agent and it sets everything up on your key.

More prompts for agents →
Editor

VS Code in a minute

Cline or Roo Code on your key, kd-auto picks the model.

Set up Cline in this project for Keydan:
API type: OpenAI Compatible
Base URL: $KEYDAN_API_BASE/v1
Key: from the KEYDAN_API_KEY variable
Model: kd-auto
Check it with one short request and tell me it works.
Terminal

Claude Code on one key

Three variables, and the terminal agent works through Keydan.

export ANTHROPIC_BASE_URL=$KEYDAN_API_BASE
export ANTHROPIC_AUTH_TOKEN=$KEYDAN_API_KEY
export ANTHROPIC_MODEL=kd-max
claude
Code

A review of every pull request

The agent reads the diff and leaves comments in GitHub.

Add a GitHub Action to this repository: on every pull request take the diff, send it to Keydan
(Chat Completions, model kd-balanced, key from the KEYDAN_API_KEY secret)
and post a comment: bugs, risks, missing tests. If the diff is over 3,000 lines, list the files only.
Telegram

A support bot in an evening

Answers from your FAQ, hands hard questions to a person.

Build a Telegram bot in Python (aiogram): it answers customers from faq.md,
model kd-fast through Keydan ($KEYDAN_API_BASE/v1, key KEYDAN_API_KEY), remembers the last 10 messages,
forwards hard questions to the manager chat from .env. Add a Dockerfile.
Marketplaces

Product cards in bulk

Titles, descriptions and search keywords from a spreadsheet.

Take products.csv (name, specs, photo link). For every row, through Keydan (kd-balanced), write a title
up to 60 characters, a description up to 1,000 characters and 10 search keywords. Save to cards.csv.
Never invent specs that are not in the row.
Agents

A morning brief on competitors

Prices and new products since yesterday, straight to Telegram.

Every day at 8:00 open the sites from sites.txt, find price changes and new products since yesterday,
make a 10-point brief through Keydan (kd-fast) and send it to Telegram. Keep the previous state in state.json.

Give your agent a key