Skip to content

Integrations

Use FullsendAI with Claude Code

Claude Code speaks Anthropic's Messages API, which FullsendAI serves. Point it at FullsendAI with a few environment variables and it runs on our models, billed per token from your balance.

Set it up#

  1. Create a key on API keys; a monthly spend cap on it is a good idea for an agent.
  2. Set the variables, in your shell or once for good in Claude Code's settings file:
{  "env": {    "ANTHROPIC_BASE_URL": "https://fullsendai.com",    "ANTHROPIC_AUTH_TOKEN": "fs_live_...",    "ANTHROPIC_MODEL": "deepseek-v4.1-flash",    "ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek-v4.1-flash",    "ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-v4.1-flash",    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5.3-flash"  }}
VariableWhat it does
ANTHROPIC_BASE_URLFullsendAI's address, with no /v1: Claude Code adds /v1/messages itself.
ANTHROPIC_AUTH_TOKENYour key, sent as Authorization: Bearer. ANTHROPIC_API_KEY works too.
ANTHROPIC_MODELThe model for the main conversation.
ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODELWhat the opus and sonnet aliases in /model resolve to; set both so no alias asks for a Claude model.
ANTHROPIC_DEFAULT_HAIKU_MODELThe small model for background work (titles, summaries). Older releases call it ANTHROPIC_SMALL_FAST_MODEL.

Start claude and send a message; the call appears in Logs within a second, with the calling app and its cost.

Recommended models#

Model IDUse it forPrice / 1M in / out
nef-4.0Security research: code review, exploit analysis, CTFs and pentest tooling.$0.60 / $2.40

Any live model works; see Models for context windows and grades. For long sessions, a large context window matters more than anything else.

Switching models#

  • In a session: /model glm-5.3-flash (any FullsendAI model ID).
  • For one run: claude --model glm-5.3-flash.
  • For good: change ANTHROPIC_MODEL in the settings file.

Per project#

Put the same env block in a repository's .claude/settings.local.json to use FullsendAI (or a different key or model) only there. Keep keys out of the shared .claude/settings.json, which is usually committed; use $FULLSEND_API_KEY in your shell instead.

Claude Code's own prompt#

On every request, Claude Code sends its own agent instructions beside your message, a few thousand tokens each time. When you connect with npx fullsendai connect, they are left out of its requests, which makes every call lighter. What Claude Code needs to work still goes: your project's folder, platform and shell, CLAUDE.md, its subagents, skills and MCP servers, and every tool definition. Its built-in subagents run without Claude Code's instructions too; your own agents in .claude/agents keep their definitions, and side calls, such as naming a session, keep theirs.

How you connectedWhat happensHow to change it
npx fullsendai connectIts own instructions are left out on the key made for it, until that key is revoked on disconnect.Connect again with --keep-claude-prompt to send them as usual.
Environment variables, by handIts own instructions are sent as usual.Turn it on for that key with PATCH /v1/key: { "strip_claude_prompt": true }, or false to send them again.

It's a setting on the key, not in Claude Code's files, so a Claude Code update can't undo it, and it never reaches your other keys. Anything you add with --append-system-prompt is part of the instructions left out; use --keep-claude-prompt if you rely on it. Every other client's instructions pass through untouched.

What works differently#

  • Reading and editing files, running commands, sub-agents, MCP servers, hooks and images all work: they run on your machine and reach the model as ordinary tool calls.
  • Thinking: Claude Code's thinking setting has no effect, and no thinking is shown. Reasoning models still reason at their default effort.
  • Web search uses one of Anthropic's server tools, which FullsendAI doesn't run.
  • Prompt caching markers are passed through, and cached input is billed at the cheaper cached price. See What's different.

Troubleshooting#

SymptomFix
404 not_found_errorA Claude model name reached us. Set all four model variables above; check /model.
A 404 page or a connection errorRemove any /v1 from ANTHROPIC_BASE_URL.
401 authentication_errorThe key is wrong or revoked, or an older ANTHROPIC_API_KEY in your shell is overriding it.
It still uses your Claude subscriptionRun /logout, then start claude again with the variables set. /status shows which credentials and base URL are in use.
402 billing_errorBalance and plan allowance are used up. Add credit or turn on auto top-up.
429 rate_limit_errorClaude Code retries on its own. If it's key_limit_reached, raise the key's cap.
Every call Claude Code makes, failed ones included, is in Logs with its reason, tokens and cost: the fastest way to see what went wrong.

Stuck? Email [email protected]System statusChangelog