TensorPass

Blog

The cost of one AI answer on a website's own API key

One chat answer costs a site $0.0002 to $0.0082 on its own key and one RAG answer $0.0006 to $0.024, at list prices of 12 November 2026. The arithmetic.

Published on . Updated on

On a site's own API key, one chat answer costs between $0.0002048 and $0.008192 at the list prices of 12 November 2026, and one answer from a retrieval chatbot costs between $0.0005995 and $0.02398. The spread comes from the model: the cheapest and the dearest of the eight models below differ by a factor of 40. At 1,000,000 answers, the same chat costs the site $204.80 on Claude Haiku 5.5 and $8,192 on Claude Opus 5.5. This article shows the arithmetic, states its assumptions, and gives what the site pays when the visitor's own AI answers through AI Connect.

The formula per answer

The inference cost of one answer is the price of the tokens the model reads plus the price of the tokens it writes (inference cost defines the term). Providers list both prices in US dollars per million tokens.

cost per answer = tokens in × price in ÷ 1,000,000 + tokens out × price out ÷ 1,000,000

A chat answer on Claude Sonnet 5.5 works out as 1,748 × $2 ÷ 1,000,000 = $0.003496 for the input, plus 60 × $10 ÷ 1,000,000 = $0.000600 for the output. The answer costs $0.004096. Ten thousand answers cost $40.96, and a million cost $4,096.

Assumptions behind the tables

One chat answer

ModelTokens inTokens outPrice in per 1MPrice out per 1MCost per answerPer 10,000 answersPer 1,000,000 answers
Claude Haiku 5.51,74860$0.10$0.50$0.0002048$2.05$204.80
gpt-5-mini1,74860$0.25$2.00$0.000557$5.57$557.00
gemini-3.5-flash-lite1,74860$0.30$2.50$0.0006744$6.74$674.40
Mistral Large 41,74860$0.70$2.10$0.0013496$13.50$1,349.60
gemini-3.8-flash1,74860$0.75$3.75$0.001536$15.36$1,536.00
gpt-6.1-sol1,74860$2.00$10.00$0.004096$40.96$4,096.00
Claude Sonnet 5.51,74860$2.00$10.00$0.004096$40.96$4,096.00
Claude Opus 5.51,74860$4.00$20.00$0.008192$81.92$8,192.00

Input carries most of the bill for a chat answer. On Claude Sonnet 5.5 the 1,748 input tokens cost $0.003496 and the 60 output tokens $0.0006, so input makes 85% of the cost.

One RAG answer

ModelTokens inTokens outPrice in per 1MPrice out per 1MCost per answerPer 10,000 answersPer 1,000,000 answers
Claude Haiku 5.53,865426$0.10$0.50$0.0005995$6.00$599.50
gpt-5-mini3,865426$0.25$2.00$0.00181825$18.18$1,818.25
gemini-3.5-flash-lite3,865426$0.30$2.50$0.0022245$22.25$2,224.50
Mistral Large 43,865426$0.70$2.10$0.0036001$36.00$3,600.10
gemini-3.8-flash3,865426$0.75$3.75$0.00449625$44.96$4,496.25
gpt-6.1-sol3,865426$2.00$10.00$0.01199$119.90$11,990.00
Claude Sonnet 5.53,865426$2.00$10.00$0.01199$119.90$11,990.00
Claude Opus 5.53,865426$4.00$20.00$0.02398$239.80$23,980.00

A RAG answer costs about 3 times a chat answer on the same model: $0.01199 against $0.004096 on Claude Sonnet 5.5. The RAG input is 2.2 times the chat input, and the RAG answer is 7.1 times longer.

The iterative pipeline

ModelTokens inTokens outPrice in per 1MPrice out per 1MCost per answerPer 10,000 answersPer 1,000,000 answers
Claude Haiku 5.512,8141,207$0.10$0.50$0.0018849$18.85$1,884.90
gemini-3.8-flash12,8141,207$0.75$3.75$0.01413675$141.37$14,136.75
Claude Sonnet 5.512,8141,207$2.00$10.00$0.037698$376.98$37,698.00
Claude Opus 5.512,8141,207$4.00$20.00$0.075396$753.96$75,396.00

The iterative pipeline costs 3.1 times the plain one on Claude Sonnet 5.5, $0.037698 against $0.01199 per answer.

Prices dated to change

gemini-3.8-flash moves from $0.75 and $3.75 to $1.50 and $7.50 on 1 January 2027. From that date a chat answer costs $0.003072 on it and a RAG answer $0.0089925, twice the figures above.

Who pays with AI Connect

With AI Connect, the site's inference line is $0 for every row of the three tables. The site's page sends the conversation to AI Wallet, the extension in the visitor's browser, and the wallet calls the provider with the visitor's own credential: a plan sign in such as ChatGPT or Gemini, or an API key. The provider counts the answer against that account. A visitor on a plan uses the room the plan leaves, and a visitor on a key pays the list prices above. This is the model of bring your own AI.

The wallet shows the room left on each plan or key, and its Auto choice moves to the next account when one runs out of room. The site keeps its measure of each answer: it receives the token counts the provider reported, the model that answered and the finish reason. A site already built on an AI SDK moves its calls to the wallet with aiconnect.fetch, as the AI SDK guide shows. The packages of version 0.1.0 are on npm since 16 November 2026 (AI Connect 0.1.0 is on npm).

Costs the site keeps

The site keeps every cost outside the model's tokens.

Cost lineOn the site's own keyWith AI Connect
Model tokens per answerThe tables above$0 for the site; the visitor's plan or key answers
Pages and their hostingPaid by the sitePaid by the site
MCP serverPaid by the sitePaid by the site
Search index of the site's contentPaid by the sitePaid by the site

The MCP server exposes the site's tools, such as a catalogue search or a booking check, over the Model Context Protocol, and the visitor's model calls them from the page. Each call runs on the site's server, so the server needs bounds and a rate limit, as the MCP guide describes. The free aiconnect-rag-chatbot skill builds a keyword index of the site's pages and serves it as two tools, so a RAG chatbot on AI Connect leaves the site with the cost of the index and the search. The comparison paying for your own inference sets the two models side by side.

Sources

Read the quickstartRead the changelog