A cloud GPU costs a few dollars an hour with no commitment; buying the same card costs thousands upfront but nothing per hour after. The crossover is utilization, and for heavy steady GPU work owning can pay back in months. Here is the math.
SageMaker cost spans notebooks, training jobs, and always-on inference endpoints, and each has its own trap. Idle notebooks and over-provisioned endpoints are the usual culprits. Here is how to optimize each stage.
AI cost divides into training (building the model, often GPU-heavy and periodic) and inference (running it, continuous and scaling with usage). They have different profiles and different levers. Here is how to think about the split.
Vector databases for AI and search come as managed services, self-hosted engines, and add-ons to existing databases, each with a different cost model. Which is cheapest depends on scale, query volume, and operational appetite. Here is the comparison.
Vertex AI cost spans training jobs, online prediction endpoints, notebooks, and pipelines, and the biggest drains are always-on endpoints and idle notebooks. Here is how to optimize each part of GCP's managed ML platform.
Large language model APIs bill per token, split between cheaper input tokens and pricier output tokens, and the counts add up fast with long prompts and context. Here is how token pricing works and how to control it.
You can call a hosted model API and pay per token, or run your own model on GPU instances and pay for uptime. Each wins at a different scale. Here is how the two cost models compare and where they cross over.
A retrieval-augmented generation pipeline spends on embeddings, a vector database, retrieval compute, and the LLM tokens for augmented prompts. Each stage has its own cost driver, and context size ties them together. Here is the full breakdown.
Generating embeddings costs per token via an embedding model, and re-embedding large corpora or every query adds up. Caching embeddings, choosing right-sized models, and batching cut the bill. Here is how.
Fine-tuning a model costs training compute (GPU-hours) plus data preparation, and serving a fine-tuned model may cost more than a base model. Parameter-efficient methods and right-sized runs cut it. Here is the model.
AI agents make many LLM calls per task as they reason, use tools, and iterate, so their cost is LLM tokens times the loop length, plus the tools and infrastructure they invoke. Long loops and large context drive the bill. Here is how.
Prompt caching lets an LLM API bill repeated input context at a large discount after the first call, so a big shared system prompt or document sent many times costs far less. For repeated-context workloads, savings are substantial. Here is how.
LLM API cost is tokens: input plus output tokens times the per-token rate, which varies by model tier. Choosing the right model per task, trimming prompts, caching, and capping output cut the bill. Here is how.
A RAG system's cost spans a vector database, embedding generation, the LLM API for generation, and the retrieval compute. Each scales differently, and the LLM and vector store usually dominate. Here is how to budget it.
Translate bills per character of input text (about $15 per million), with a free tier and higher rates for custom terminology and Active Custom Translation. Translating more text than needed drives the bill. Here is the per-character model.
Polly bills per character of text synthesized to speech, with neural voices costing several times more than standard, plus a free tier. Synthesizing the same text repeatedly, or using neural where standard suffices, drives the bill. Here is the model.
Kendra bills per index-hour by edition (Developer and Enterprise), running around the clock, plus connector scans and extra query or document capacity. The always-on index fee is a significant baseline. Here is when Kendra's intelligent search pays off.
Personalize bills data ingestion, training hours to build recommendation models, and real-time inference by provisioned throughput (TPS-hours). Over-provisioned recommendation capacity and frequent retraining drive the bill. Here is the model.
Cloud Vision bills per image per feature (label, face, text, object, safe-search, and more), so requesting several features on one image bills for each, with a free tier and volume discounts. Analyzing more features than needed drives the bill.
Rekognition bills per image processed for image analysis and per minute for video, with rates by feature (labels, faces, moderation, text). High-volume or per-frame analysis drives the bill. Here is the model and how to control it.
Textract bills per page processed, with higher rates for forms, tables, and query features than plain text detection. Running advanced analysis on documents that only need text extraction over-pays. Here is the per-page model.
Transcribe bills per second of audio (rounded up per request), with higher rates for features like speaker identification, medical, and custom models. Long audio and premium features drive the bill. Here is the per-second model.
Comprehend bills per unit of text (100 characters, with a per-request minimum) for NLP tasks like sentiment, entities, and key phrases, with higher rates for custom models. Analyzing more text or in more ways than needed drives the bill.
Azure AI Services (formerly Cognitive Services) bill per transaction for APIs like Vision, Language, and Speech, with free and standard tiers and volume discounts. Chatty clients and premium features drive the bill. Here is the model.