Skip to main content

ADITO-LLM

The ADITO-LLM API exposes the self-hosted model through an OpenAI-compatible interface. Use it to add chat completions, structured outputs, and function calling to your ADITO customizations and integrations.

info

The API uses the same request and response structure as the OpenAI API. You can use official OpenAI client libraries (such as openai for JavaScript/TypeScript) by changing only the base URL and API key.


Base URL and endpoints

EndpointURL
Base URLhttps://ai.adito.cloud
Chat completions/chat/completions

The underlying model is an open-source LLM self-hosted on ADITO infrastructure in Germany. It is multimodal and can process both text and image inputs. For a full list of available endpoints and their parameters, refer to the OpenAI API reference.


Authentication

Every request requires an API key, passed as the apiKey parameter when initializing the client. Managed cloud systems receive a system API key automatically at startup. If you need a personal key, contact the AI team.

warning

Keep your API key confidential. Do not expose it in client-side code or public repositories.


Request parameters

The API follows the OpenAI chat completions format. The table below lists the most commonly used parameters.

ParameterTypeRequiredDescription
modelStringYesName of the model to use, e.g. adito-llm.
messagesArrayYesArray of message objects, each with a role and content field.
temperatureNumberNoControls response creativity. Lower values produce more deterministic output.
max_tokensNumberNoMaximum number of tokens in the response.
guided_jsonObjectNoADITO-specific. JSON schema that constrains the model output. See Guided JSON output.
enable_thinkingBooleanNoADITO-specific. Enables thinking mode. Default: false. When true, the model reasons internally before responding. Increases latency and token usage. See Thinking mode.
ADITO-specific parameter

guided_json is not the same as the standard OpenAI response_format parameter. It is an ADITO-specific extension that enforces a JSON schema on the model output at the inference level. Do not use response_format — use guided_json instead.

For a full list of supported parameters, refer to the OpenAI API documentation.


Usage examples

note

The code examples on this page are not JDITO code. They illustrate general API usage and can be adapted to any language or HTTP client.

Basic chat completion

curl https://ai.adito.cloud/chat/completions \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "adito-llm",
"messages": [
{ "role": "system", "content": "You are a CRM assistant. Summarize customer interactions in two sentences." },
{ "role": "user", "content": "Customer Acme Corp had 3 calls last week about delayed shipments, followed by a meeting where a 10% discount was offered." }
],
"temperature": 0.7
}'

Guided JSON output

The API supports guided JSON output, which constrains the model response to match a defined JSON schema. This is useful when the result needs to be processed programmatically — for example, to create or update CRM records.

Click to expand guided JSON example
import OpenAI from 'openai';

const openai = new OpenAI({
baseURL: 'https://ai.adito.cloud',
apiKey: 'your-api-key'
});

async function classifyEmail() {
const response = await openai.chat.completions.create({
model: 'adito-llm',
messages: [
{
role: 'system',
content: 'You are a CRM email classifier. Analyze the email and return structured data.'
},
{
role: 'user',
content: `Classify this email:\n\nSubject: Urgent — production system down\nBody: Our main ERP integration has stopped syncing since this morning. We need immediate help. This is blocking 50+ users.`
}
],
temperature: 0.15,
// guided_json is ADITO-specific — do not use response_format
guided_json: {
type: 'object',
properties: {
subject_summary: { type: 'string' },
priority: { type: 'string', enum: ['low', 'medium', 'high', 'critical'] },
category: { type: 'string', enum: ['bug', 'feature_request', 'support', 'billing', 'other'] },
suggested_team: { type: 'string' }
},
required: ['subject_summary', 'priority', 'category'],
additionalProperties: false
}
});
console.log(response.choices[0].message.content);
// → {"subject_summary":"ERP integration sync failure","priority":"critical","category":"bug","suggested_team":"Integrations"}
}

classifyEmail();

Function calling and tool use

The API supports OpenAI-style function calling. You define tools as part of the request, and the model decides when to invoke them based on the conversation context.

The example below shows a CRM scenario: the user asks about a contact's recent activity, and the model calls two tools — one to look up activities and another to create a follow-up task.

Click to expand function calling example
import OpenAI from 'openai';

const openai = new OpenAI({
baseURL: 'https://ai.adito.cloud',
apiKey: 'your-api-key'
});

async function handleContactQuery() {
const response = await openai.chat.completions.create({
model: 'adito-llm',
messages: [
{
role: 'system',
content: 'You are a CRM assistant. Use the available tools to look up data and create records.'
},
{
role: 'user',
content: 'Show me the last 5 activities for contact "Maria Hoffmann" and create a follow-up call for next Monday.'
}
],
tools: [
{
type: 'function',
function: {
name: 'get_contact_activities',
description: 'Retrieve recent activities for a CRM contact.',
parameters: {
type: 'object',
properties: {
contact_name: { type: 'string', description: 'Full name of the contact' },
limit: { type: 'number', description: 'Maximum number of activities to return' }
},
required: ['contact_name']
}
}
},
{
type: 'function',
function: {
name: 'create_activity',
description: 'Create a new activity (call, meeting, task) in the CRM.',
parameters: {
type: 'object',
properties: {
contact_name: { type: 'string', description: 'Full name of the contact' },
activity_type: { type: 'string', enum: ['call', 'meeting', 'task'], description: 'Type of activity' },
subject: { type: 'string', description: 'Subject line for the activity' },
due_date: { type: 'string', description: 'Due date in YYYY-MM-DD format' }
},
required: ['contact_name', 'activity_type', 'subject', 'due_date']
}
}
}
],
tool_choice: 'auto',
temperature: 0.15
});

// Process tool calls from the response
const toolCalls = response.choices[0].message.tool_calls;
if (toolCalls) {
toolCalls.forEach(call => {
console.log(`Tool: ${call.function.name}, Args: ${call.function.arguments}`);
});
}
}

handleContactQuery();

Thinking mode

Thinking mode makes the model reason through the problem before responding. Use it when the task requires more than pattern-matching: complex classification, ambiguous inputs, or long documents where the model needs to work out an answer rather than retrieve one.

Enable it by adding enable_thinking: true to your request. The default is false. Existing requests are unaffected.

note

Thinking mode increases response latency and token usage. Enable it only for tasks where reasoning depth outweighs the cost.

tip

Combine thinking mode with a low temperature (0.10.2) for deterministic reasoning output.

curl https://ai.adito.cloud/chat/completions \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "adito-llm",
"enable_thinking": true,
"messages": [
{
"role": "system",
"content": "You are a CRM analyst. Analyse the support case and determine root cause, urgency, and recommended action."
},
{
"role": "user",
"content": "Customer reports intermittent login failures since last Friday. Affects roughly 30% of users. No error message shown — the login form just resets. Backend logs show no authentication errors."
}
],
"temperature": 0.15
}'

Error handling

API requests can fail due to authentication errors, rate limits, or invalid parameters. Wrap your calls in a try/catch block and inspect the error response.

async function safeChatCompletion() {
try {
const response = await openai.chat.completions.create({
model: 'adito-llm',
messages: [
{ role: 'user', content: 'Summarize this account.' }
]
});
return response.choices[0].message.content;
} catch (error) {
// The OpenAI client throws an error with status and message
console.error(`API error: ${error.status}${error.message}`);
// Common status codes:
// 401 — Invalid or missing API key
// 429 — Rate limit exceeded, retry after a delay
// 500 — Server error, retry or contact the AI team
}
}

Best practices

For prompt tips and CRM-specific examples, see the Prompting Guide.


See also: Prompting Guide | Capabilities | Roadmap | AI Overview