Pre-trained AI APIs
Service 35

Pre-trained AI APIs

AI APIsSpecialized

Before the era of frontier LLMs, Google shipped a family of single-purpose pre-trained APIs: Cloud Vision (images), Natural Language (text), Translation, Speech-to-Text, Text-to-Speech, Video Intelligence, and Document AI. Each does one thing well, with predictable structured output and a price tuned for high volume. In 2026 many of these tasks can also be done by Gemini multimodal — but these task-specific APIs remain useful, though individual features and product names change, so check current status before relying on one. For narrow, high-volume tasks they can be cheaper, faster, and more predictable in structured output than prompting a general LLM.

The right architecture mixes the two: pre-trained APIs for high-volume narrow tasks, Gemini for cross-modal reasoning and tasks that need natural language understanding. Knowing which side a workload falls on is what this page is about.

The Pre-Trained API Family

Vision & Videoimage in → labels out
Label detection, OCR, safe-search/content detection; shot detection and object tracking for video.
Speech & Translationaudio/text in → text out
Speech-to-Text, Text-to-Speech, and Translation — streaming or batch, 100+ languages.
Document AIPDF in → fields out
Parse invoices, forms, and contracts into structured fields with specialized processors.
Natural Languagetext in → structure out
Sentiment analysis, entity extraction, classification, and syntax parsing over unstructured text.

Each is a narrow, task-specific API tuned for one job — simpler to adopt than a custom model, though still needing quota, quality, cost, and data-governance planning. For high-volume, well-defined tasks they are cheaper and faster than prompting a general model.

The product list, with the use cases each was built for:

  • Cloud Vision API — label detection, OCR, face detection (without identity), content moderation, logo detection on still images.
  • Cloud Natural Language API — sentiment analysis, entity extraction, syntax parsing, content classification on text.
  • Cloud Translation API — text translation across 100+ language pairs, with a higher-quality "Advanced" tier.
  • Cloud Speech-to-Text — transcription of audio streams or files into text, with language hints and speaker diarization.
  • Cloud Text-to-Speech — natural-sounding speech synthesis with a catalog of voices across languages.
  • Cloud Video Intelligence API — label and shot detection, transcription, explicit content detection on video files.
  • Document AI — structured extraction from forms, invoices, contracts, and other document types — OCR plus layout understanding plus domain-specific parsers.

When Pre-Trained APIs Still Beat Gemini

Three places where a specialized API wins over a general LLM:

  • Cost at scale. Translating ten million pages of documents through Gemini costs a small fortune. Translation API does the same job for a fraction. The math becomes clear above roughly six-figure call volumes.
  • Accuracy in domain. Specialized APIs are trained against narrow ground truth — Cloud Vision is rigorously evaluated on its label set, Document AI on its document types. Gemini's general capability sometimes loses to the specialized model on the specific accuracy metric the team actually cares about. Always benchmark before assuming Gemini is better.
  • Structured output predictability. The pre-trained APIs return well-defined response schemas. Vision gives you boxes and labels; STT gives you transcripts with confidence; Document AI gives you key-value pairs. Gemini's JSON mode is close, but never quite as deterministic as a fixed-schema API. For production pipelines where predictability matters, the specialized API is easier to integrate.
Pre-trained API vs Gemini Multimodal

Pre-trained AI API — narrow task at high volume, where cost, predictable schema, or specialized accuracy matter. OCR a million pages? Translate a corpus? Transcribe podcasts? Pre-trained API.

Gemini multimodal — cross-modal reasoning, nuanced or conversational tasks, anything that needs to combine vision with natural language understanding. "Read this messy receipt photo and tell me what was purchased and at what price"? Gemini.

Document AI for Structured Documents

Document AI deserves a special mention because it occupies a niche neither generic OCR nor Gemini fills well. The service combines OCR with layout understanding and ships with domain-specific parsers trained for invoices, receipts, contracts, IDs, tax forms, and more. Output is structured: line items, amounts, dates, signatory blocks. For workflows that process high volumes of structured documents — accounts payable automation, KYC pipelines, claims processing — Document AI is dramatically cheaper and more accurate than rolling your own pipeline with raw OCR plus heuristics, and more predictable than asking Gemini to extract the same fields free-form.

Speech APIs: STT and TTS

Cloud Speech-to-Text and Text-to-Speech are the workhorses for voice integration. Two operational details that catch newcomers:

STT language hints — pass the expected language code explicitly. Auto-detect works but is slower and occasionally picks the wrong language for short or accented utterances. Streaming STT for real-time transcription returns interim and final transcripts as audio arrives; batch STT for large files or non-real-time work. TTS voice selection — the voice catalog covers many languages and styles; pick the voice deliberately for the user-facing experience instead of accepting the default.

Vision and Video Intelligence

Cloud Vision handles still images: pass an image, get back labels with confidence scores, OCR text with bounding boxes, face landmark coordinates (no identity recognition), explicit content scores, and detected logos. Video Intelligence applies similar analysis to video files plus shot detection and speech transcription. Both APIs are billed per call (or per minute for video), often cheaper than running Gemini on the same volume, and produce structured output ready to index in a database or feed a downstream pipeline.

