cocodot
← Back to guides
Local card declined for overseas AI? cocodot: one card + one key
AI APIUpdated 2026-10

LLM Cost per Request vs Cost per Accepted Task: A Team Budget Guide

Compare Haiku, Sonnet, Opus and Fable using token math, retry costs and accepted outputs before routing sustained workloads.

TL;DR: Calculate LLM cost per request from tokens, then budget your product around cost per accepted task. A request is a model attempt; a task is the outcome your customer actually needs. A draft, a checker and a retry can all belong to one task. For a plain request without caching or special pricing conditions, estimated cost is input tokens multiplied by the input rate plus output tokens multiplied by the output rate, with rates expressed per token. When using rates per million tokens, divide both terms by one million. To evaluate a route, add every attempt and divide by the number of outputs that pass the same acceptance criteria. Test Haiku, Sonnet, Opus and Fable against your own examples rather than treating model names as an automatic quality ladder. cocodot bills usage by tokens, with live model rates on its pricing page. New users must complete identity verification before API calls, and trial credit covers selected budget models only. The following worksheet is an application-side evaluation method for teams planning repeated content, support or agent workloads, not a promise of a particular saving.

1. Define the unit your business can actually sell

For a catalog team, the unit might be an approved product description in the correct language. For a support product, it might be a draft an operator can use without correcting facts. Define the required fields, evidence requirements and rejection conditions before running the comparison. Record machine attempts and human rework separately. A cheaper average request is not a better product result if more attempts are needed or more drafts need repair. Keep both request count and accepted task count in the worksheet. If you change the acceptance rule halfway through an experiment, start a new version rather than merging the results. This provides a useful basis for product pricing because the denominator matches the delivered outcome instead of an implementation detail.

2. Make current token rates inputs to the worksheet

For a request without caching or special pricing items, let P be the input rate and Q the output rate, both per million tokens. An assumed request with 8,000 input tokens and 1,000 output tokens has an estimated cost of 0.008P + 0.001Q. Those token counts are an arithmetic example, not observed cocodot traffic or a typical industry workload. Copy current rates and their check date into separate cells so a model change does not require rewriting the calculation. Check the applicable context band and any special pricing conditions before using a rate. Measure your actual request usage rather than converting visible words into an exact charge. Keep the estimated amount beside the eventual charge; unexplained differences are reasons to inspect the record, not to silently adjust the sample.

Plain request estimate; supply current rates from the pricing page
function plainRequestCost(inputTokens, outputTokens, inputPerMillion, outputPerMillion) {
  return (inputTokens * inputPerMillion + outputTokens * outputPerMillion) / 1_000_000;
}
function costPerAcceptedTask(allAttemptCharges, acceptedTasks) {
  if (acceptedTasks === 0) return null;
  return allAttemptCharges.reduce((sum, charge) => sum + charge, 0) / acceptedTasks;
}

3. Evaluate candidates on identical business cases

Build a small sanitized set covering straightforward, ordinary, difficult and malformed inputs. Claude Haiku 4.5 (mch-1) is one candidate to test on bounded structured work, and Claude Sonnet 5.5 (mcs-7) is another to evaluate for your primary route. For unresolved cases, test Claude Opus 5.5 (mco-8) and Claude Fable 5 (mcf-1) separately. This is an experimental ordering, not a claim that a named model always performs better. Compare required fields, factual grounding, tool arguments and rework with the same acceptance conditions. Longer answers are not automatically more useful. Retain failure reasons so you can distinguish a model limitation from missing source material or a defective validator. For the specific model identifiers and integration context, see /hub/claude-opus-55-sonnet-55-api.

4. Include the first attempt when pricing escalation

Suppose the primary attempt costs A and the alternative costs B. If an assumed quarter of tasks reach the alternative after trying the primary, the average model cost per submitted task is A + 0.25B, not 0.75A + 0.25B. The escalated tasks already incurred A. The quarter is a teaching assumption, not a measured performance figure. Add checker calls and any other attempts before dividing total spend by accepted outcomes. Compare this route with sending a recognizable difficult category directly to the alternative. Some inputs can be identified before generation and do not benefit from paying for a preliminary attempt. Keep a maximum attempt count and a stopping condition. Escalation should follow evidence that another route solves a known failure type, rather than automatically running through every available tier.

5. Keep cache categories and output details distinct

Use actual usage records when evaluating reasoning workloads. A short visible answer does not prove the billed output is small. Check whether a reported detail is already included in its parent total before adding it again. The cache rule is: cache hits at half the input price; Claude cache writes at 1.25x the input price (2x for the portion written to the 1-hour cache), the same structure as the official pricing. Keep uncached input, cache reads, cache writes and output in separate worksheet categories. Establish which fields include which categories before calculating totals. Application result reuse, where you make no model request, is a different mechanism from model-side prefix caching. Compare the complete route, since one favorable line item does not establish the total cost of a task.

