GC Document AI API

google/gc-document-ai
Google Cloud Document AI extracts structured data and text from documents using optical character recognition and AI.
Output
$0.0078 / page
Released
Dec 16, 2025

How to use GC Document AI API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to google/gc-document-ai.
import requests, time

headers = {"Authorization": "Bearer " + AIMLAPI_KEY}
job = requests.post(
    "https://api.aimlapi.com/v2/generate/audio",
    headers=headers,
    json={
      "model": "google/gc-document-ai",
      "prompt": "Upbeat lofi background music"
    },
).json()
gid = job["generation_id"]

while True:
    res = requests.get(f"https://api.aimlapi.com/v2/generate/audio?generation_id={gid}", headers=headers).json()
    if res.get("status") in ("completed", "error", "failed"):
        break
    time.sleep(3)
print(res)
const headers = {
  Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
  "Content-Type": "application/json",
};
const job = await (await fetch("https://api.aimlapi.com/v2/generate/audio", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "model": "google/gc-document-ai",
    "prompt": "Upbeat lofi background music"
  }),
})).json();

let res;
do {
  await new Promise((r) => setTimeout(r, 3000));
  res = await (await fetch(`https://api.aimlapi.com/v2/generate/audio?generation_id=${job.generation_id}`, { headers })).json();
} while (!["completed", "error", "failed"].includes(res.status));
console.log(res);
# submit the job — the response contains "generation_id"
curl -X POST https://api.aimlapi.com/v2/generate/audio \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"google/gc-document-ai","prompt":"Upbeat lofi background music"}'

# then poll for the result until it is ready
curl "https://api.aimlapi.com/v2/generate/audio?generation_id={generation_id}" -H "Authorization: Bearer $AIMLAPI_KEY"

OpenAI-compatible — swap the base URL and it works with your existing SDK.

GC Document AI API Pricing

TypePrice
Output
$0.0078 / page

GC Document AI vs other models

ModelInputOutputContextBest for
$0.0078 / page
Audio generation
$5.2 / 1K pages
Audio generation
$2.6 / 1K pages
Audio generation
$0.013 / page
Audio generation

Frequently asked questions

GC Document AI takes document, image as input and returns text.

GC Document AI became available on December 16, 2025.

GC Document AI is priced at $0.0078 / page.

GC Document AI is billed per generation — a fixed charge per output rather than by prompt length.

GC Document AI was built by Google.

Use google/gc-document-ai as the model id on AI/ML API.

Yes. GC Document AI is served through AI/ML API, so the same key and endpoint format used for other models applies.

It uses optical character recognition combined with AI to extract structured data and text from documents.

Start building with GC Document AI

Get API Key
1000+ models, one API.