59API

← Back to all guides

Build a Lower-Cost Claude Support Bot

Guides · EN · 2026-10-12

Start with a cost model, not a chatbot prompt

A customer-support bot becomes expensive when every request is sent to the most capable model with the entire conversation attached. Before writing code, estimate your traffic and token usage. For example, 1,000 support conversations per month with an average of 900 input tokens, 250 output tokens, and two follow-up turns can produce roughly 2.7 million input tokens and 750,000 output tokens. That estimate gives you a measurable budget and makes model selection easier.

Track four values: input tokens, output tokens, requests, and conversations resolved without a human. Your real cost is driven mainly by tokens, so a bot that answers in 80 concise tokens is materially cheaper than one that writes 400-token explanations. Set a monthly ceiling, such as $25 or $100, and alert when usage reaches 70%, 85%, and 100% of the limit.

Route simple questions to cheaper Claude models

Use model routing instead of treating every ticket as equally difficult. Claude Haiku is a practical first choice for order-status questions, password instructions, shipping policies, and intent classification. Send more ambiguous cases to Claude Sonnet. Reserve Claude Opus for escalations that require complex reasoning, long policy documents, or careful account-specific decisions. Fable can be evaluated for supported creative or specialized workflows when its response style fits your product.

A useful three-stage policy is:

For example, routing 80% of 10,000 monthly requests to Haiku, 18% to Sonnet, and 2% to Opus can reduce spend substantially compared with sending all 10,000 requests to Opus. Calculate the result with your current per-million-token rates: multiply each model's input and output usage by its rate, then add the three subtotals. Do not assume a cheaper model is suitable until you test its accuracy on real support tickets.

Reduce tokens without reducing useful context

Do not attach the full chat history to every request. Keep a rolling summary containing the user's goal, confirmed account facts, actions already taken, and unresolved questions. A 150-token summary can replace several thousand tokens of repeated dialogue. Store stable product policies in a searchable knowledge base and retrieve only the two or three relevant passages for each question.

Keep system instructions short and operational. Define the bot's role, required escalation conditions, refund limits, and response format. Remove duplicate rules and long examples that do not affect current decisions. Also cap output length. A 180-token limit is often enough for a support answer, while a longer limit can be enabled only for troubleshooting or policy explanations.

Use caching and deterministic checks

Cache answers for truly stable questions, such as business hours, supported payment methods, or a return-window policy. Give each cached item a version and invalidate it whenever the policy changes. For dynamic requests, cache retrieved documents rather than the final answer, because the user's account and order state may differ.

Add simple checks before calling Claude. If a message matches a known intent with high confidence, return a maintained template. If it contains an order number but no request, ask a focused clarification question. These checks can eliminate thousands of unnecessary model calls each month.

Connect Claude through 59API

59API is a low-cost, pay-as-you-go relay for Claude and GPT models. It provides access to native official-quality models without a downgrade, including Claude Opus, Sonnet, Haiku, and Fable. Set your API client base URL to https://api.59api.com, then use the normal Claude-compatible integration pattern. This is useful when you want to test routing and usage limits without committing to a large platform bill.

Because 59API is compatible with Claude Code, Codex, and any OpenAI SDK, you can reuse existing development and monitoring workflows. Compare your measured token totals against the current 59API rates, then calculate cost per resolved conversation. Its referral rebate can further reduce effective spend for teams that refer other developers. Sign up for 59API when you are ready to run the bot against production-like traffic.

Measure quality and cost together

Review a sample of at least 100 conversations each week. Record resolution rate, escalation rate, incorrect-answer rate, average input tokens, average output tokens, and cost per resolved conversation. A cheaper bot that gives wrong refund instructions is not optimized. Start with conservative routing, collect failure examples, and promote traffic to a less expensive model only when it meets your accuracy threshold.

Pricing · Docs

Ready to get started?

Connect Claude & GPT in minutes at the lowest prices — full-power, never downgraded. Sign up to get your API key.

Sign up free