6. Admit batches against reservations as well as spend

Before dispatch, give each batch a budget, task count and concurrency ceiling. Give each task an attempt limit and a tested output allowance. In your application, reserve an estimated amount atomically before dispatch and reconcile it with actual charges afterward. Account for retries and attempts whose cost remains unresolved. When a cocodot balance runs out, new requests are refused and in-flight requests may still incur charges, with fallback estimates used when usage is missing. A prepaid balance therefore does not provide an exact batch spending cap at the moment several workers dispatch together. Reading the same remaining amount independently is not a reservation system. Longer agents also need a step limit and total deadline. See /hub/agent-api-cost-runaway for related guardrails, implemented in your calling application. Monitor admission decisions as well as completed charges so a slow reconciliation process cannot quietly open more capacity.

7. Keep a versioned record that explains the decision

Create one worksheet row for a task category and candidate route. Suggested columns are sample version, prompt version, primary and fallback model, attempt count, input and output usage, charges, accepted tasks and unresolved records. Divide total charges by accepted tasks. If no outputs pass, label the route as having no accepted delivery instead of presenting an attractive average. Record human rework time separately; lower model spend should not be described as overall efficiency without considering that work. Rerun the same versioned set when prompts, model identifiers or business source material change. Keep unusual long requests visible rather than hiding them in one average. /hub/llm-api-monthly-cost-estimate covers basic monthly planning; this worksheet focuses on the economics of each delivered task and why two routes with similar request prices can behave differently. Implementation boundaries are covered in /hub/saas-multi-model-api-integration.

8. Validate access and funding before sustained use

One cocodot key can request different listed models through the OpenAI-compatible base URL https://cocodot.co/api/ai/v1, with usage billed by tokens. Register, verify email and complete identity verification before testing, then prepare the balance for your selected models and create a key. Free trial credit covers only selected budget models. Funding options are Alipay / WeChat Pay (RMB), USDT / USDC. Listed Claude / GPT / Gemini rates are at or below the official list price; check the pricing page for each model's current rate. Fill the worksheet from https://cocodot.co/pricing and test a bounded real workload before expanding. Review spend, accepted results, rework and queue age by task category after launch. A single blended average can hide a category becoming uneconomical even when the total still looks acceptable.

CandidateSuggested first evaluationEvidence needed before routing
Claude Haiku 4.5 (mch-1)Classification and extractionRequired fields and values verified
Claude Sonnet 5.5 (mcs-7)Routine drafts and coding tasksSame acceptance rules applied
Claude Opus 5.5 (mco-8)Harder planning casesIncremental accepted outcomes
Claude Fable 5 (mcf-1)Unresolved cases from earlier testsExtra cost justified by delivery

FAQ

How much does an LLM API request cost?

Use the actual input and output tokens with the applicable current rates. For a plain request, add input tokens times input rate and output tokens times output rate, dividing by one million when rates are per million tokens. Add the appropriate cache or special pricing items when they apply.

Should bulk work always start on Haiku?

Test Claude Haiku 4.5 (mch-1) and Claude Sonnet 5.5 (mcs-7) on the same examples. Choose by accepted task cost and rework, rather than assuming every bulk request is simple. Some difficult categories can be routed directly to another tested candidate.

When should a team escalate to Opus or Fable?

Evaluate Claude Opus 5.5 (mco-8) or Claude Fable 5 (mcf-1) when the primary route fails a defined requirement and your examples show an alternative helps. Include prior attempts in the cost of that route.

Does a lower token rate guarantee a cheaper request?

No. Input length, generated output, cache treatment and retries affect the total. A per-token price statement concerns that unit rate. Measure complete tasks using the same acceptance rules before concluding that a route saves money.

Can our shared prepaid balance replace batch budgets?

Use your own application admission controls and reservations. When the cocodot balance is depleted, new requests are refused while in-flight requests may still incur charges, with fallback estimates used when usage is missing. Include active and unresolved attempts when deciding whether to dispatch more work.

About cocodot

cocodot is a payment and AI access service for developers and cross-border teams in mainland China. It provides US-BIN virtual cards issued by a licensed institution — used to pay for overseas subscriptions and ad accounts — and an OpenAI-compatible AI API gateway for calling Claude, GPT and Gemini from within mainland China. Both share one wallet, funded by Alipay / WeChat Pay (RMB), USDT / USDC and accounted in USD. Card: $9.9 to open, 3% to load, $1 per active card per month; spending: $0.60 settlement fee on purchases under $20; a corresponding fee applies when the issuer charges one.

Service scope, pricing and limits →