Common Mistakes
  • Gemini chosen for every multimodal task without checking pre-trained API economics. At high volume the cost difference is order-of-magnitude.
  • Pre-trained API chosen for nuanced tasks Gemini handles better. A specialized API will OCR a receipt; only Gemini will read the receipt and tell you which line is the tip.
  • Document AI used for plain OCR on simple documents where Cloud Vision's OCR is sufficient and cheaper.
  • Self-hosting OCR (Tesseract) or translation libraries when Document AI and Translation API solve the problem with much better accuracy and no infrastructure.
  • STT calls without a language hint, then surprise at wrong-language transcripts for short or accented audio.
  • Routing translation traffic through Gemini for ergonomic reasons. More expensive, less consistent across runs, and Translation API has glossaries and custom models for domain-specific terminology that Gemini does not.
  • Synchronous calls in tight loops for high-volume processing instead of using the batch or asynchronous endpoints these APIs offer.
Best Practices
  • Pre-trained APIs as the default for high-volume narrow tasks (translation, OCR, transcription, basic vision labels).
  • Gemini as the default for cross-modal reasoning, conversational or nuanced tasks, and anything that needs natural language understanding around the data.
  • Document AI for structured documents — invoices, forms, contracts. Match the parser to the document type.
  • STT calls with explicit language hints whenever the language is known.
  • Batch and asynchronous endpoints for high-volume processing. Sync APIs are convenient for small loads but waste throughput at scale.
  • Translation API with glossaries for domain-specific terminology; do not let a general LLM invent the translation of a regulated term.
  • Benchmark accuracy on representative production data before assuming Gemini or a pre-trained API is "obviously better" — sometimes the answer surprises you.
Comparable services AWS Rekognition + Comprehend + Translate + Transcribe + Polly + Textract Azure Azure AI Vision + Language + Translator + Speech + Document Intelligence

Knowledge Check

When does a pre-trained AI API genuinely beat Gemini multimodal?

  • When the workload involves nuanced natural language reasoning across several modalities at once — text, image, and audio combined in one request and cross-referenced against each other to produce a single synthesized answer
  • For high-volume narrow tasks where cost, predictable schema, or specialized in-domain accuracy matters — translating millions of pages, OCR at scale, transcribing podcasts
  • When the workload needs to combine image understanding with conversational follow-up questions over the same content
  • When the application must run fully offline on-premises with no outbound internet access to Google Cloud at all

What does Document AI provide that plain OCR plus heuristics does not?

  • Faster raw OCR at a lower per-page cost than the Cloud Vision API charges for the same text extraction
  • Domain-specific parsers (invoices, receipts, contracts, IDs, tax forms) that combine OCR with layout understanding to produce structured fields — line items, amounts, key-value pairs — without custom heuristics
  • A built-in user interface that lets non-engineers upload documents, review extracted data manually, and correct any low-confidence fields before export
  • A built-in workflow engine that, after extraction, automatically routes each processed document to the correct downstream system based on its detected type, content, and configurable business rules without any extra orchestration code

Why pass an explicit language hint to Speech-to-Text when the language is known?

  • Language hints are mandatory for every Speech-to-Text call; automatic language detection has been removed from the API entirely
  • Auto-detect works but is slower and occasionally picks the wrong language for short or accented utterances — explicit hints make detection deterministic and faster
  • Language hints unlock the higher-accuracy enhanced model tier and its specialized phone-call and video recognition models; without a hint supplied, the request silently falls back to the basic default tier
  • Language hints are billed at a per-minute discount compared to requests that rely on automatic language detection

A team translates ten million pages of regulatory text per month and is currently routing all of it through Gemini. What is the most common improvement?

  • Switch to a smaller Gemini tier; the cheaper Flash model handles bulk translation just as accurately as Pro at a fraction of the per-page cost
  • Move the translation work to the Translation API, which is dramatically cheaper at this volume and supports glossaries for domain-specific terminology that Gemini does not
  • Self-host an open-source translation model on an autoscaled fleet of Compute Engine GPU instances behind an internal load balancer to bypass per-call API billing entirely and keep the corpus on your own VMs
  • Pre-cache every page's translated output in a Cloud Storage bucket and serve subsequent requests from that cache to avoid re-translating

A workflow reads photos of receipts and needs both (a) the OCR text and (b) an answer to "which line item is the tip?" Which combination is the right fit?

  • Cloud Vision OCR for everything, then a set of hand-written regular expressions over the raw OCR output to locate the tip line on each receipt
  • Document AI for both the OCR and the tip line — its general-purpose parser handles arbitrary natural-language questions asked about any of the extracted fields and their relationships
  • Cloud Vision or Document AI for high-quality OCR; Gemini multimodal for the natural-language question over the receipt image and extracted text
  • Gemini multimodal for everything, treating the OCR step as a side effect of simply asking Gemini to describe the receipt image in full

You got correct