Skip to content
ShipFastDev
All posts

Article

Adding AI Features to Your Product: Use Cases, Costs and Pitfalls

, 7 min read

Adding an AI feature to your product through an LLM API is quick to prototype and, for many text features, cheap to run: in the worked example below, $6 to $120 a month for 20,000 requests. The hard parts are elsewhere: making the feature reliable, measuring its quality, protecting user data and defending against prompt injection. Start with one narrow use case where a wrong answer is easy to catch, build a small test set before launch, and estimate cost from your own token volumes.

Use cases that work well

  • Summarising support tickets, calls, documents or long threads.
  • Extracting structured data from messy text: turning emails, invoices or forms into fields your database understands.
  • Classifying and routing: tagging tickets, detecting language or intent, flagging content for review.
  • Drafting for a human to approve: reply suggestions, product descriptions, first drafts of reports.
  • Answering questions over your own content, by retrieving relevant documents and passing them to the model.
  • Translation, for example between English and French, with a human check on anything customer-facing.

Be careful with features where a confident wrong answer causes real harm (medical, legal or financial advice) and with agents that take actions on their own. Start with "AI suggests, human decides" and widen autonomy only once you have data. If you are still deciding what to build, our guide on how to scope an MVP applies to AI features too.

What it costs: token pricing explained

LLM APIs charge per token, separately for input (what you send) and output (what the model writes). Anthropic's pricing page gives a rule of thumb: one token is roughly 4 characters or 0.75 words in English, and the count varies by language. Prices on the official pages in October 2026, in US dollars per million tokens (input / output):

  • Anthropic: Claude Haiku 4.5 $1 / $5; Claude Sonnet 5.5 $2 / $10; Claude Opus 5.5 $4 / $20.
  • OpenAI (pricing, standard tier, short context): gpt-6-luna $0.10 / $0.50; gpt-6.1-sol $2 / $10; gpt-6-astra $10 / $50.
  • Google (Gemini API, paid tier): Gemini 3.1 Flash-Lite $0.25 / $1.50 for text; Gemini 2.5 Pro $1.25 / $10 for prompts up to 200,000 tokens.

All three offer a batch mode at 50% off for work that doesn't need an immediate answer, and discounted cached input when you reuse the same prompt prefix (on most Claude models, a cache hit costs 10% of the base input price). Anthropic also notes that Claude 4.7 and later models use a tokenizer that produces about 30% more tokens for the same text, so compare costs on your own data, not only on list prices.

A worked example

Assumptions: a feature that drafts replies to support tickets, 20,000 requests a month, each sending 1,500 input tokens (instructions, ticket and a few help-centre passages) and receiving 300 output tokens. That is 30 million input and 6 million output tokens a month.

  • gpt-6-luna: 30 × $0.10 + 6 × $0.50 = $6 a month
  • Gemini 3.1 Flash-Lite: 30 × $0.25 + 6 × $1.50 = $16.50 a month
  • Claude Haiku 4.5: 30 × $1 + 6 × $5 = $60 a month
  • Claude Sonnet 5.5 or gpt-6.1-sol: 30 × $2 + 6 × $10 = $120 a month

This excludes development and test traffic, evaluation runs, retries, paid tools such as web search (Anthropic charges $10 per 1,000 searches), and taxes. Even so, for most early-stage products the model bill is small compared with the engineering time to build, evaluate and maintain the feature.

What drives the bill up

  • Long inputs: whole documents, or chat history re-sent on every turn.
  • Several calls per user action: agents and multi-step pipelines multiply requests.
  • Using a large model for a simple task: classification rarely needs the most capable model.
  • No limits: OWASP lists "unbounded consumption" among the top LLM risks. Set per-user quotas and spending alerts.

Latency: design for waiting

Model responses take noticeably longer than a typical database query. Anthropic's latency guide recommends three levers: choose a faster model where quality allows, keep prompts and outputs short (and cap output length), and stream responses so users see text as it is generated. It also distinguishes total latency from time to first token, the delay before the first word appears, which is what users feel most with streaming. For long tasks such as processing a whole document, run the job in the background and notify the user when it is done.

