Direct API Call
Raw request to the model with user input, minimal wrapping. Fastest to ship, least reliable for structured or domain-specific tasks.
Best for
Prototypes, low-stakes features
Setup
2–5 days
Cost
$2K–5K
Four ways to wire a large language model into your product — from a single API call to a fully fine-tuned custom model. What each pattern costs, when it breaks, and how to pick the right one.









LLM integration is the work of connecting a large language model — GPT-5, Claude, Gemini, or an open-weight model — to your product so it can read your data, follow your business rules, and return output your application can act on. It's rarely just "call the API." The real engineering is in how the model gets context, how its output is constrained, and how failures are caught before a user sees them.
The four patterns below sit on a spectrum of increasing control and increasing cost. Most products only need the first two. RAG and fine-tuning are reserved for specific, identifiable problems — not a default starting point.
Ordered by complexity. Each solves a specific failure mode of the one before it.
Raw request to the model with user input, minimal wrapping. Fastest to ship, least reliable for structured or domain-specific tasks.
Best for
Prototypes, low-stakes features
Setup
2–5 days
Cost
$2K–5K
Structured system prompts, output schemas, few-shot examples, and guardrails around the raw call. Solves most consistency problems.
Best for
Most production features
Setup
1–3 weeks
Cost
$5K–12K
Retrieval layer feeds the model your live documents or database at query time. Needed when answers must reflect data the model wasn't trained on.
Best for
Knowledge assistants, support tools
Setup
2–4 weeks
Cost
$8K–15K
Model weights retrained on your labeled data. Needed when behavior, tone, or reasoning pattern must be consistent without heavy prompting.
Best for
Fixed domain behavior at scale
Setup
4–8 weeks
Cost
$25K–40K
Choosing between pattern 03 and 04? See the full RAG vs. Fine-Tuning decision framework →
Scope-based estimates. Actual cost moves with data readiness and how many existing systems the model needs to talk to.
Direct API call
Timeline
2–5 days
Cost
$2K–5K
Ongoing cost driver
Token usage only
Prompt engineering layer
Timeline
1–3 weeks
Cost
$5K–12K
Ongoing cost driver
Token usage + prompt maintenance
RAG-augmented
Timeline
2–4 weeks
Cost
$8K–15K
Ongoing cost driver
Vector DB hosting, index updates
Fine-tuned model
Timeline
4–8 weeks
Cost
$25K–40K
Ongoing cost driver
Periodic retraining runs
| Pattern | Typical Timeline | Typical Cost | Ongoing Cost Driver |
|---|---|---|---|
| Direct API call | 2–5 days | $2K–5K | Token usage only |
| Prompt engineering layer | 1–3 weeks | $5K–12K | Token usage + prompt maintenance |
| RAG-augmented | 2–4 weeks | $8K–15K | Vector DB hosting, index updates |
| Fine-tuned model | 4–8 weeks | $25K–40K | Periodic retraining runs |
RAG adds a retrieval hop before generation. If your feature needs sub-second response, prompt engineering on a fast model usually beats RAG on raw speed.
If the source information updates often, RAG wins — reindexing takes minutes. Fine-tuning on fast-changing data means retraining on a schedule you'll resent.
Regulated industries (HIPAA, GDPR) often require private VPC hosting for both the model and any retrieval index — this narrows provider choice early.
Low-stakes features can ship with pattern 1 or 2 and iterate. High-stakes outputs (financial, medical, legal) need evaluation benchmarks before launch, regardless of pattern.
We map what the feature actually needs before picking a pattern — this is where most projects get right-sized down from "let's fine-tune" to a prompt layer.
Model-agnostic selection based on latency, cost per call, and data residency constraints — not whichever provider we're most familiar with.
Output schemas, input sanitization, and fallback handling built in from the start, not bolted on after a bad output ships.
Accuracy benchmark run against real examples pre-launch — the same standard applied across every AI engagement we run.
Post-launch tracking so quality degradation gets caught by a dashboard, not a support ticket.



