Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
AI Builder
Module 12Advanced

Deploying, Operating & Selling AI Products

From working feature to a product people pay for

Deploy and run AI features in production — architecture, hosting and timeouts, long-running workflows, tracing, rollouts, incidents — then turn them into a business: pricing, positioning, metering and billing, and launching.

Lessons
10
Reading time
106 min
Level
Advanced
Access
Full course

Lessons in this module

  1. 12.1

    Architecture for AI-Powered Apps

    Reference architectures for AI features in web apps: where model calls live, an AI service layer, data flows, and the decisions that are hard to undo.

    10 min
  2. 12.2

    Deploying AI Features: Serverless, Containers, and Timeouts

    Long-running streams meet platform limits. Choose hosting that fits AI workloads and configure timeouts, regions, and secrets correctly.

    10 min
  3. 12.3

    Long-Running AI Workflows

    Durable workflow engines and job queues for multi-step AI work that runs for minutes — retries, checkpoints, and resuming after failures.

    11 min
  4. 12.4

    Logging and Tracing LLM Calls

    Capture every model call with inputs, outputs, tokens, latency, and cost — with OpenTelemetry or an LLM observability tool — while respecting privacy.

    12 min
  5. 12.5

    Feature Flags and Gradual Rollouts for AI

    Ship AI changes behind flags, roll out by percentage or cohort, shadow-test new prompts and models, and roll back in seconds.

    11 min
  6. 12.6

    When AI Breaks: Incidents and Provider Outages

    Plan for provider outages, quality regressions, and runaway costs: detection, degraded modes, incident runbooks, and honest communication.

    11 min
  7. 12.7

    Pricing AI Products: Seats, Usage, and Credits

    Pricing models for products with real per-use costs — seats, usage-based, credits, outcome pricing, and hybrids — and how to choose one with margins in mind.

    11 min
  8. 12.8

    Positioning: Beyond "Just a Wrapper"

    Build defensibility where it actually comes from — workflow, data, distribution, and quality — and position your product so buyers see the difference.

    10 min
  9. 12.9

    Metering Usage and Billing with Stripe

    Record usage per customer, enforce plan limits, and bill for it with Stripe — including credits, overages, and reconciling against your provider bill.

    11 min
  10. 12.10

    Launching and Iterating on an AI Product

    Plan a launch, get your first users, and run the weekly loop of usage data, error analysis, and roadmap decisions that makes the product better.

    9 min

About this module

Getting an AI feature working on your laptop is the easy part. Running it in production means dealing with model calls that take minutes instead of milliseconds, streams that pass through proxies and load balancers, providers that rate-limit or go down, and a bill that grows with every request. Selling it means pricing a product whose costs rise with usage, explaining why it is more than a thin layer over someone else's model, and charging customers accurately for what they use.

This module covers both halves. On the operations side, you will design an architecture where every model call goes through one service layer, choose hosting that fits long-running and streaming AI routes, configure timeouts so the right layer fails first, and use durable workflows for multi-step jobs that run for hours or wait days for human review. You will log and trace every model call with tokens, latency, and cost, ship prompt and model changes behind feature flags with shadow tests and instant rollback, and prepare for provider outages, quality regressions, and runaway spend with degraded modes and incident runbooks.

On the business side, you will compare pricing models for products with real per-use costs, including seats, usage-based pricing, credits, and hybrids, and choose one with margins in mind. You will learn where defensibility actually comes from (workflow, data, distribution, and quality) and how to position your product so buyers see it. Then you will meter usage per customer, enforce plan limits, and bill with Stripe, including credits and overages, and reconcile it against your provider invoice.

The module ends with launching and iterating: getting your first users and running a weekly loop of usage data, error analysis, and roadmap decisions. Examples use TypeScript, Next.js, Postgres, and the Anthropic SDK, built around a help-desk app, but the patterns apply to any stack and any model provider.

Questions about Deploying, Operating & Selling AI Products

How do I deploy an LLM app without hitting serverless timeouts?

Raise your function's maximum duration for AI routes, stream responses, and set the model SDK's timeout shorter than the platform limit so your code can handle failures cleanly. Send small heartbeats if a proxy closes idle connections. Move work that takes many minutes out of request handlers into background jobs or a durable workflow.

Should AI model calls be made from the frontend or the backend?

From the backend. The browser should call your own product endpoints with product inputs such as a ticket ID, and your server should build the prompt and call the model. That keeps API keys secret and lets you control cost, scope, logging, and abuse limits in one place.

How should I price an AI product with per-use model costs?

Start from your cost per request and per user, then choose a model that protects margins: usage-based pricing, credits, seats with usage limits, or a hybrid. Whatever you pick, meter usage per customer from day one so you can enforce limits and see which customers and features are profitable.

What should I log for every LLM call in production?

Record the feature, prompt version, model, tenant, status and stop reason, token counts by type, estimated cost, and latency for every call. Log prompt and response content only under a clear retention and access policy, because it usually contains customer data.

What happens to my AI product when the model provider has an outage?

Plan degraded modes before you need them: fall back to another model or provider, serve cached or stored results, or switch the feature off with an honest message. Detect outages through error rates and latency on your own calls, and keep a runbook so the response takes minutes rather than hours.