ADITO-LLM API
Overview
The ADITO LLM API provides a self-hosted Large Language Model (LLM) service with an OpenAI-compatible interface. This documentation describes how developers can integrate and use the service efficiently.
The API is based on Mistral-Small-3.2-24B-Instruct-2506-FP8, a high-capacity language model with 24 billion parameters. The service is powered by vLLM, ensuring compatibility with the OpenAI API specification. Most OpenAI API parameters are supported, subject to vLLM's implementation.
The ADITO LLM API uses the same structure as the OpenAI API. You can use official OpenAI libraries (such as openai
for JavaScript/TypeScript) without modification, except for the base URL and API key.
API Endpoints and Base URL
- Base URL:
https://ai.adito.cloud
- Chat Completions Endpoint:
/chat/completions
All requests must be sent to the base URL with the appropriate endpoint path.
Authentication
To access the ADITO LLM API, an API key is required. This key must be provided as the apiKey
parameter when initializing the client.
- System API Key: Your cloud system typically receives an API key at startup.
- Personal API Key: If you require a personal API key, please contact the AI team.
Always keep your API key confidential. Do not expose it in client-side code or public repositories.
Request Structure and Parameters
The API follows the OpenAI chat completions format. The following parameters are required or commonly used:
Parameter | Type | Description |
---|---|---|
model | String | Name of the model to use (e.g., adito-llm ). |
messages | Array | Array of message objects, each with role and content fields. |
temperature | Number | Controls response creativity. Lower values yield more deterministic output. |
max_tokens | Number | Maximum number of tokens in the response. |
For a full list of supported parameters, refer to the OpenAI API Documentation.
Usage Examples
Basic Chat Completion
The following example demonstrates how to send a chat completion request using the official OpenAI JavaScript client:
import OpenAI from 'openai';
const openai = new OpenAI({
baseURL: 'https://ai.adito.cloud',
apiKey: 'your-api-key' // Replace with your actual API key
});
async function getCompletion() {
const response = await openai.chat.completions.create({
model: 'adito-llm',
messages: [
{ role: 'system', content: 'You are a helpful assistant for ADITO developers.' },
{ role: 'user', content: 'How do I implement Feature X?' }
],
temperature: 0.7
});
console.log(response.choices[0].message.content);
}
getCompletion();
Guided JSON Output
The API supports guided JSON output for structured responses. The following example demonstrates how to request a response in a specific JSON schema:
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 getGuidedJson() {
const response = await openai.chat.completions.create({
model: 'adito-llm',
messages: [
{
role: 'system',
content: 'Respond exclusively in JSON according to the provided schema.'
},
{
role: 'user',
content: "Create a task: 'Prepare customer demo' with priority high and due date 2025-08-15."
}
],
temperature: 0.15,
guided_json: {
type: 'object',
properties: {
title: { type: 'string' },
priority: { type: 'string', enum: ['low', 'medium', 'high'] },
due_date: { type: 'string', format: 'date' }
},
required: ['title', 'priority'],
additionalProperties: false
}
});
// Handle the structured JSON response
}
getGuidedJson();
Function Calling and Tool Use
The API supports OpenAI-style function calling. Below is an example of how to define and use tools (functions) in a chat completion request:
Click to expand tools and function calling example
import OpenAI from 'openai';
const openai = new OpenAI({
baseURL: 'https://ai.adito.cloud',
apiKey: 'your-api-key'
});
async function callWithTools() {
const response = await openai.chat.completions.create({
model: 'adito-llm',
messages: [
{ role: 'system', content: 'Use tools when appropriate.' },
{ role: 'user', content: 'Plan a restaurant visit in Nuremberg and book a taxi for 19:30.' }
],
tools: [
{
type: 'function',
function: {
name: 'find_restaurant',
description: 'Find restaurants by city and optional cuisine.',
parameters: {
type: 'object',
properties: {
city: { type: 'string', description: 'City, e.g., Nuremberg' },
cuisine: { type: 'string', description: 'Cuisine, e.g., Italian' }
},
required: ['city']
}
}
},
{
type: 'function',
function: {
name: 'order_taxi',
description: 'Order a taxi for a specific time and address.',
parameters: {
type: 'object',
properties: {
pickup_address: { type: 'string', description: 'Pickup address' },
time: { type: 'string', description: 'Time, e.g., 19:30' }
},
required: ['pickup_address', 'time']
}
}
}
],
tool_choice: 'auto',
temperature: 0.15
});
// Handle the response as needed
}
callWithTools();
Best Practices and Recommendations
Prompt Design
Formulate clear and specific prompts to achieve optimal results. Use system messages to define the assistant's behavior and context.
Refer to the Prompting Guide for strategies on effective prompt engineering.
Additional Information
- The ADITO LLM API is compatible with most OpenAI API parameters, subject to the implementation in vLLM.
- For further details, consult the OpenAI API Reference and the vLLM documentation.