---
title: "Costs, Retired Models and Other Surprises of AI APIs"
url: https://www.devjpt.com/en/blog/ai-api-costs-pipeline/
site: "Jean-Philippe Thériault"
type: post
language: en
published: 2026-12-04T14:00:00+00:00
updated: 2026-11-29T03:50:02+00:00
author: "Jean-Philippe Thériault"
description: "Half price with batch processing, retired models, reasoning billed in silence: what my pipeline taught me about the costs of AI."
translations:
  ca: https://www.devjpt.com/ca/blog/costos-api-ia-pipeline/
  es: https://www.devjpt.com/es/blog/costes-api-ia-pipeline/
  fr: https://www.devjpt.com/blog/couts-api-ia-pipeline/
agent:
  instructions: "This site offers a search endpoint for AI agents. Results are returned in Markdown."
  endpoint: "https://www.devjpt.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://www.devjpt.com/.well-known/agent-skills/lire-devjpt/SKILL.md"
---

# Costs, Retired Models and Other Surprises of AI APIs

How much does a pipeline cost when it puts AI to work on tens of thousands of items? Less than you’d fear, as long as you manage **AI API costs** like any other expense. Here’s what I learned building my pipeline, a chapter from [behind the scenes of an AI SEO pipeline](https://www.devjpt.com/en/blog/behind-the-scenes-ai-seo-pipeline/).

An API is the door through which a program sends its requests to an AI model, and every request is paid for. At small scale, the bill is negligible. At large scale, every design decision shows up on the statement.

## Batch processing, about half price

Most AI providers offer two ways of working. You can send a request and wait for the answer within the second. You can also send a large batch of requests at once, and come back for the results later. That batch processing costs **about half price**.

The trade-off is the delay. A batch can take a few minutes or several hours, depending on the provider’s load. For a pipeline that labels thousands of verbatims overnight, it’s an excellent deal. For a tool that has to answer while a customer waits, it doesn’t fit.

Batch processing has its pitfalls too. One day, a batch waited almost until the limit before starting. And during another process, in August 2026, my backup plan kicked in too early: thousands of messages were reclassified at full price while the cheaper batch results were already waiting. I paid twice for the same work.

The lesson: a backup plan must know exactly when it’s allowed to kick in. Otherwise, it turns a saving into an expense.

## The cheapest option: don’t send AI what code can sort

The best saving doesn’t come from a better rate, but from better sorting. In one audit, I needed AI to judge text passages found on websites: hundreds of thousands of occurrences to start with. Many were repetitions of the same passage.

Rather than sending everything to AI, the code first grouped the duplicates. That left dozens of times fewer unique passages. Those, and only those, were judged by AI, in batch. Total cost of the judgment: less than a dollar.

It’s the direct application of a rule that runs through the whole pipeline: **AI judges, code counts**. Code sorts, deduplicates and calculates for next to nothing. AI steps in only where judgment is needed.

## A model can disappear

Providers regularly retire older AI models, sometimes with little notice. A pipeline that depends on a specific model can therefore break overnight, without a single line of its code having changed.

What you plan so you don’t break down:

- **the model choice in one single place**, so you can change it without digging through the whole codebase;
- **a replacement already tested**, not just considered;
- **a check of the results after the change**: a new model never behaves quite like the old one, even when you ask it exactly the same question.

## The same model isn’t everywhere

The same AI model can be offered by several platforms: directly by its creator, or through major cloud services. But not always at the same time, nor in every region, nor with the same options.

I learned to check a model’s actual availability with the provider I use, rather than relying on its launch announcement. A model that’s “available” in a press release may very well not be available where your project runs.

## Reasoning billed in silence

Some models think before they answer. That reasoning produces text you don’t always see, but you pay for it. Depending on the default setting, a model can reason at length on requests that don’t need it at all, like putting a sentence into a category.

The trap is that nothing flags it. The answers are good, the pipeline works, and the bill climbs. You only see it by measuring cost step by step. Since then, reasoning is an explicit choice for each step, not a setting you inherit without knowing.

## What it changes for you

Whether you’re having an AI project developed or evaluating a provider, here are the questions to ask about costs:

- **which steps can move to batch processing?** Anything that doesn’t need an immediate answer can often cost half as much;
- **what does the code sort before AI steps in?** Good sorting upstream often cuts the bill far more than a better rate;
- **what happens if a model is retired tomorrow?** The answer should be a plan, not a shrug;
- **is cost measured step by step?** Without that, nobody will see the expense climbing in silence.

Costs are only part of the discipline needed to see an AI project through. The other part is [the rules that keep an AI project under control](https://www.devjpt.com/en/blog/coding-with-ai-agent-rules/).

## Go further

These lessons went into building a complete method, from listening to the market all the way to monthly measurement. To see the whole picture, discover [the AI SEO pipeline](https://www.devjpt.com/en/ai-seo-pipeline/).