Privacy and data protection

  • Training on your data. OpenAI states that since 1 March 2023, data sent to its API is not used to train its models unless you opt in. By default, abuse-monitoring logs are kept for up to 30 days; zero data retention is available with approval, and a European data-residency option exists. Google's Gemini pricing page says content on the free tier is used to improve its products, while paid-tier content is not.
  • Regional processing may cost more: Anthropic, for example, applies a 1.1x multiplier for US-only inference.
  • Your obligations. Send only the data the feature needs, list the AI provider as a processor in your privacy policy and contracts, and check the provider's data processing terms against your customers' requirements.

Evaluation: test before you trust

An LLM feature that works in a demo can still fail on the inputs nobody tried. Build an evaluation set before launch. Anthropic's guidance on building evaluations suggests making tests task-specific (mirroring real inputs, including edge cases), automating grading where possible, and preferring many automatically graded examples over a few hand-graded ones. Grading can be an exact match (for classification), a similarity score, or another model rating outputs against a rubric.

  1. Collect 50 to 200 real, anonymised examples of inputs.
  2. Write the expected output or grading criteria for each.
  3. Run the set on every prompt or model change and track the score.
  4. In production, log inputs and outputs (within your privacy rules) and let users flag bad answers.

Security: prompt injection and friends

The OWASP Top 10 for LLM Applications 2025 lists prompt injection first, followed by sensitive information disclosure, supply chain, data and model poisoning, improper output handling, excessive agency, system prompt leakage, vector and embedding weaknesses, misinformation, and unbounded consumption. In practice:

  • Treat any text the model reads (user messages, emails, web pages, uploaded files) as potentially hostile instructions.
  • Never let model output run directly as code, SQL or HTML without validation and escaping.
  • Give the model only the permissions the feature needs, and require human confirmation for actions such as sending emails, refunds or deletions.
  • Assume your system prompt can leak; keep secrets out of it.

The code that wires up the feature needs the same care as any other; see our AI-generated code security checklist.

Common mistakes

  • Launching without an evaluation set, so nobody knows whether a prompt change helped or hurt.
  • Hard-wiring one provider everywhere instead of keeping the model call behind one internal function you can switch.
  • Calling the API from the browser with a secret key.
  • Choosing the largest model by default instead of testing a smaller one first.
  • No quotas or spending alerts.
  • Building a chat window when a single button ("summarise", "draft reply") would serve users better.

If the feature is part of a larger build, include evaluation and monitoring in the budget; our MVP cost breakdown explains how to price the rest.

Frequently asked questions

How much does it cost to add AI to an app?

Model usage is often modest: in our example of 20,000 support-reply drafts a month, between $6 and $120 depending on the model, at October 2026 list prices. The larger cost is engineering time for integration, evaluation and maintenance.

Which LLM API should a startup use?

Test two or three models on your own evaluation set and pick the cheapest one that meets your quality bar. Keep the call behind one internal interface so you can switch later.

Will the AI provider train on my users' data?

Check each provider's terms. OpenAI says API data is not used for training unless you opt in; Google says Gemini paid-tier content is not used to improve its products, but free-tier content is.

What is prompt injection?

An attack where text the model reads, such as a user message or a document, contains instructions that override yours. OWASP ranks it as the top risk for LLM applications.

Sources

  1. Pricing (Claude API), Anthropic, 2026-10
  2. API pricing, OpenAI, 2026-10
  3. Gemini Developer API pricing, Google AI for Developers, 2026-10
  4. Data controls in the OpenAI platform, OpenAI, 2026
  5. Reducing latency, Anthropic, 2026
  6. Define success criteria and build evaluations, Anthropic, 2026
  7. OWASP Top 10 for LLM Applications 2025, OWASP Gen AI Security Project, 2025-03

Want this kind of work on your product?

Tell Adil what you’re building. You get a reply within 1 business day with times for a 15-minute video call.