Sign up and get 15% off the four courses and Lifetime.

AI production systems

Lesson

APIs, and reading a model's documentation

Lesson 2 of 10 in AI production systems.

Checked against the makers' documentation on 4 November 2026.

Lesson

An API is the way one program asks another for work. When a studio tool sends a still to a video model and gets a clip back, it goes through that model's API, and the model's documentation is the manual for it. Each address in an API that does one job, such as generate, edit, upscale or check status, is called an endpoint.

Reading the documentation is useful even if someone else writes the code, because that is where the real limits are written down. It gives the maximum sizes, the supported aspect ratios, what the content filter blocks and how long a request may take. The example is a studio planning to turn product stills for a skincare brand into short clips with Google's Veo video models.

Find four things on the first read

On every first read, look for these four:

  • how versions are named, and whether you can pin one
  • what the rate limits are
  • what a failure looks like when it comes back
  • exactly how it is billed

The fourth is the one people skip, and it is rarely one number. Veo, for example, bills per second of video, audio included, and the rate changes with the tier and the resolution. For the skincare clips, a 4K version of a clip costs more than the same clip at 720p, so settle the resolution before you quote. Check the current price on the maker's pricing page before you start.

Pin the version and watch for retirements

Providers ship improvements without much warning, and an improvement is still a change. The same prompt starts producing a slightly different look, and the client notices before you do. Pinning means naming one exact version in every request, so a change only happens when you decide to make it.

Be careful with model ids that end in -preview. At the time of writing, Google's models page says preview models "will be deprecated with at least 2 weeks notice", and deprecation means the version is being retired. Subscribe to the provider's changelog, the page that lists every change and retirement. Reading it takes five minutes a month.

Read the content policy before you agree a deadline

Content filters affect ordinary work. Beauty, fashion, medical and alcohol briefs all meet them, and the filters differ between providers. Finding that out at four in the afternoon on a deadline costs you the day.

For the skincare job, read the policy before you quote, and look for anything about skin, bodies and medical claims. Then run two or three of the real product stills through the model before you promise a delivery date.

Test the docs against the live API

Documentation and the live API do not always agree. When this course tested Veo, the parameter table showed the clip length, durationSeconds, as the text "8", but the live API refused text there and wanted the number 8. Google's Python library converts it for you, so only people calling the API directly ran into it.

In the same tests, the Veo page listed a seed setting, but passing a seed through the Python library raised an error saying it works only in Enterprise Agent Platform mode. Neither problem was visible from the documentation alone.

So test every setting with one cheap call before you run a batch. For the skincare brand, send one short clip with your real settings, check that it came back as asked, and only then send the rest of the job.

The next lesson covers queues, timeouts and long jobs.