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.

SUBSCRIPTION PRICING

Choose an AI Gateway plan

Each plan includes monthly usage in USD, billed per token at each model’s rate. Enable pay-as-you-go for usage beyond your allowance, subject to your account’s billing and spending controls.

Free

—

/MO


—

included usage/month

Pay-as-you-go: —

TRY FOR FREE

Starter

—

/MO


—

included usage/month

Pay-as-you-go: —

GET STARTED

Growth

—

/MO


—

included usage/month

Pay-as-you-go: —

GET STARTED

Pro

—

/MO


—

included usage/month

Pay-as-you-go: —

GET STARTED

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

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. Nutrient AI Gateway offers text generation through an OpenAI-compatible API, plus a separate decision API, billed in US dollars through a Nutrient account.

Is AI Gateway OpenAI-compatible?

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.

What APIs and models does AI Gateway support?

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.

How do AI Gateway usage and free access work?

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 current token rates on the dashboard pricing page. 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.

How does AI Gateway differ from the Data Extraction API?

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; each product is billed separately.

Can I continue using models directly from other providers?

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

How does AI Gateway handle request data?

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.

Which model should I choose?

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.