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
| Fast | Pro | |
|---|---|---|
| Use when | High-volume extraction, routine fields, cost-sensitive tasks | Complex reasoning, ambiguous documents, low-volume critical tasks |
| Cost | Lower | Higher (~8–10×) |
| Speed | Faster | Slower |
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 field | Type | Description |
|---|---|---|
inputTokens | INTEGER | Prompt tokens consumed |
outputTokens | INTEGER | Completion tokens generated |
estimatedCost | DECIMAL | Estimated cost in USD |