AI Gateway API for document workflows

Generate text, stream responses, and make structured decisions through managed AI models. An OpenAI-compatible LLM gateway, managed through your Nutrient account for API access, usage, and billing.

What is an AI gateway?

An AI gateway is a single API layer between an application and AI models. It handles authentication, routing, usage limits, and billing, so a team can call several models through one endpoint and one account instead of managing each provider separately.

PRICING

Pay per token on the same plan as every Nutrient API

AI Gateway draws on your plan’s monthly usage, which every Nutrient API shares; the free plan includes $5 a month. Each model is billed per million tokens at the rates below, in USD.

Model Input Cached input Output
Nutrient Small
$0.12
$0.012
$0.60
Nutrient Medium
$1.20
$0.06
$6.00
Nutrient Large
$2.40
$0.12
$12.00
Nutrient Document Decision
$0.10
$0.10
Free
Nutrient System One
$0.0504
$0.0504
Free
Nutrient Embedding
$0.024
—
—

Built for teams already running business-critical document workflows on Nutrient.

Used by Lufthansa, Disney, Autodesk, UBS, Dropbox, IBM
Lufthansa
Disney
Autodesk
UBS
Dropbox
IBM

FLEXIBLE API ACCESS

Use the OpenAI Responses and Chat Completions APIs, plus a decision API

Choose the OpenAI Responses API for generation and reasoning with function tools, keep existing Chat Completions integrations, or use the decision API for structured questions and probabilities. Start with an API key enabled for AI Gateway and the OpenAI SDK.

Responses API example · npm install openai
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.NUTRIENT_API_KEY,
baseURL: "https://api.nutrient.io/ai/v1"
});
try {
const response = await client.responses.create({
model: "nutrient-s",
input: "Summarize this obligation: The supplier must deliver the report by 30 November and notify the customer of delays within two business days."
});
console.log(response.output_text);
} catch (error) {
console.error("AI Gateway request failed:", error.message);
process.exitCode = 1;
}

DOCUMENT DECISIONS

Ask a document question with the decision API

Send a page image or text and your question to nutrient-document-decision, Nutrient’s document decision model. The response gives a probability for the answer, so you set the threshold for what runs automatically.

Decision API example · nutrient-document-decision
curl https://api.nutrient.io/ai/v1/systemone \
-H "Authorization: Bearer $NUTRIENT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nutrient-document-decision",
"state": {
"page_1": { "type": "image", "source": "data:image/png;base64,..." }
},
"questions": {
"total": {
"type": "noul",
"instructions": "Is $1,547.00 the total on this invoice?"
}
}
}'
# Response: the probability that the answer is yes
# { "answers": { "total": { "type": "noul", "noul": 0.98 } },
# "model": "nutrient-document-decision", "usage": { ... } }

WHY AI GATEWAY

Why use an AI gateway for document workflows

AI Gateway connects your applications to supported AI providers while keeping usage controls and billing in your existing Nutrient DWS account.

Multiple API and model options

Use Responses or Chat Completions for generation, streaming, and application-executed function tools. Use the decision API for decisions with probabilities.

Manage access and usage

Manage access, usage limits, and pay-as-you-go billing through your Nutrient account.

Support multiple AI-powered workflows

Summarize extracted text, answer questions over content you provide, or route work using decision probabilities. Pair with Data Extraction when you need document parsing and citations.

DEVELOPER GUIDES

Build your first AI Gateway integration

Send your first request

Get an API key. Then use curl, JavaScript, or Python to generate a response.

Choose an API and model

Pick a model and an API: Responses, Chat Completions, or the decision API.

Understand usage and pricing

Review plans, how token usage is billed, test keys, and pay-as-you-go usage.

FAQ

AI gateway FAQ

An AI gateway is a single API layer between an application and AI models. It handles authentication, routing, usage limits, and billing, so a team can call several models through one endpoint and one account. Nutrient AI Gateway offers text generation through an OpenAI-compatible API, plus a separate decision API, billed in US dollars through a Nutrient account.

Yes. AI Gateway supports the OpenAI Responses and Chat Completions APIs. Point the official OpenAI SDK at https://api.nutrient.io/ai/v1 and authenticate with a Nutrient API key enabled for AI Gateway. Decision models use the separate decision API.

AI Gateway supports OpenAI-compatible Responses and Chat Completions, plus a decision API for structured questions and probabilities. Use the model-selection table in the AI Gateway overview and the token-rate table in the pricing guide to compare models.

AI Gateway is billed on the same plans as every Nutrient API, and the free plan includes $5 of usage per month. Live requests are billed by token usage, with separate input, cached-input, and output rates per model; see the token rates and API pricing. Test keys make real text-only requests without consuming your allowance and have separate usage controls. See the pricing guide for how charges are calculated and pay-as-you-go details.

Data Extraction parses documents into spatial elements, Markdown, or schema-shaped data with citations and charges per page. AI Gateway calls models for generation and decisions and charges by token usage. Combine them by passing extracted content to a model; both are paid from the same plan, each at its own rate.

Yes. You can continue using your existing provider accounts. AI Gateway is an additional option for managing model access, usage, and billing through Nutrient.

Nutrient records the request details needed to operate and bill the service, including request IDs, model and rate information, token counts, costs, and errors. Data handling and retention depend on the model provider. OpenAI-backed requests may be processed globally and retained for abuse monitoring for up to 30 days. Zero Data Retention and regional processing aren’t currently available for OpenAI-backed requests.

For generative tasks, nutrient-s is the fast, lower-cost tier, nutrient-m is the default balance, and nutrient-l is for complex workloads. For structured questions with probabilities, use the decision API. nutrient-document-decision is recommended and accepts images as well as text, while nutrient-systemone is text-only.

Plan your AI Gateway rollout

Talk to Nutrient about model access, usage, pricing, and the right plan for your application.