WhoBuilt

What Lies Beneath the API

Jun 2, 2026· 13 min· 3.6K views·Watch on YouTube

Speaker

Benjamin Cowen, a forward-deployed machine learning engineer at Modal, discusses when AI products should move from frontier APIs to custom models at an AI Engineer session.

Where frontier APIs fall short

Cowen works with AI applications ranging from scientific computing to voice and agents, and says large-scale reinforcement learning is growing quickly. Frontier APIs help teams build fast, but offer little customization beyond prompts. They can also be a poor fit for products with strict latency, throughput, or business-specific evaluation needs.

A middle ground for model training

Custom training can improve performance and cost, but traditionally required separate clusters and infrastructure expertise. Cowen points to companies including Intercom and Pintress as examples of teams reporting gains from fine-tuning. He argues that a model optimized for a company’s business logic can serve its customers better than one designed to perform broadly.

Signals that it may be time to train

Cowen says a differentiated product is already becoming domain-specific, though each team must decide when training is worthwhile. Rising API costs, latency or throughput limits, and evaluation scores that have plateaued are possible signals. Teams should first collect useful data and build mature evaluations; without them, training is premature.

Training with existing product pieces

An agent harness can provide the setup for reinforcement learning, while product evaluations and feedback can become training data. Cowen says open-source libraries and serverless compute let teams run supervised fine-tuning in about 300 lines of Python without managing a dedicated cluster. He also describes using on-demand containers for hyperparameter searches and reinforcement learning rollouts, with some Modal customers scaling to 50,000 or 100,000 sandboxes.

Plan for serving and prepare early

After training, teams still need to serve the model. Cowen names vLLM, SGLang, Triton Inference Server, and custom Python workflows as options, which can autoscale on serverless platforms. He advises teams to start preparing by collecting data and improving evaluations, even if training is months or a year away.

Takeaways

  • Track API costs against customer revenue to spot when inference economics are not scaling.
  • Use latency, throughput, and evaluation results to identify where a custom model could help.
  • Collect product data and build mature evaluations before investing in training.
  • Treat an existing agent harness as a potential starting point for reinforcement learning.
  • Plan for model serving and autoscaling as part of the training decision.

Mentioned in this talk

Search inside this talk

What was claimed 8

  • works at
    Forward Deployed Machine Learning Engineer
    “I'm a forward-deployed machine learning engineer at Modal.”
    YouTube
    Verified2 sources· Talk, Web· archived
  • feature
    Fine-tuning: Can improve performance and reduce costs as products mature and specialize
    “turn to fine-tuning to get increased performance, better costs”
    YouTube
    Unverified1 source· Talk
  • feature
    Modal: General-purpose serverless compute platform providing serverless functions and hardened sandboxes for code execution
    “we're a general-purpose serverless compute platform. We provide basic building blocks like serverless functions and hardened sandboxes for code execution.”
    YouTube
    Unverified1 source· Talk
  • feature
    frontier APIs: Enable rapid development but cannot be customized beyond prompt engineering
    “People can build basically anything exceptionally fast. They're amazing, but you can't customize them at all beyond prompt engineering.”
    YouTube
    Unverified1 source· Talk
  • metric
    Intercom: Beats its frontier API at one-fifth the cost
    “Intercom is beating its frontier API at one-fifth the cost.”
    YouTube
    Unverified1 source· Talk
  • feature
    Reinforcement learning: Trains a model through massively parallel evaluations called rollouts
    “This is a massively parallel evaluation process called a rollout.”
    YouTube
    Unverified1 source· Talk
  • metric
    Modal: Customers scaled up to 50,000 or 100,000 sandboxes for reinforcement learning rollouts
    “customers scaling up to 50,000 or 100,000 sandboxes just to do RL.”
    YouTube
    Unverified1 source· Talk
  • feature
    Modal: Unified APIs for sandboxes and GPU containers or clusters
    “we have unified APIs for sandboxes and GPU containers or clusters.”
    YouTube
    Unverified1 source· Talk

Related talks