Decision API
Structured LLM decisions via the Inference API, processed in the EU
Use language models to classify, check and prioritize, and get machine-readable JSON back from an OpenAI-compatible API. EU processing, GDPR-compliant with DPA. Your contracting party is based in Germany. LLMBase does not store prompt or response content of the Inference API.
How it works
With LLMBase, each decision is a single API call that returns structured data instead of free text.
- 1
Pick a model. For short, high-volume decisions we recommend
deepseek/deepseek-v4.1-flash. Models withstructured_outputs(currentlydeepseek/deepseek-v4.1-flash,moonshotai/kimi-k2.6,moonshotai/kimi-k2.7-code,moonshotai/kimi-k3,moonshotai/kimi-k3.1-pro,minimax/minimax-m3.1-flash, andqwen/qwen3.8-27b) enforce a strict schema. - 2
Define the output format. On models with
json_mode,response_format: {"type": "json_object"}returns valid JSON.response_format: {"type": "json_schema", ...}withstrict: truelets you specify the exact fields, types and allowed values. - 3
Send the request.
POST https://api.llmbase.ai/v1/chat/completionswithAuthorization: Bearer $LLMBASE_API_KEY. Existing OpenAI SDK code works once you setbaseURLtohttps://api.llmbase.ai/v1. - 4
Use the result. Parse the JSON and feed the fields straight into routing, workflows or your database.
Benefits
A structured outputs API with real JSON schema
On models with structured outputs, you provide a JSON schema with enum, required and additionalProperties: false, and the response follows it. You don't have to parse free text after the fact.
Inference API processing in the EU
Requests to the Inference API are processed in EU data centers, GDPR-compliant with DPA. If your team needs an EU LLM API, this is the basis for production use.
No storage of Inference API content, no training
LLMBase does not store prompt or response content of the Inference API, and your data is not used to train models.
German contracting party and DPA
Your contract is with a German company, and a data processing agreement (DPA, German: AVV) is included.
OpenAI-compatible
You keep using the OpenAI SDK and change only baseURL and your API key. There are no new libraries or request formats to learn.
Open models, your choice
Pick the open model that fits each task: a fast model for short decisions in JSON mode, or a model with structured outputs for strict schemas. Switching models means changing one parameter.
Use cases
Ticket routing
Assign incoming support tickets to a category, flag them as urgent or not, and add a short reason. Your helpdesk then routes each ticket to the right team based on the JSON fields.
Yes/no checks
Check whether an email contains a cancellation, whether a contract includes a specific clause, or whether a request is complete. You get a boolean plus a reason, which your business logic can evaluate directly.
Lead scoring
Score form submissions and inquiries against fixed criteria such as industry, company size or purchase intent. Use enum to define the allowed tiers, for example "high", "medium" and "low".
Content moderation
Classify user-generated content according to your own guidelines. A schema with fixed categories and an action field (approve, review, reject) keeps results consistent.
Document classification
Sort invoices, contracts, delivery notes or applications by document type and attach metadata. This LLM classification step fits directly into your document pipeline.
Code examples
curl: Ticket decision with DeepSeek V4.1 Flash in JSON mode
curl https://api.llmbase.ai/v1/chat/completions \
-H "Authorization: Bearer $LLMBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/deepseek-v4.1-flash",
"response_format": { "type": "json_object" },
"messages": [
{
"role": "system",
"content": "You classify support tickets. Respond only with a JSON object with the fields: category (one of: billing, technical, account, other), urgent (true or false), reason (one sentence)."
},
{
"role": "user",
"content": "Since this morning none of our employees can log in. We cannot work."
}
]
}'Example content of choices[0].message.content:
{
"category": "account",
"urgent": true,
"reason": "All employees are locked out and unable to work."
}JSON mode returns valid JSON, and you describe the fields in the prompt. If you need fields and allowed values enforced strictly, use json_schema as shown in the next example.
TypeScript: Strict JSON schema with DeepSeek V4.1 Flash
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.LLMBASE_API_KEY,
baseURL: "https://api.llmbase.ai/v1",
});
const completion = await client.chat.completions.create({
model: "deepseek/deepseek-v4.1-flash",
messages: [
{
role: "system",
content: "You classify support tickets by category and urgency.",
},
{
role: "user",
content: "My last invoice was charged twice. Please refund one payment.",
},
],
response_format: {
type: "json_schema",
json_schema: {
name: "ticket_decision",
strict: true,
schema: {
type: "object",
properties: {
category: {
type: "string",
enum: ["billing", "technical", "account", "other"],
},
urgent: { type: "boolean" },
reason: { type: "string" },
},
required: ["category", "urgent", "reason"],
additionalProperties: false,
},
},
},
});
const decision = JSON.parse(completion.choices[0].message.content ?? "{}");
console.log(decision.category, decision.urgent);Check a model's capabilities
curl "https://api.llmbase.ai/v1/models?metadata=true" \
-H "Authorization: Bearer $LLMBASE_API_KEY"The supported_features field shows whether a model supports json_mode, structured_outputs, or both.
FAQ
What is the difference between JSON mode and structured outputs?
On models with json_mode, JSON mode ({"type": "json_object"}) returns valid JSON, and you describe the structure in the prompt. Structured outputs ({"type": "json_schema"} with strict: true) take a JSON schema, and the response follows the defined fields, types and enum values.
Which models support strict JSON schemas?
These currently include DeepSeek V4.1 Flash (deepseek/deepseek-v4.1-flash), Kimi K2.6 (moonshotai/kimi-k2.6), Kimi K2.7 Code (moonshotai/kimi-k2.7-code), Kimi K3 (moonshotai/kimi-k3), Kimi K3.1 Pro (moonshotai/kimi-k3.1-pro), MiniMax M3.1 Flash (minimax/minimax-m3.1-flash), and Qwen3.8 27B (qwen/qwen3.8-27b). For the current status of each model, check supported_features in GET /v1/models?metadata=true.
What happens if I send a JSON schema to a model without structured outputs?
The API returns HTTP 400 with error code unsupported_request_features. Because the schema is never silently ignored, your code won't quietly receive unstructured responses.
Can I use the DeepSeek API through LLMBase?
Yes. DeepSeek V4.1 Flash is available as deepseek/deepseek-v4.1-flash with JSON mode. It is designed for fast responses on short requests, which makes it a good fit for classification and yes/no checks.
Is my data stored or used for training?
No. LLMBase does not store prompt or response content of the Inference API, and your data is not used for training.
Where are my requests processed?
Requests to the Inference API are processed in EU data centers. Your contracting party is based in Germany, and a DPA is provided.
Do I need to rewrite my existing code?
Not if you already use the OpenAI SDK. Set baseURL to https://api.llmbase.ai/v1, use your LLMBase API key and choose a model ID.
Ready for structured decisions?
Build ticket routing, checks and classification on an OpenAI-compatible API with JSON output, open models and processing in the EU.