Skip to main content

AI Models

AI-powered gateways (Ai, DocumentTriage, and others) run on two model tiers: Fast and Pro. The platform manages the underlying model versions; gateways do not need to change when models are upgraded.

Fast vs. Pro

FastPro
Use whenHigh-volume extraction, routine fields, cost-sensitive tasksComplex reasoning, ambiguous documents, low-volume critical tasks
CostLowerHigher (~8–10×)
SpeedFasterSlower

Use Fast for the majority of extraction tasks. Switch to Pro when output quality on Fast is insufficient — for example, when extracting from unstructured or multi-language documents, or when accuracy is more important than cost.

Selecting the model tier

The Ai gateway accepts a usePro boolean input parameter. Omit it or set it to false to use Fast; set it to true to use Pro.

{
"name": "extractFromDocument",
"type": "functionGateway",
"gateway": "Ai",
"parameters": [
{ "name": "usePro", "value": "true" },
{ "name": "summary", "value": "A short summary of the document" }
],
"targets": [
{ "name": "summary", "actionType": "OVERWRITE" }
]
}

Other AI gateways (DocumentTriage, etc.) always use Fast and do not expose a model selection parameter.

Cost tracking

Every AI gateway call automatically records token usage and estimated cost as output fields on the object:

Output fieldTypeDescription
inputTokensINTEGERPrompt tokens consumed
outputTokensINTEGERCompletion tokens generated
estimatedCostDECIMALEstimated cost in USD