Skip to content

Artificial Intelligence

How Much Does It Cost to Build a Generative AI Application?

What drives the cost of a generative AI app: build work, data preparation, evaluation, guardrails and model usage. Includes a token cost formula with a worked example and ways to cut running costs.

VisionColab TeamSoftware engineering & AI 5 min read
Generative AI development cost – stacks of tokens growing in size

In shortA generative AI application has two kinds of cost. The build cost is driven by integrations with your systems, preparing your data, the user interface, evaluation and safety work. The running cost is driven mainly by model usage, billed per token, plus hosting, vector search and monitoring. You can estimate model usage with a simple formula before you build, and cut it substantially with smaller models, caching and shorter prompts.

Calling a language model API is easy, so it is tempting to assume a generative AI app is cheap. The model call is usually the smallest part of the work. The effort goes into connecting it to your data, making its answers reliable and keeping it safe. This guide shows where the money goes and how to estimate the running bill yourself.

Build cost: where the effort goes

Work areaWhat it includesWhat makes it expensive
Discovery and use-case designChoosing the task, defining what a good answer is, collecting real examplesVague goals, many stakeholders
Data preparationCleaning documents, parsing PDFs and tables, metadata, access rulesMessy, scattered or permissioned content
Retrieval (if needed)Chunking, embeddings, vector and keyword search, rerankingLarge collections, many languages, strict accuracy
IntegrationsCRM, helpdesk, databases, single sign-on, tools the AI can callOlder systems, write actions that need approval flows
Application and UIChat or form interface, streaming, citations, feedback buttons, admin panelMultiple channels (web, mobile, Slack, email)
EvaluationTest sets, automated scoring, human reviewHigh-stakes answers, many task types
Safety and complianceGuardrails, prompt-injection defenses, privacy review, loggingRegulated industries, customer-facing use

The cheapest projects are internal tools on clean data with a person checking every output. The most expensive are customer-facing assistants that take actions in other systems, in regulated industries. Our guides to production RAG pipelines and tool-using AI agents explain why those parts take time.

Running cost: the per-token bill

Hosted model providers charge per million tokens, with separate prices for input (your prompt, instructions and retrieved documents) and output (the model’s answer). Output tokens usually cost several times more than input tokens. A token is roughly three-quarters of an English word.

The formula:

Monthly model cost =
  requests per month
  × ( input tokens per request  × input price  / 1,000,000
    + output tokens per request × output price / 1,000,000 )

Worked example

An internal assistant answers 20,000 questions a month. Each request sends about 4,000 input tokens (instructions plus retrieved passages) and gets back about 500 output tokens. Using illustrative prices of $2 per million input tokens and $10 per million output tokens:

  • Input: 20,000 × 4,000 = 80 million tokens × $2 = $160
  • Output: 20,000 × 500 = 10 million tokens × $10 = $100
  • Total model cost: about $260 a month

Prices differ widely between models and change often, so plug in current figures from your provider’s pricing page. Notice that input dominates here because of the retrieved documents. That tells you where to optimize first.

What multiplies the bill

  • Agents and multi-step workflows: each tool call is another model request, so one user task may cost five or ten times a single answer.
  • Long conversations: the whole history is usually resent on every turn.
  • Reasoning modes: models that “think” before answering generate extra billed tokens.
  • Evaluation runs: automated test suites that use a model as the judge also consume tokens.

Other running costs

  • Hosting for the application, databases and background jobs.
  • Embeddings and vector search, which grow with your document collection.
  • Monitoring and logging tools, and storage for conversation logs.
  • People: reviewing flagged answers, updating content, improving prompts and test sets.

Seven ways to reduce running cost

  1. Use the smallest model that passes your evaluation. Small models are often a fraction of the price of the largest ones.
  2. Route by difficulty. Send simple requests to a small model and escalate only hard ones.
  3. Use prompt caching. Major providers bill repeated prompt prefixes, such as long instructions, at a steep discount.
  4. Batch non-urgent work. Providers typically discount asynchronous batch jobs, which suits document processing overnight.
  5. Retrieve less, retrieve better. A reranker that sends three good passages beats ten mediocre ones on both cost and quality.
  6. Cap output length and ask for structured, concise answers.
  7. Cache answers to frequent identical questions.

API, open-source or fine-tuned?

OptionUpfrontRunning costBest when
Hosted model APILowestPay per tokenMost projects, especially early ones
Self-hosted open-weight modelMedium (infrastructure, setup)GPU servers, whether busy or idleVery high, steady volume or strict data control
Fine-tuned modelHigher (data, training, evaluation)Often lower per request with a smaller modelConsistent format or style at high volume

Start with a hosted API and a good evaluation set. Move to self-hosting or fine-tuning only when usage data shows it will pay off.

Red flags in a generative AI quote

  • No mention of evaluation or how quality will be measured.
  • No estimate of monthly model usage.
  • No plan for prompt injection, data access control or logging.
  • A proposal to train a model from scratch for an ordinary business task.
  • Lock-in to one provider with no way to switch models.

Frequently asked questions

What is the cheapest way to start?

An internal tool for one frequent, checkable task, built on a hosted model, with staff reviewing outputs. Our guide to what generative AI can do for a business explains how to pick that first task.

Will model prices keep falling?

Prices for a given level of capability have fallen over time, but new, more capable models often launch at higher prices. Design so you can switch models easily and re-run your evaluation when you do.

Is our data used to train the provider’s models?

It depends on the provider and plan. Most business API terms state that customer data is not used for training by default, but read the current terms and data retention settings for your account.

How do we know it is worth the cost?

Measure the baseline before you start: time per task, error rate, cost per ticket. Compare after a pilot. If the gain does not cover build and running costs, narrow the scope or stop.

Get a realistic estimate

VisionColab scopes and builds generative AI applications with evaluation and cost modeling from the start. See our AI development services or book a free consultation.

Written by the VisionColab team

VisionColab designs and builds AI, web, mobile and cloud software for businesses. Our guides explain the decisions, costs and trade-offs involved in planning a software project.

Have a project in mind?

Share your goals and constraints. We will suggest a realistic scope and the right technology approach.