Model HQ
DocumentationAPI Reference
The Model HQ API provides programmatic access to the core Model HQ platform with APIs for model inference, RAG and Agent processing.
Models
Core inference endpoints for text generation, vision analysis, and specialized model functions.
/stream/Create stream
Generate a streaming inference response from a selected model. The response will be streamed back in real-time as the model generates tokens.
Request body
Required
model_nameThe name of the model to use for inference
promptThe input text prompt to generate a response for
Optional
max_outputMaximum number of tokens to generate
temperatureControls randomness in generation (0.0-1.0)
sampleWhether to use sampling for generation
contextAdditional context to provide to the model
api_keyYour API authentication key
trusted_keyAlternative trusted authentication key
Returns
llm_responsePartial response text streamed incrementally as server-sent events
Timeout: This endpoint has a timeout of 60 seconds. The connection remains open for streaming responses.
Request
# Example variables
model_name = "phi-3-ov"
prompt = "Explain quantum computing in simple terms"
max_output = 300
temperature = 0.7
print("\nStarting 'Create stream'")
print(f"Model_name: {model_name}")
print(f"Prompt: {prompt}")
print(f"Max_output: {max_output}")
print(f"Temperature: {temperature}")
# This is the streaming stream API
stream = client.stream(model_name=model_name, prompt=prompt, max_output=max_output, temperature=temperature)
for chunk in stream:
print(chunk)
Response
// Streaming response format
data: {"llm_response": "Quantum computing is a revolutionary approach..."}Additional Information
- • Category: models
- • Timeout: 60 seconds
- • Supports streaming responses
- • Requires authentication
/inference/Create inference
Generate a complete inference response from a selected model. The response will be the complete generation from the model returned as a single response.
Request body
Required
promptThe input text prompt to generate a response for
model_nameThe name of the model to use for inference
Optional
max_outputMaximum number of tokens to generate
temperatureControls randomness in generation (0.0-1.0)
sampleWhether to use sampling for generation
api_keyYour API authentication key
contextAdditional context to provide to the model
paramsAdditional model-specific parameters
fxFunction execution parameters
trusted_keyAlternative trusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
prompt = "Write a short story about artificial intelligence"
model_name = "llama-3.2-3b-instruct-ov"
max_output = 100
temperature = 0.8
print("\nStarting 'Create inference'")
print(f"Prompt: {prompt}")
print(f"Model_name: {model_name}")
print(f"Max_output: {max_output}")
print(f"Temperature: {temperature}")
# This is the main inference API
response = client.inference(prompt=prompt, model_name=model_name, max_output=max_output, temperature=temperature)
print("\nCreate inference response: ", response)
Response
{
"llm_response": "Artificial intelligence represents one of humanity's greatest..."
}Additional Information
- • Category: models
- • Timeout: 60 seconds
- • Requires authentication
/function_call/Function call
Execute a specialized function call with SLIM model for structured outputs and specific tasks.
Request body
Required
model_nameThe SLIM model name to use for function calling
contextThe context or input text for the function
Optional
promptAdditional prompt instructions
paramsFunction-specific parameters
functionSpecific function to execute
api_keyYour API authentication key
get_logitsWhether to return model logits
max_outputMaximum tokens to generate
temperatureSampling temperature
sampleWhether to use sampling
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
model_name = "phi-3-ov"
context = "John Smith works at Acme Corp as a Software Engineer. He can be reached at john@acme.com."
function = "extract_entities"
print("\nStarting 'Function call'")
print(f"Model_name: {model_name}")
print(f"Context: {context}")
print(f"Function: {function}")
# This is the main function_call API
response = client.function_call(model_name=model_name, context=context, function=function)
print("\nFunction call response: ", response)
Response
{
"llm_response": {
"name": "John Smith",
"company": "Acme Corp",
"role": "Software Engineer",
"email": "john@acme.com"
}
}Additional Information
- • Category: models
- • Timeout: 60 seconds
- • Requires authentication
/sentiment/Sentiment analysis
Execute sentiment analysis using a specialized SLIM sentiment model.
Request body
Required
contextThe text to analyze for sentiment
Optional
model_nameSentiment model to use
get_logitsWhether to return model logits
max_outputMaximum tokens to generate
temperatureSampling temperature
sampleWhether to use sampling
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
context = "I absolutely love this new product! It's amazing and works perfectly."
print("\nStarting 'Sentiment analysis'")
print(f"Context: {context}")
# This is the main sentiment API
response = client.sentiment(context=context)
print("\nSentiment analysis response: ", response)
Response
{
"llm_response": {
"sentiment": "positive",
"confidence": 0.95
}
}Additional Information
- • Category: models
- • Timeout: 60 seconds
- • Requires authentication
/extract/Extract information
Execute information extraction using a SLIM extract model to pull specific data from text.
Request body
Required
contextThe text to extract information from
extract_keysList of keys/fields to extract from the text
Optional
get_logitsWhether to return model logits
max_outputMaximum tokens to generate
temperatureSampling temperature
sampleWhether to use sampling
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
context = "Invoice #12345 dated March 15, 2024. Total amount: $1,250.00. Customer: ABC Corp."
extract_keys = ["invoice_number","date","total_amount","customer"]
print("\nStarting 'Extract information'")
print(f"Context: {context}")
print(f"Extract_keys: {extract_keys}")
# This is the main extract API
response = client.extract(context=context, extract_keys=extract_keys)
print("\nExtract information response: ", response)
Response
{
"llm_response": {
"invoice_number": "12345",
"date": "March 15, 2024",
"total_amount": "$1,250.00",
"customer": "ABC Corp"
}
}Additional Information
- • Category: models
- • Timeout: 60 seconds
- • Requires authentication
/vision/Vision inference
Execute vision model inference to analyze and describe images with text prompts.
Request body
Required
uploaded_filesArray of image files to analyze
promptText prompt describing what to analyze in the image
Optional
max_outputMaximum tokens to generate
model_nameVision model to use
temperatureSampling temperature
sampleWhether to use sampling
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 360 seconds.
Request
# Example variables
uploaded_files = ["image1.jpg"]
prompt = "Describe what you see in this image"
model_name = "mistral-7b-instruct-v0.3-ov"
print("\nStarting 'Vision inference'")
print(f"Uploaded_files: {uploaded_files}")
print(f"Prompt: {prompt}")
print(f"Model_name: {model_name}")
# This is the main vision API
response = client.vision(uploaded_files=uploaded_files, prompt=prompt, model_name=model_name)
print("\nVision inference response: ", response)
Response
{
"llm_response": "I can see a beautiful landscape with mountains in the background..."
}Additional Information
- • Category: models
- • Timeout: 360 seconds
- • Requires authentication
/vision_stream/Vision stream
Generate a streaming inference response from vision model for real-time image analysis.
Request body
Required
uploaded_filesArray of image files to analyze
model_nameVision model to use for streaming
promptText prompt for image analysis
Optional
max_outputMaximum tokens to generate
temperatureSampling temperature
sampleWhether to use sampling
trusted_keyTrusted authentication key
Returns
llm_responsePartial response text streamed incrementally as server-sent events
Timeout: This endpoint has a timeout of 360 seconds. The connection remains open for streaming responses.
Request
# Example variables
uploaded_files = ["image1.jpg"]
model_name = "llama-3.2-3b-instruct-ov"
prompt = "Analyze this image and describe the scene"
print("\nStarting 'Vision stream'")
print(f"Uploaded_files: {uploaded_files}")
print(f"Model_name: {model_name}")
print(f"Prompt: {prompt}")
# This is the streaming vision_stream API
stream = client.vision_stream(uploaded_files=uploaded_files, model_name=model_name, prompt=prompt)
for chunk in stream:
print(chunk)
Response
// Streaming response format
data: {"llm_response": "The image shows a bustling city street..."}Additional Information
- • Category: models
- • Timeout: 360 seconds
- • Supports streaming responses
- • Requires authentication
/rank/Semantic ranking
Execute semantic similarity ranking with reranker model to rank documents by relevance to a query.
Request body
Required
queryThe search query to rank documents against
documentsArray of documents to rank
Optional
model_nameReranker model to use
text_chunk_sizeSize of text chunks for processing
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
query = "machine learning algorithms"
documents = ["Document about neural networks","Article on cooking recipes","Paper on deep learning"]
print("\nStarting 'Semantic ranking'")
print(f"Query: {query}")
print(f"Documents: {documents}")
# This is the main rank API
response = client.rank(query=query, documents=documents)
print("\nSemantic ranking response: ", response)
Response
{
"llm_response": [
{
"doc_id": 0,
"score": 0.95
},
{
"doc_id": 2,
"score": 0.87
},
{
"doc_id": 1,
"score": 0.12
}
]
}Additional Information
- • Category: models
- • Timeout: 60 seconds
- • Requires authentication
/classify/Text classification
Execute text classification inference, primarily used for safety controls and content moderation.
Request body
Required
model_nameClassification model to use
contextText to classify
Optional
text_chunk_sizeSize of text chunks for processing
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
model_name = "phi-4-ov"
context = "This is a sample text to classify for safety"
print("\nStarting 'Text classification'")
print(f"Model_name: {model_name}")
print(f"Context: {context}")
# This is the main classify API
response = client.classify(model_name=model_name, context=context)
print("\nText classification response: ", response)
Response
{
"llm_response": {
"classification": "safe",
"confidence": 0.98
}
}Additional Information
- • Category: models
- • Timeout: 60 seconds
- • Requires authentication
/embedding/Generate embeddings
Generate vector embeddings for text using embedding models for semantic search and similarity.
Request body
Required
model_nameEmbedding model to use
contextText to generate embeddings for
Optional
text_chunk_sizeSize of text chunks for processing
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
model_name = "llama-3.2-3b-instruct-ov"
context = "This is a sample text to embed"
print("\nStarting 'Generate embeddings'")
print(f"Model_name: {model_name}")
print(f"Context: {context}")
# This is the main embedding API
response = client.embedding(model_name=model_name, context=context)
print("\nGenerate embeddings response: ", response)
Response
{
"embeddings": [
0.1,
-0.2,
0.3,
0.4,
-0.1
]
}Additional Information
- • Category: models
- • Timeout: 60 seconds
- • Requires authentication
/list_all_models/List models
Returns a list of all models available on the server.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 3 seconds.
Request
# Example variables
print("\nStarting 'List models'")
# This is the main list_all_models API
response = client.list_all_models()
print("\nList models response: ", response)
Response
{
"response": [
"llama-3.2-1b-instruct-ov",
"llama-3.2-3b-instruct-ov",
"mistral-7b-instruct-v0.3-ov",
"phi-4-ov"
]
}Additional Information
- • Category: models
- • Timeout: 3 seconds
- • Requires authentication
/system_info/System information
Returns key information about the system and server configuration.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 3 seconds.
Request
# Example variables
print("\nStarting 'System information'")
# This is the main system_info API
response = client.system_info()
print("\nSystem information response: ", response)
Response
{
"response": {
"version": "1.0.0",
"gpu_count": 2,
"memory": "32GB",
"status": "active"
}
}Additional Information
- • Category: models
- • Timeout: 3 seconds
- • Requires authentication
/model_lookup/Model information
Returns detailed model card information about a selected model.
Request body
Required
model_nameName of the model to look up
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 3 seconds.
Request
# Example variables
model_name = "mistral-7b-instruct-v0.3-ov"
print("\nStarting 'Model information'")
print(f"Model_name: {model_name}")
# This is the main model_lookup API
response = client.model_lookup(model_name=model_name)
print("\nModel information response: ", response)
Response
{
"response": {
"name": "mistral-7b-instruct-v0.3-ov",
"parameters": "7B",
"context_length": 4096,
"loaded": true
}
}Additional Information
- • Category: models
- • Timeout: 3 seconds
- • Requires authentication
/model_load/Load model
Explicitly loads a selected model into memory on the API server, useful as a preparation step.
Request body
Required
model_nameName of the model to load into memory
Optional
sampleEnable sampling during generation
temperatureSampling temperature for response generation
max_outputMaximum number of output tokens
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 120 seconds.
Request
# Example variables
model_name = "phi-4-ov"
print("\nStarting 'Load model'")
print(f"Model_name: {model_name}")
# This is the main model_load API
response = client.model_load(model_name=model_name)
print("\nLoad model response: ", response)
Response
{
"response": {
"model_name": "phi-4-ov",
"status": "loaded",
"memory_usage": "6.2GB"
}
}Additional Information
- • Category: models
- • Timeout: 120 seconds
- • Requires authentication
/model_unload/Unload model
Explicitly unloads a selected model from memory on the API server.
Request body
Required
model_nameName of the model to unload from memory
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 30 seconds.
Request
# Example variables
model_name = "llama-3.2-1b-instruct-ov"
print("\nStarting 'Unload model'")
print(f"Model_name: {model_name}")
# This is the main model_unload API
response = client.model_unload(model_name=model_name)
print("\nUnload model response: ", response)
Response
{
"response": {
"model_name": "llama-3.2-1b-instruct-ov",
"status": "unloaded",
"memory_freed": "6.2GB"
}
}Additional Information
- • Category: models
- • Timeout: 30 seconds
- • Requires authentication
/inference_json/Inference with JSON
Generate a complete inference response with JSON-encoded request body. Same as the standard inference endpoint but accepts parameters as a JSON payload rather than form data.
Request body
Required
promptThe input text prompt to generate a response for
model_nameThe name of the model to use for inference
Optional
max_outputMaximum number of tokens to generate
temperatureControls randomness in generation (0.0-1.0)
sampleWhether to use sampling for generation
api_keyYour API authentication key
contextAdditional context to provide to the model
paramsAdditional model-specific parameters
fxFunction execution parameters
trusted_keyAlternative trusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
prompt = "Write a short story about artificial intelligence"
model_name = "llama-3.2-3b-instruct-ov"
max_output = 100
temperature = 0.8
print("\nStarting 'Inference with JSON'")
print(f"Prompt: {prompt}")
print(f"Model_name: {model_name}")
print(f"Max_output: {max_output}")
print(f"Temperature: {temperature}")
# This is the main inference_json API
response = client.inference_json(prompt=prompt, model_name=model_name, max_output=max_output, temperature=temperature)
print("\nInference with JSON response: ", response)
Response
{
"llm_response": "Artificial intelligence represents one of humanity's greatest..."
}Additional Information
- • Category: models
- • Timeout: 60 seconds
- • Requires authentication
/generate_image/Generate image
Generate an image from a text prompt using a supported image generation model. Returns the file path to the saved image.
Request body
Required
promptText description of the image to generate
Optional
model_nameImage generation model to use
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 120 seconds.
Request
# Example variables
prompt = "A serene mountain landscape at sunset"
model_name = "sd-xl"
print("\nStarting 'Generate image'")
print(f"Prompt: {prompt}")
print(f"Model_name: {model_name}")
# This is the main generate_image API
response = client.generate_image(prompt=prompt, model_name=model_name)
print("\nGenerate image response: ", response)
Response
{
"fp": "/path/to/generated/image.bmp"
}Additional Information
- • Category: models
- • Timeout: 120 seconds
- • Requires authentication
/generate_speech/Generate speech
Generate speech audio from text using a supported text-to-speech model. Returns the file path to the saved audio file.
Request body
Required
promptText to convert to speech
Optional
model_nameTTS model to use
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 120 seconds.
Request
# Example variables
prompt = "Hello, welcome to Model HQ. This is a text to speech demonstration."
model_name = "tts-model"
print("\nStarting 'Generate speech'")
print(f"Prompt: {prompt}")
print(f"Model_name: {model_name}")
# This is the main generate_speech API
response = client.generate_speech(prompt=prompt, model_name=model_name)
print("\nGenerate speech response: ", response)
Response
{
"fp": "/path/to/generated/speech.wav"
}Additional Information
- • Category: models
- • Timeout: 120 seconds
- • Requires authentication
/model_download/Download model
Downloads a model directly from the Model HQ server to the local device, rather than from an external model repository.
Request body
Required
model_nameName of the model to download
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 120 seconds.
Request
# Example variables
model_name = "llama-3.2-1b-instruct-ov"
print("\nStarting 'Download model'")
print(f"Model_name: {model_name}")
# This is the main model_download API
response = client.model_download(model_name=model_name)
print("\nDownload model response: ", response)
Response
{
"response": {
"status": "success",
"zip_fp": "/path/to/downloaded/model.zip"
}
}Additional Information
- • Category: models
- • Timeout: 120 seconds
- • Requires authentication
/test_batch/Batch test
Sends a test file to the server for batch evaluation and returns aggregated results. Ideal for running a full test suite against a model in a single request.
Request body
Required
model_nameName of the model to test
test_fileTest file containing prompts and expected outputs
Optional
max_outputMaximum output tokens
temperatureSampling temperature
sampleEnable sampling
api_keyAPI key for authentication
contextContext for the test
paramsAdditional model parameters
fxFunction name for function-call testing
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 1000 seconds.
Request
# Example variables
model_name = "llama-3.2-3b-instruct-ov"
test_file = "test_suite.jsonl"
print("\nStarting 'Batch test'")
print(f"Model_name: {model_name}")
print(f"Test_file: {test_file}")
# This is the main test_batch API
response = client.test_batch(model_name=model_name, test_file=test_file)
print("\nBatch test response: ", response)
Response
{
"test_results": {
"total": 100,
"passed": 95,
"failed": 5,
"accuracy": 0.95
}
}Additional Information
- • Category: models
- • Timeout: 1000 seconds
- • Requires authentication
/test/Test model
Unpacks a test file and runs each test individually, returning per-test results. Designed for real-time command-line testing where you want to see each result as it completes.
Request body
Required
model_nameName of the model to test
test_fileTest file containing prompts and expected outputs
Optional
max_outputMaximum output tokens
temperatureSampling temperature
sampleEnable sampling
api_keyAPI key for authentication
contextContext for the test
paramsAdditional model parameters
fxFunction name for function-call testing
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
model_name = "llama-3.2-3b-instruct-ov"
test_file = "test_suite.jsonl"
print("\nStarting 'Test model'")
print(f"Model_name: {model_name}")
print(f"Test_file: {test_file}")
# This is the main test API
response = client.test(model_name=model_name, test_file=test_file)
print("\nTest model response: ", response)
Response
{
"test_results": [
{
"test_id": 1,
"passed": true,
"output": "..."
},
{
"test_id": 2,
"passed": false,
"output": "..."
}
]
}Additional Information
- • Category: models
- • Timeout: 60 seconds
- • Requires authentication
RAG (Retrieval Augmented Generation)
Document and library-based question answering with semantic search and context retrieval.
/document_inference/Document Q&A
Specialized inference to ask questions about uploaded documents. Combines document parsing, semantic search, and LLM inference.
Request body
Required
questionQuestion to ask about the document
uploaded_documentDocument file to analyze
Optional
model_nameLLM model to use for answering
text_chunk_sizeSize of text chunks for processing
tables_onlyWhether to focus only on tables
use_top_n_contextNumber of top context chunks to use
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
question = "What is the main conclusion of this research paper?"
uploaded_document = "research_paper.pdf"
model_name = "phi-3-ov"
print("\nStarting 'Document Q&A'")
print(f"Question: {question}")
print(f"Uploaded_document: {uploaded_document}")
print(f"Model_name: {model_name}")
# This is the main document_inference API
response = client.document_inference(question=question, uploaded_document=uploaded_document, model_name=model_name)
print("\nDocument Q&A response: ", response)
Response
{
"response": "Based on the document analysis, the main conclusion is..."
}Additional Information
- • Category: rag
- • Timeout: 60 seconds
- • Requires authentication
/library_inference/Library Q&A
Specialized RAG inference that ranks entries from a library and generates responses based on retrieved content.
Request body
Required
questionQuestion to ask about the library content
library_nameName of the library to search
model_nameLLM model to use for answering
Optional
use_top_n_contextNumber of top context chunks to use
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
question = "What are the key features of the product?"
library_name = "product_docs"
model_name = "llama-3.2-3b-instruct-ov"
print("\nStarting 'Library Q&A'")
print(f"Question: {question}")
print(f"Library_name: {library_name}")
print(f"Model_name: {model_name}")
# This is the main library_inference API
response = client.library_inference(question=question, library_name=library_name, model_name=model_name)
print("\nLibrary Q&A response: ", response)
Response
{
"response": "Based on the library content, the key features include..."
}Additional Information
- • Category: rag
- • Timeout: 60 seconds
- • Requires authentication
/document_batch_analysis/Batch document analysis
Analyzes multiple documents with a set of questions, ideal for processing contracts, invoices, or reports with consistent queries.
Request body
Required
uploaded_filesArray of documents to analyze
question_listList of questions to ask each document
Optional
model_nameLLM model to use for analysis
rerankerReranker model for result optimization
ragEnable retrieval-augmented generation for enhanced context
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 600 seconds.
Request
# Example variables
uploaded_files = ["contract1.pdf","contract2.pdf"]
question_list = ["What is the governing law?","What is the termination notice period?"]
model_name = "mistral-7b-instruct-v0.3-ov"
print("\nStarting 'Batch document analysis'")
print(f"Uploaded_files: {uploaded_files}")
print(f"Question_list: {question_list}")
print(f"Model_name: {model_name}")
# This is the main document_batch_analysis API
response = client.document_batch_analysis(uploaded_files=uploaded_files, question_list=question_list, model_name=model_name)
print("\nBatch document analysis response: ", response)
Response
{
"response": {
"results": [
{
"document": "contract1.pdf",
"answers": [
"Delaware",
"30 days"
]
},
{
"document": "contract2.pdf",
"answers": [
"California",
"60 days"
]
}
]
}
}Additional Information
- • Category: rag
- • Timeout: 600 seconds
- • Requires authentication
/library_stream_inference/Library stream
Streaming version of Library Q&A. Ranks entries from a library and streams the generated response token by token for real-time display.
Request body
Required
questionQuestion to ask about the library content
library_nameName of the library to search
model_nameLLM model to use for answering
Optional
dbDatabase type
vector_dbVector database type
account_nameAccount identifier for multi-tenant setups
use_top_n_contextNumber of top context chunks to use
result_countNumber of results to retrieve
trusted_keyTrusted authentication key
Returns
llm_responsePartial response text streamed incrementally as server-sent events
Timeout: This endpoint has a timeout of 60 seconds. The connection remains open for streaming responses.
Request
# Example variables
question = "What are the key features of the product?"
library_name = "product_docs"
model_name = "llama-3.2-3b-instruct-ov"
print("\nStarting 'Library stream'")
print(f"Question: {question}")
print(f"Library_name: {library_name}")
print(f"Model_name: {model_name}")
# This is the streaming library_stream_inference API
stream = client.library_stream_inference(question=question, library_name=library_name, model_name=model_name)
for chunk in stream:
print(chunk)
Response
// Streaming response format
data: {"llm_response": "Based on the library content, the key features include..."}Additional Information
- • Category: rag
- • Timeout: 60 seconds
- • Supports streaming responses
- • Requires authentication
/build_source/Build source
Builds an indexed source file from a set of uploaded documents. Files are parsed, text chunked and organized into a single jsonl source file for efficient retrieval.
Request body
Required
uploaded_filesArray of files to process into a source
Optional
text_chunk_sizeSize of text chunks for processing
tables_onlyWhether to focus only on tables
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 300 seconds.
Request
# Example variables
uploaded_files = ["document1.pdf","document2.pdf"]
text_chunk_size = 500
print("\nStarting 'Build source'")
print(f"Uploaded_files: {uploaded_files}")
print(f"Text_chunk_size: {text_chunk_size}")
# This is the main build_source API
response = client.build_source(uploaded_files=uploaded_files, text_chunk_size=text_chunk_size)
print("\nBuild source response: ", response)
Response
{
"response": "/path/to/source/my_source.jsonl"
}Additional Information
- • Category: rag
- • Timeout: 300 seconds
- • Requires authentication
/build_source_context/Build source context
Executes the first half of a RAG query by comparing a question with a source document and returning the most relevant parts with metadata (file name, page number, etc.). The output can be passed separately to generate an answer.
Request body
Required
uploaded_sourceSource file to search
questionQuery to find relevant context for
Optional
use_top_n_contextNumber of top context chunks to use
tables_onlyWhether to focus only on tables
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
uploaded_source = "my_source.jsonl"
question = "What are the termination clauses?"
use_top_n_context = 6
print("\nStarting 'Build source context'")
print(f"Uploaded_source: {uploaded_source}")
print(f"Question: {question}")
print(f"Use_top_n_context: {use_top_n_context}")
# This is the main build_source_context API
response = client.build_source_context(uploaded_source=uploaded_source, question=question, use_top_n_context=use_top_n_context)
print("\nBuild source context response: ", response)
Response
{
"response": [
{
"doc_id": 1,
"text": "Relevant passage from the source...",
"score": 0.95,
"page_num": 3
}
]
}Additional Information
- • Category: rag
- • Timeout: 60 seconds
- • Requires authentication
/source_inference/Source Q&A
Executes a complete RAG inference on a prebuilt source file. Combines semantic ranking, context building, and LLM prompting to answer questions based on source content.
Request body
Required
uploaded_sourceSource file to query
questionQuestion to ask about the source content
Optional
model_nameLLM model to use for answering
max_outputMaximum tokens to generate
use_top_n_contextNumber of top context chunks to use
tables_onlyWhether to focus only on tables
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
uploaded_source = "my_source.jsonl"
question = "What are the key conclusions?"
model_name = "llama-3.2-3b-instruct-ov"
use_top_n_context = 6
print("\nStarting 'Source Q&A'")
print(f"Uploaded_source: {uploaded_source}")
print(f"Question: {question}")
print(f"Model_name: {model_name}")
print(f"Use_top_n_context: {use_top_n_context}")
# This is the main source_inference API
response = client.source_inference(uploaded_source=uploaded_source, question=question, model_name=model_name, use_top_n_context=use_top_n_context)
print("\nSource Q&A response: ", response)
Response
{
"llm_response": "Based on the source content, the key conclusions are..."
}Additional Information
- • Category: rag
- • Timeout: 60 seconds
- • Requires authentication
/source_stream_inference/Source stream
Streaming version of Source Q&A. Executes RAG inference on a prebuilt source and streams the generated response token by token for real-time display.
Request body
Required
uploaded_sourceSource file to query
questionQuestion to ask about the source content
Optional
model_nameLLM model to use for answering
max_outputMaximum tokens to generate
use_top_n_contextNumber of top context chunks to use
tables_onlyWhether to focus only on tables
trusted_keyTrusted authentication key
Returns
llm_responsePartial response text streamed incrementally as server-sent events
Timeout: This endpoint has a timeout of 60 seconds. The connection remains open for streaming responses.
Request
# Example variables
uploaded_source = "my_source.jsonl"
question = "What are the key conclusions?"
model_name = "llama-3.2-3b-instruct-ov"
use_top_n_context = 6
print("\nStarting 'Source stream'")
print(f"Uploaded_source: {uploaded_source}")
print(f"Question: {question}")
print(f"Model_name: {model_name}")
print(f"Use_top_n_context: {use_top_n_context}")
# This is the streaming source_stream_inference API
stream = client.source_stream_inference(uploaded_source=uploaded_source, question=question, model_name=model_name, use_top_n_context=use_top_n_context)
for chunk in stream:
print(chunk)
Response
// Streaming response format
data: {"llm_response": "Based on the source content, the key conclusions are..."}Additional Information
- • Category: rag
- • Timeout: 60 seconds
- • Supports streaming responses
- • Requires authentication
/inference_predictive_model/Predictive model inference
Runs a predictive model inference against a test file or dataset, returning batch analysis results. Useful for evaluating model performance on structured test data.
Request body
Required
test_fileTest file containing evaluation data
dataset_nameName of the dataset to use for evaluation
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
test_file = "evaluation_data.jsonl"
dataset_name = "contract_qa_v1"
print("\nStarting 'Predictive model inference'")
print(f"Test_file: {test_file}")
print(f"Dataset_name: {dataset_name}")
# This is the main inference_predictive_model API
response = client.inference_predictive_model(test_file=test_file, dataset_name=dataset_name)
print("\nPredictive model inference response: ", response)
Response
{
"results": {
"accuracy": 0.92,
"total_samples": 100,
"passed": 92
}
}Additional Information
- • Category: rag
- • Timeout: 60 seconds
- • Requires authentication
Library Management
Create and manage document libraries for knowledge base construction and semantic search capabilities.
/library/create_new_library/Create library
Creates a new library which is a collection of documents that are parsed, indexed and organized for knowledge retrieval.
Request body
Required
library_nameName for the new library
account_nameAccount identifier for multi-tenant setups
dbDatabase type (e.g., mongo)
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 30 seconds.
Request
# Example variables
library_name = "contract_library"
account_name = "user123"
db = "mongo"
print("\nStarting 'Create library'")
print(f"Library_name: {library_name}")
print(f"Account_name: {account_name}")
print(f"Db: {db}")
# This is the main create_new_library API
response = client.create_new_library(library_name=library_name, account_name=account_name, db=db)
print("\nCreate library response: ", response)
Response
{
"response": {
"library_name": "contract_library",
"status": "created",
"doc_count": 0
}
}Additional Information
- • Category: library
- • Timeout: 30 seconds
- • Requires authentication
/library/add_files/Add files to library
Core method for adding files to a Library, which are parsed, text chunked and indexed automatically upon upload.
Request body
Required
library_nameName of the library to add files to
uploaded_filesArray of files to upload and process
account_nameAccount identifier for multi-tenant setups
dbDatabase type (e.g., mongo)
Optional
chunk_sizeSize of text chunks for processing
smart_chunkingEnable intelligent chunking
max_chunk_sizeMaximum chunk size
get_imagesExtract images from documents
get_tablesExtract tables from documents
table_strategyStrategy for table extraction
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 300 seconds.
Request
# Example variables
library_name = "contract_library"
uploaded_files = ["contract1.pdf","contract2.pdf"]
print("\nStarting 'Add files to library'")
print(f"Library_name: {library_name}")
print(f"Uploaded_files: {uploaded_files}")
# This is the main add_files API
response = client.add_files(library_name=library_name, uploaded_files=uploaded_files)
print("\nAdd files to library response: ", response)
Response
{
"response": {
"files_processed": 2,
"chunks_created": 45,
"status": "completed"
}
}Additional Information
- • Category: library
- • Timeout: 300 seconds
- • Requires authentication
/library/query/Query library
Execute a text-based query against an existing library to find relevant documents and passages.
Request body
Required
library_nameName of the library to query
account_nameAccount identifier for multi-tenant setups
user_querySearch query text
Optional
result_countNumber of results to return
dbDatabase type
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
library_name = "contract_library"
account_name = "user123"
user_query = "termination clauses"
result_count = 10
print("\nStarting 'Query library'")
print(f"Library_name: {library_name}")
print(f"Account_name: {account_name}")
print(f"User_query: {user_query}")
print(f"Result_count: {result_count}")
# This is the main query API
response = client.query(library_name=library_name, account_name=account_name, user_query=user_query, result_count=result_count)
print("\nQuery library response: ", response)
Response
{
"response": [
{
"doc_id": 1,
"text": "Termination clause content...",
"score": 0.95
}
]
}Additional Information
- • Category: library
- • Timeout: 60 seconds
- • Requires authentication
/library/get_library_card/Get library info
Get comprehensive metadata information about a library including document count, embedding status, and configuration.
Request body
Required
library_nameName of the library to get information for
account_nameAccount identifier for multi-tenant setups
dbDatabase type (e.g., mongo)
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
library_name = "contract_library"
account_name = "user123"
db = "mongo"
print("\nStarting 'Get library info'")
print(f"Library_name: {library_name}")
print(f"Account_name: {account_name}")
print(f"Db: {db}")
# This is the main get_library_card API
response = client.get_library_card(library_name=library_name, account_name=account_name, db=db)
print("\nGet library info response: ", response)
Response
{
"response": {
"library_name": "contract_library",
"doc_count": 25,
"embedding_status": "installed",
"created_date": "2024-01-15"
}
}Additional Information
- • Category: library
- • Timeout: 10 seconds
- • Requires authentication
/library/install_embedding/Install embeddings
Installs vector embeddings across a library and creates the appropriate vectors in the vector database for semantic search.
Request body
Required
library_nameName of the library to install embeddings for
account_nameAccount identifier for multi-tenant setups
model_nameEmbedding model to use for vector generation
vector_dbVector database to use
dbDatabase type (e.g., mongo)
Optional
embedding_modelAlternative embedding model name
batch_sizeBatch size for processing
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 600 seconds.
Request
# Example variables
library_name = "contract_library"
account_name = "user123"
model_name = "all-mini-lm-l6-v2-ov"
vector_db = "milvus"
db = "mongo"
print("\nStarting 'Install embeddings'")
print(f"Library_name: {library_name}")
print(f"Account_name: {account_name}")
print(f"Model_name: {model_name}")
print(f"Vector_db: {vector_db}")
print(f"Db: {db}")
# This is the main install_embedding API
response = client.install_embedding(library_name=library_name, account_name=account_name, model_name=model_name, vector_db=vector_db, db=db)
print("\nInstall embeddings response: ", response)
Response
{
"response": {
"embeddings_created": 1250,
"vector_db": "milvus",
"status": "completed"
}
}Additional Information
- • Category: library
- • Timeout: 600 seconds
- • Requires authentication
/library/semantic_query/Semantic search
Executes a semantic/vector query against embeddings for more accurate content retrieval based on meaning rather than keywords.
Request body
Required
library_nameName of the library to search
account_nameAccount identifier for multi-tenant setups
user_querySemantic search query
embedding_modelEmbedding model for query encoding
Optional
vector_dbVector database type
dbDatabase type
result_countNumber of results to return
build_contextBuild context passages from results
width_beforeCharacters of context before match
width_afterCharacters of context after match
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
library_name = "contract_library"
user_query = "contract termination conditions"
account_name = "user123"
vector_db = "milvus"
db = "mongo"
embedding_model = "all-mini-lm-l6-v2-ov"
result_count = 5
print("\nStarting 'Semantic search'")
print(f"Library_name: {library_name}")
print(f"User_query: {user_query}")
print(f"Account_name: {account_name}")
print(f"Vector_db: {vector_db}")
print(f"Db: {db}")
print(f"Embedding_model: {embedding_model}")
print(f"Result_count: {result_count}")
# This is the main semantic_query API
response = client.semantic_query(library_name=library_name, user_query=user_query, account_name=account_name, vector_db=vector_db, db=db, embedding_model=embedding_model, result_count=result_count)
print("\nSemantic search response: ", response)
Response
{
"response": [
{
"doc_id": 1,
"similarity_score": 0.92,
"text": "Contract termination..."
}
]
}Additional Information
- • Category: library
- • Timeout: 60 seconds
- • Requires authentication
/library/get_document_list/List documents
Returns a comprehensive list of all documents contained in a specific library with metadata.
Request body
Required
library_nameName of the library to list documents from
account_nameAccount identifier for multi-tenant setups
dbDatabase type (e.g., mongo)
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 30 seconds.
Request
# Example variables
library_name = "contract_library"
account_name = "user123"
db = "mongo"
print("\nStarting 'List documents'")
print(f"Library_name: {library_name}")
print(f"Account_name: {account_name}")
print(f"Db: {db}")
# This is the main get_document_list API
response = client.get_document_list(library_name=library_name, account_name=account_name, db=db)
print("\nList documents response: ", response)
Response
{
"response": [
{
"doc_id": 1,
"filename": "contract1.pdf",
"pages": 12,
"upload_date": "2024-01-15"
},
{
"doc_id": 2,
"filename": "contract2.pdf",
"pages": 8,
"upload_date": "2024-01-16"
}
]
}Additional Information
- • Category: library
- • Timeout: 30 seconds
- • Requires authentication
/library/get_document_text/Extract document text
Returns the complete text extract of a selected document from a specified library for review or processing.
Request body
Required
library_nameName of the library containing the document
account_nameAccount identifier for multi-tenant setups
dbDatabase type (e.g., mongo)
Optional
doc_idDocument ID to extract text from
doc_fnDocument filename to extract text from
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
library_name = "contract_library"
account_name = "user123"
db = "mongo"
doc_id = "1"
print("\nStarting 'Extract document text'")
print(f"Library_name: {library_name}")
print(f"Account_name: {account_name}")
print(f"Db: {db}")
print(f"Doc_id: {doc_id}")
# This is the main get_document_text API
response = client.get_document_text(library_name=library_name, account_name=account_name, db=db, doc_id=doc_id)
print("\nExtract document text response: ", response)
Response
{
"response": {
"doc_id": 1,
"filename": "contract1.pdf",
"text": "Full document text content..."
}
}Additional Information
- • Category: library
- • Timeout: 60 seconds
- • Requires authentication
/library/add_files_async/Add files async
Non-blocking version of add files. Files are uploaded and queued for processing, allowing the client to continue working while parsing and indexing completes in the background.
Request body
Required
library_nameName of the library to add files to
uploaded_filesArray of files to upload and process
account_nameAccount identifier for multi-tenant setups
dbDatabase type (e.g., mongo)
Optional
trusted_keyTrusted authentication key
chunk_sizeSize of text chunks for processing
smart_chunkingEnable intelligent chunking
max_chunk_sizeMaximum chunk size
get_imagesExtract images from documents
get_tablesExtract tables from documents
table_strategyStrategy for table extraction
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 20 seconds.
Request
# Example variables
library_name = "contract_library"
uploaded_files = ["contract1.pdf","contract2.pdf"]
account_name = "user123"
db = "mongo"
print("\nStarting 'Add files async'")
print(f"Library_name: {library_name}")
print(f"Uploaded_files: {uploaded_files}")
print(f"Account_name: {account_name}")
print(f"Db: {db}")
# This is the main add_files_async API
response = client.add_files_async(library_name=library_name, uploaded_files=uploaded_files, account_name=account_name, db=db)
print("\nAdd files async response: ", response)
Response
{
"response": {
"status": "queued",
"message": "Files added for processing"
}
}Additional Information
- • Category: library
- • Timeout: 20 seconds
- • Requires authentication
/library/install_embedding_async/Install embeddings async
Non-blocking version of install embeddings. Starts the embedding process in the background and returns immediately, allowing the server to process large libraries without timing out.
Request body
Required
library_nameName of the library to install embeddings for
account_nameAccount identifier for multi-tenant setups
model_nameEmbedding model to use for vector generation
vector_dbVector database to use
dbDatabase type (e.g., mongo)
Optional
embedding_modelAlternative embedding model name
batch_sizeBatch size for processing
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
library_name = "contract_library"
account_name = "user123"
model_name = "all-mini-lm-l6-v2-ov"
vector_db = "milvus"
db = "mongo"
print("\nStarting 'Install embeddings async'")
print(f"Library_name: {library_name}")
print(f"Account_name: {account_name}")
print(f"Model_name: {model_name}")
print(f"Vector_db: {vector_db}")
print(f"Db: {db}")
# This is the main install_embedding_async API
response = client.install_embedding_async(library_name=library_name, account_name=account_name, model_name=model_name, vector_db=vector_db, db=db)
print("\nInstall embeddings async response: ", response)
Response
{
"response": {
"embedding_record": {},
"status": "started"
}
}Additional Information
- • Category: library
- • Timeout: 10 seconds
- • Requires authentication
Agent Execution
Execute automated multi-step processes and workflows using pre-configured intelligent agents.
/get_all_agents/List all agents
Returns a comprehensive list of all available agent processes on the server with their capabilities.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
print("\nStarting 'List all agents'")
# This is the main get_all_agents API
response = client.get_all_agents()
print("\nList all agents response: ", response)
Response
{
"response": [
{
"name": "contract_analyzer",
"description": "Contract analysis agent",
"version": "1.2.0"
},
{
"name": "invoice_processor",
"description": "Invoice processing agent",
"version": "1.0.1"
}
]
}Additional Information
- • Category: agent
- • Timeout: 10 seconds
- • Requires authentication
/get_agent_signature/Get agent signature
Retrieves detailed metadata about an agent including its required inputs (with names and types), outputs, description, number of steps, and updatable parameters. Essential first step before running an agent.
Request body
Required
process_nameName of the agent process to inspect
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 500 seconds.
Request
# Example variables
process_name = "contract_analyzer"
print("\nStarting 'Get agent signature'")
print(f"Process_name: {process_name}")
# This is the main get_agent_signature API
response = client.get_agent_signature(process_name=process_name)
print("\nGet agent signature response: ", response)
Response
{
"agent_signature": {
"name": "contract_analyzer",
"inputs": [
[
"User-Document",
"document",
""
]
],
"outputs": [
"analysis_report"
],
"description": "Analyzes contracts for key terms",
"steps": 4,
"updatable_parameters": [
"model_name",
"temperature"
]
}
}Additional Information
- • Category: agent
- • Timeout: 500 seconds
- • Requires authentication
/get_agent_description/Get agent description
Returns a user-friendly text description of the agent process, including step-by-step breakdown of what the agent does.
Request body
Required
process_nameName of the agent process to describe
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 5 seconds.
Request
# Example variables
process_name = "contract_analyzer"
print("\nStarting 'Get agent description'")
print(f"Process_name: {process_name}")
# This is the main get_agent_description API
response = client.get_agent_description(process_name=process_name)
print("\nGet agent description response: ", response)
Response
{
"agent_description": "This agent analyzes a contract document and extracts key terms including effective date, base salary, and termination provisions."
}Additional Information
- • Category: agent
- • Timeout: 5 seconds
- • Requires authentication
/run_agent/Execute agent
Executes a pre-configured agent process for automated multi-step document analysis and task completion. Returns an execution ID that can be used to retrieve outputs.
Request body
Required
process_nameName of the agent process to execute
Optional
trusted_keyTrusted authentication key
textText input for the agent
table_fileTable/spreadsheet file for processing
image_fileImage file for agent analysis
source_fileSource code file for processing
document_fileDocument file for agent processing
process_zipAgent process zip file to upload and execute
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 500 seconds.
Request
# Example variables
process_name = "contract_analyzer"
document_file = "contract.pdf"
print("\nStarting 'Execute agent'")
print(f"Process_name: {process_name}")
print(f"Document_file: {document_file}")
# This is the main run_agent API
response = client.run_agent(process_name=process_name, document_file=document_file)
print("\nExecute agent response: ", response)
Response
{
"agent_output": {
"agent_name": "contract_analyzer",
"status": "completed",
"execution_id": "d0f1ebb5-66ce-47e6-b1c0-f5767a88491e",
"execution_time": "45s"
}
}Additional Information
- • Category: agent
- • Timeout: 500 seconds
- • Requires authentication
/run_agent_generator/Execute agent with streaming
Executes an agent process and streams step-by-step updates in real time. Ideal for displaying progress in a UI as each step completes.
Request body
Required
agent_nameName of the agent process to execute
Optional
agent_inputsDictionary of input values for the agent
process_zip_pathPath to agent process zip file
trusted_keyTrusted authentication key
Returns
llm_responsePartial response text streamed incrementally as server-sent events
Timeout: This endpoint has a timeout of 500 seconds. The connection remains open for streaming responses.
Request
# Example variables
agent_name = "contract_analyzer"
agent_inputs = {"User-Document":"contract.pdf"}
print("\nStarting 'Execute agent with streaming'")
print(f"Agent_name: {agent_name}")
print(f"Agent_inputs: {agent_inputs}")
# This is the streaming run_agent_generator API
stream = client.run_agent_generator(agent_name=agent_name, agent_inputs=agent_inputs)
for chunk in stream:
print(chunk)
Response
// Streaming response format
data: {"llm_response": """"}Additional Information
- • Category: agent
- • Timeout: 500 seconds
- • Supports streaming responses
- • Requires authentication
/agent/{agent_name}/Call agent endpoint
Executes an agent through its dedicated endpoint path. Intended for production deployments where the agent has been pre-deployed as a named endpoint on the server. Supports both synchronous and asynchronous execution.
Request body
Required
agent_nameName of the deployed agent (in URL path)
agent_inputsDictionary of input values for the agent
Optional
run_asyncWhether to run asynchronously
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 500 seconds.
Request
# Example variables
agent_name = "contract_analyzer"
agent_inputs = {"User-Document":"contract.pdf"}
run_async = false
print("\nStarting 'Call agent endpoint'")
print(f"Agent_name: {agent_name}")
print(f"Agent_inputs: {agent_inputs}")
print(f"Run_async: {run_async}")
# This is the main call_agent API
response = client.call_agent(agent_name=agent_name, agent_inputs=agent_inputs, run_async=run_async)
print("\nCall agent endpoint response: ", response)
Response
{
"response": {
"execution_id": "d0f1ebb5-66ce-47e6-b1c0-f5767a88491e",
"status": "completed"
}
}Additional Information
- • Category: agent
- • Timeout: 500 seconds
- • Requires authentication
/agent_output/Get agent output
Retrieves the output from a completed agent run using its execution ID. Returns the general agent output response.
Request body
Required
idExecution ID of the agent run
Optional
agent_nameName of the agent
log_nameSpecific log name to retrieve
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 30 seconds.
Request
# Example variables
id = "d0f1ebb5-66ce-47e6-b1c0-f5767a88491e"
print("\nStarting 'Get agent output'")
print(f"Id: {id}")
# This is the main agent_output API
response = client.agent_output(id=id)
print("\nGet agent output response: ", response)
Response
{
"response": {
"status": "completed",
"output": "Agent analysis completed successfully"
}
}Additional Information
- • Category: agent
- • Timeout: 30 seconds
- • Requires authentication
/get_agent_output_json/Get agent output (JSON)
Retrieves the JSON output values from a completed agent run using its execution ID.
Request body
Required
idExecution ID of the agent run
Optional
agent_nameName of the agent
log_nameSpecific log name to retrieve
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 30 seconds.
Request
# Example variables
id = "d0f1ebb5-66ce-47e6-b1c0-f5767a88491e"
print("\nStarting 'Get agent output (JSON)'")
print(f"Id: {id}")
# This is the main get_agent_output_json API
response = client.get_agent_output_json(id=id)
print("\nGet agent output (JSON) response: ", response)
Response
{
"response": {
"effective_date": "2024-01-01",
"base_salary": "$150,000",
"termination_notice": "30 days"
}
}Additional Information
- • Category: agent
- • Timeout: 30 seconds
- • Requires authentication
/get_agent_output_files/Get agent output (files)
Downloads the file outputs from a completed agent run as a zip archive using its execution ID.
Request body
Required
idExecution ID of the agent run
Optional
agent_nameName of the agent
log_nameSpecific log name to retrieve
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 30 seconds.
Request
# Example variables
id = "d0f1ebb5-66ce-47e6-b1c0-f5767a88491e"
print("\nStarting 'Get agent output (files)'")
print(f"Id: {id}")
# This is the main get_agent_output_files API
response = client.get_agent_output_files(id=id)
print("\nGet agent output (files) response: ", response)
Response
{
"response": {
"status": "success",
"zip_fp": "/path/to/agent_output_d0f1ebb5.zip"
}
}Additional Information
- • Category: agent
- • Timeout: 30 seconds
- • Requires authentication
/get_agent_execution_log_list/Get agent execution logs
Returns a list of all execution records for a specific agent on the device, including status and timestamps.
Request body
Required
agent_nameName of the agent to get logs for
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 5 seconds.
Request
# Example variables
agent_name = "contract_analyzer"
print("\nStarting 'Get agent execution logs'")
print(f"Agent_name: {agent_name}")
# This is the main get_agent_execution_log_list API
response = client.get_agent_execution_log_list(agent_name=agent_name)
print("\nGet agent execution logs response: ", response)
Response
{
"agent_logs": [
{
"execution_id": "d0f1ebb5-66ce-47e6-b1c0-f5767a88491e",
"status": "completed",
"timestamp": "2024-01-15T10:30:00Z"
}
]
}Additional Information
- • Category: agent
- • Timeout: 5 seconds
- • Requires authentication
/install_agent/Install agent
Uploads a prepackaged agent process zip file to install it as a server endpoint.
Request body
Required
process_zipAgent process zip file to install
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
process_zip = "contract_analyzer.zip"
print("\nStarting 'Install agent'")
print(f"Process_zip: {process_zip}")
# This is the main install_agent API
response = client.install_agent(process_zip=process_zip)
print("\nInstall agent response: ", response)
Response
{
"agent_details": {
"process_name": "contract_analyzer",
"status": "installed"
}
}Additional Information
- • Category: agent
- • Timeout: 10 seconds
- • Requires authentication
/download_agent/Download agent
Downloads a prepackaged agent process from the server to the local device as a zip file.
Request body
Required
process_nameName of the agent process to download
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 15 seconds.
Request
# Example variables
process_name = "contract_analyzer"
print("\nStarting 'Download agent'")
print(f"Process_name: {process_name}")
# This is the main download_agent API
response = client.download_agent(process_name=process_name)
print("\nDownload agent response: ", response)
Response
{
"response": {
"status": "success",
"zip_fp": "/path/to/contract_analyzer.zip"
}
}Additional Information
- • Category: agent
- • Timeout: 15 seconds
- • Requires authentication
/get_all_scheduled_agents/Get all scheduled agents
Returns a list of all agents that have been scheduled for automated execution on the server.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 5 seconds.
Request
# Example variables
print("\nStarting 'Get all scheduled agents'")
# This is the main get_all_scheduled_agents API
response = client.get_all_scheduled_agents()
print("\nGet all scheduled agents response: ", response)
Response
{
"scheduled_agents": [
{
"agent_name": "daily_report",
"frequency": "daily",
"next_run": "2024-01-16T09:00:00Z"
}
]
}Additional Information
- • Category: agent
- • Timeout: 5 seconds
- • Requires authentication
/set_new_agent_schedule/Schedule agent
Schedules an agent to run automatically at a specified frequency and start time.
Request body
Required
agent_nameName of the agent to schedule
Optional
frequencyFrequency of execution - "one_time", "daily", "weekly", "monthly"
yearYear for scheduled start
monthMonth for scheduled start
dayDay for scheduled start
hourHour for scheduled start
minuteMinute for scheduled start
day_of_weekDay of week for weekly schedules
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 5 seconds.
Request
# Example variables
agent_name = "daily_report"
frequency = "daily"
hour = 9
minute = 0
print("\nStarting 'Schedule agent'")
print(f"Agent_name: {agent_name}")
print(f"Frequency: {frequency}")
print(f"Hour: {hour}")
print(f"Minute: {minute}")
# This is the main set_new_agent_schedule API
response = client.set_new_agent_schedule(agent_name=agent_name, frequency=frequency, hour=hour, minute=minute)
print("\nSchedule agent response: ", response)
Response
{
"new_schedule": {
"agent_name": "daily_report",
"frequency": "daily",
"status": "scheduled"
}
}Additional Information
- • Category: agent
- • Timeout: 5 seconds
- • Requires authentication
Utilities & Administration
Server management, health checks, and administrative functions for monitoring and control.
/ping/Health check
Quick health check to verify if the API server is responsive and operational.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 5 seconds.
Request
# Example variables
print("\nStarting 'Health check'")
# This is the main ping API
response = client.ping()
print("\nHealth check response: ", response)
Response
{
"response": {
"status": "ok",
"timestamp": "2024-01-15T10:30:00Z",
"version": "1.0.0"
}
}Additional Information
- • Category: server
- • Timeout: 5 seconds
- • Requires authentication
/server_stop/Stop server
Gracefully stops the API server. Use with caution as this will terminate all active connections.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
print("\nStarting 'Stop server'")
# This is the main server_stop API
response = client.server_stop()
print("\nStop server response: ", response)
Response
{
"response": {
"status": "stopping",
"message": "Server shutdown initiated"
}
}Additional Information
- • Category: server
- • Timeout: 10 seconds
- • Requires authentication
/library/get_api_catalog/API catalog
Returns a complete catalog of all available API endpoints with their specifications and parameters.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
print("\nStarting 'API catalog'")
# This is the main get_api_catalog API
response = client.get_api_catalog()
print("\nAPI catalog response: ", response)
Response
{
"response": [
{
"api_name": "inference",
"endpoint": "/inference/",
"method": "POST",
"timeout": 60
},
{
"api_name": "stream",
"endpoint": "/stream/",
"method": "POST",
"timeout": 60
}
]
}Additional Information
- • Category: server
- • Timeout: 10 seconds
- • Requires authentication
/get_db_info/Database info
Returns information about registered databases and vector databases available on the server.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
print("\nStarting 'Database info'")
# This is the main get_db_info API
response = client.get_db_info()
print("\nDatabase info response: ", response)
Response
{
"response": {
"databases": [
"mongo",
"sqlite"
],
"vector_databases": [
"milvus",
"faiss"
],
"default_db": "mongo",
"default_vector_db": "milvus"
}
}Additional Information
- • Category: server
- • Timeout: 10 seconds
- • Requires authentication
/app_register/App registration
Registers an application instance with the server to establish a connection for API access.
Request body
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 1 seconds.
Request
# Example variables
print("\nStarting 'App registration'")
# This is the main app_register API
response = client.app_register()
print("\nApp registration response: ", response)
Response
{
"status": "registered"
}Additional Information
- • Category: server
- • Timeout: 1 seconds
- • Requires authentication
/register_new_user/Register new user
Registers a new user on the server and returns credentials for API access.
Request body
Required
user_nameName of the new user
user_emailEmail address of the new user
user_tokenToken for user authentication
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 3 seconds.
Request
# Example variables
user_name = "jane_doe"
user_email = "jane@example.com"
user_token = "setup-token"
print("\nStarting 'Register new user'")
print(f"User_name: {user_name}")
print(f"User_email: {user_email}")
print(f"User_token: {user_token}")
# This is the main register_new_user API
response = client.register_new_user(user_name=user_name, user_email=user_email, user_token=user_token)
print("\nRegister new user response: ", response)
Response
{
"credentials": {
"api_key": "new-api-key",
"user_id": "user_12345"
}
}Additional Information
- • Category: server
- • Timeout: 3 seconds
- • Requires authentication
/get_transaction_log/Transaction log
Returns the server transaction log showing API usage history and timestamps.
Request body
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 5 seconds.
Request
# Example variables
print("\nStarting 'Transaction log'")
# This is the main get_transaction_log API
response = client.get_transaction_log()
print("\nTransaction log response: ", response)
Response
{
"logs": [
{
"timestamp": "2024-01-15T10:30:00Z",
"endpoint": "/inference/",
"user": "user_12345"
}
]
}Additional Information
- • Category: server
- • Timeout: 5 seconds
- • Requires authentication
/add_credential/Add credential
Adds a set of credentials (e.g., API keys for external services) to the server, passed as key-value pairs.
Request body
Required
credentialsDictionary of credential key-value pairs
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
credentials = {"tavily_api_key":"tvly-..."}
print("\nStarting 'Add credential'")
print(f"Credentials: {credentials}")
# This is the main add_credential API
response = client.add_credential(credentials=credentials)
print("\nAdd credential response: ", response)
Response
{
"response": {
"status": "added",
"credentials": [
"tavily_api_key"
]
}
}Additional Information
- • Category: server
- • Timeout: 10 seconds
- • Requires authentication
/delete_credential/Delete credential
Deletes a previously stored credential from the server by name.
Request body
Required
credential_nameName of the credential to delete
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
credential_name = "tavily_api_key"
print("\nStarting 'Delete credential'")
print(f"Credential_name: {credential_name}")
# This is the main delete_credential API
response = client.delete_credential(credential_name=credential_name)
print("\nDelete credential response: ", response)
Response
{
"response": {
"status": "deleted"
}
}Additional Information
- • Category: server
- • Timeout: 10 seconds
- • Requires authentication
Services & Integrations
Connect the server to external services and run web searches through supported providers.
/install_service/Install service
Installs a new custom service on the server based on a JSON service definition.
Request body
Required
service_nameName for the new service
service_dfnJSON service definition
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
service_name = "custom_analyzer"
service_dfn = "{...}"
print("\nStarting 'Install service'")
print(f"Service_name: {service_name}")
print(f"Service_dfn: {service_dfn}")
# This is the main install_service API
response = client.install_service(service_name=service_name, service_dfn=service_dfn)
print("\nInstall service response: ", response)
Response
{
"response": {
"service_name": "custom_analyzer",
"status": "installed"
}
}Additional Information
- • Category: services
- • Timeout: 60 seconds
- • Requires authentication
/list_services/List services
Returns a list of all installed custom services on the server.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
print("\nStarting 'List services'")
# This is the main list_services API
response = client.list_services()
print("\nList services response: ", response)
Response
{
"response": [
{
"service_name": "custom_analyzer",
"status": "active"
}
]
}Additional Information
- • Category: services
- • Timeout: 60 seconds
- • Requires authentication
/test_service/Test service
Tests an installed custom service to verify it is working correctly.
Request body
Required
service_nameName of the service to test
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
service_name = "custom_analyzer"
print("\nStarting 'Test service'")
print(f"Service_name: {service_name}")
# This is the main test_service API
response = client.test_service(service_name=service_name)
print("\nTest service response: ", response)
Response
{
"response": {
"service_name": "custom_analyzer",
"status": "operational"
}
}Additional Information
- • Category: services
- • Timeout: 60 seconds
- • Requires authentication
/list_integrations/List integrations
Returns a list of all available integration connections configured on the server.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
print("\nStarting 'List integrations'")
# This is the main list_integrations API
response = client.list_integrations()
print("\nList integrations response: ", response)
Response
{
"response": [
{
"name": "tavily",
"type": "web_search",
"status": "configured"
}
]
}Additional Information
- • Category: services
- • Timeout: 60 seconds
- • Requires authentication
/get_integration_info/Get integration info
Returns detailed information about a specific integration, including configuration status and capabilities.
Request body
Required
integration_nameName of the integration to inspect
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
integration_name = "tavily"
print("\nStarting 'Get integration info'")
print(f"Integration_name: {integration_name}")
# This is the main get_integration_info API
response = client.get_integration_info(integration_name=integration_name)
print("\nGet integration info response: ", response)
Response
{
"response": {
"name": "tavily",
"type": "web_search",
"status": "configured",
"capabilities": [
"web_search"
]
}
}Additional Information
- • Category: services
- • Timeout: 60 seconds
- • Requires authentication
/web_search/Web search
Executes a web search using a configured search provider. Supports tavily, serp_api, news_api_org, and wikipedia.
Request body
Required
querySearch query text
engineSearch engine provider (tavily, serp_api, news_api_org, wikipedia)
Optional
result_countNumber of results to return
api_tokenAPI token for the search provider
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 30 seconds.
Request
# Example variables
query = "What is quantum gravity?"
engine = "tavily"
result_count = 5
print("\nStarting 'Web search'")
print(f"Query: {query}")
print(f"Engine: {engine}")
print(f"Result_count: {result_count}")
# This is the main web_search API
response = client.web_search(query=query, engine=engine, result_count=result_count)
print("\nWeb search response: ", response)
Response
{
"response": [
{
"title": "Quantum Gravity Explained",
"url": "https://example.com/quantum-gravity",
"snippet": "Quantum gravity is..."
}
]
}Additional Information
- • Category: services
- • Timeout: 30 seconds
- • Requires authentication
HQ Apps
App session management, chat interaction, and app-specific agent execution endpoints.
/start_app_session/Start app session
Initiates a new app session by creating a unique session ID and instantiating the app chat state on the server.
Request body
Required
app_nameName of the app to start a session for
Optional
preload_modelsWhether to preload models for the session
model_nameSpecific model to use
apply_instructionsApply custom instructions
apply_memoryEnable session memory
preload_sourcePreload source documents
file_listFiles to preload into the session
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
app_name = "contract_review"
print("\nStarting 'Start app session'")
print(f"App_name: {app_name}")
# This is the main start_app_session API
response = client.start_app_session(app_name=app_name)
print("\nStart app session response: ", response)
Response
{
"session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "started"
}Additional Information
- • Category: hq
- • Timeout: 60 seconds
- • Requires authentication
/chat/Chat
Main interaction API for communicating with an app using a session ID. Supports streaming responses for real-time chat.
Request body
Required
session_idSession ID from start app session
user_msgThe user message or prompt
Optional
app_nameName of the app
Returns
llm_responsePartial response text streamed incrementally as server-sent events
Timeout: This endpoint has a timeout of 600 seconds. The connection remains open for streaming responses.
Request
# Example variables
session_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
user_msg = "What is the annual rate of the base salary?"
print("\nStarting 'Chat'")
print(f"Session_id: {session_id}")
print(f"User_msg: {user_msg}")
# This is the streaming chat API
stream = client.chat(session_id=session_id, user_msg=user_msg)
for chunk in stream:
print(chunk)
Response
// Streaming response format
data: {"llm_response": "{"text":"The annual base salary is $150,000...","sources":[""}
data: {"llm_response": "contract.pdf"]}"}Additional Information
- • Category: hq
- • Timeout: 600 seconds
- • Supports streaming responses
- • Requires authentication
/run_app_agent/Run app agent
Executes an agent process inside an app session with streaming step-by-step output. Ideal for displaying real-time progress in the UI.
Request body
Required
session_idSession ID from start app session
agent_nameName of the agent to run
Optional
inputsDictionary of input values for the agent
updatesParameter updates for the agent
Returns
llm_responsePartial response text streamed incrementally as server-sent events
Timeout: This endpoint has a timeout of 1200 seconds. The connection remains open for streaming responses.
Request
# Example variables
session_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
agent_name = "contract_analyzer"
inputs = {"User-Document":"contract.pdf"}
print("\nStarting 'Run app agent'")
print(f"Session_id: {session_id}")
print(f"Agent_name: {agent_name}")
print(f"Inputs: {inputs}")
# This is the streaming run_app_agent API
stream = client.run_app_agent(session_id=session_id, agent_name=agent_name, inputs=inputs)
for chunk in stream:
print(chunk)
Response
// Streaming response format
data: {"llm_response": """"}Additional Information
- • Category: hq
- • Timeout: 1200 seconds
- • Supports streaming responses
- • Requires authentication
/get_app_transcript/Get app transcript
Generates a transcript of the chat history for an app session in the requested output format.
Request body
Required
session_idSession ID to generate transcript for
Optional
output_formatOutput format - docx, pptx, xlsx, csv, json, txt
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 15 seconds.
Request
# Example variables
session_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
output_format = "docx"
print("\nStarting 'Get app transcript'")
print(f"Session_id: {session_id}")
print(f"Output_format: {output_format}")
# This is the main get_app_transcript API
response = client.get_app_transcript(session_id=session_id, output_format=output_format)
print("\nGet app transcript response: ", response)
Response
{
"response": {
"status": "success",
"zip_fp": "/path/to/transcript.zip"
}
}Additional Information
- • Category: hq
- • Timeout: 15 seconds
- • Requires authentication
/get_app_state/Get app state
Returns the current state parameters of a selected app session, including loaded resources and configuration.
Request body
Required
session_idSession ID to query
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 6 seconds.
Request
# Example variables
session_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
print("\nStarting 'Get app state'")
print(f"Session_id: {session_id}")
# This is the main get_app_state API
response = client.get_app_state(session_id=session_id)
print("\nGet app state response: ", response)
Response
{
"response": {
"status": "active",
"resources": [
"document1.pdf"
],
"chat_history_length": 5
}
}Additional Information
- • Category: hq
- • Timeout: 6 seconds
- • Requires authentication
/update_app_state/Update app state
Updates selected configuration parameters of an active app session.
Request body
Required
session_idSession ID to update
updatesKey-value pairs of parameters to update
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 60 seconds.
Request
# Example variables
session_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
updates = {"model_name":"llama-3.2-3b-instruct-ov"}
print("\nStarting 'Update app state'")
print(f"Session_id: {session_id}")
print(f"Updates: {updates}")
# This is the main update_app_state API
response = client.update_app_state(session_id=session_id, updates=updates)
print("\nUpdate app state response: ", response)
Response
{
"response": {
"status": "updated",
"session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Additional Information
- • Category: hq
- • Timeout: 60 seconds
- • Requires authentication
/stop_app_session/Stop app session
Ends an active app session by removing the chat state from the server.
Request body
Required
session_idSession ID to stop
Optional
app_nameName of the app
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
session_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
print("\nStarting 'Stop app session'")
print(f"Session_id: {session_id}")
# This is the main stop_app_session API
response = client.stop_app_session(session_id=session_id)
print("\nStop app session response: ", response)
Response
{
"response": {
"status": "stopped"
}
}Additional Information
- • Category: hq
- • Timeout: 10 seconds
- • Requires authentication
/get_all_apps/List all apps
Returns a list of all available apps on the server.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 5 seconds.
Request
# Example variables
print("\nStarting 'List all apps'")
# This is the main get_all_apps API
response = client.get_all_apps()
print("\nList all apps response: ", response)
Response
{
"app_list": [
{
"app_name": "contract_review",
"version": "1.0.0"
}
]
}Additional Information
- • Category: hq
- • Timeout: 5 seconds
- • Requires authentication
/lookup_app/Lookup app
Returns detailed metadata about a specific app, including its resources and configuration.
Request body
Required
app_nameName of the app to look up
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 3 seconds.
Request
# Example variables
app_name = "contract_review"
print("\nStarting 'Lookup app'")
print(f"App_name: {app_name}")
# This is the main lookup_app API
response = client.lookup_app(app_name=app_name)
print("\nLookup app response: ", response)
Response
{
"app_details": {
"app_name": "contract_review",
"version": "1.0.0",
"agents": [
"contract_analyzer"
],
"models": [
"llama-3.2-3b-instruct-ov"
]
}
}Additional Information
- • Category: hq
- • Timeout: 3 seconds
- • Requires authentication
/get_active_app_sessions/Get active app sessions
Returns a list of all currently active app sessions on the server.
Request body
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 6 seconds.
Request
# Example variables
print("\nStarting 'Get active app sessions'")
# This is the main get_active_app_sessions API
response = client.get_active_app_sessions()
print("\nGet active app sessions response: ", response)
Response
{
"response": [
{
"session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"app_name": "contract_review",
"status": "active"
}
]
}Additional Information
- • Category: hq
- • Timeout: 6 seconds
- • Requires authentication
/download_app/Download app
Downloads an app package from the server as a zip file for local deployment or backup.
Request body
Required
app_nameName of the app to download
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 15 seconds.
Request
# Example variables
app_name = "contract_review"
print("\nStarting 'Download app'")
print(f"App_name: {app_name}")
# This is the main download_app API
response = client.download_app(app_name=app_name)
print("\nDownload app response: ", response)
Response
{
"response": {
"status": "success",
"zip_fp": "/path/to/contract_review.zip"
}
}Additional Information
- • Category: hq
- • Timeout: 15 seconds
- • Requires authentication
/install_app/Install app
Uploads and installs an app package from a zip file onto the server.
Request body
Required
app_zipApp package zip file to install
Optional
trusted_keyTrusted authentication key
Returns
llm_responseComplete generated response from the model
Timeout: This endpoint has a timeout of 10 seconds.
Request
# Example variables
app_zip = "contract_review.zip"
print("\nStarting 'Install app'")
print(f"App_zip: {app_zip}")
# This is the main install_app API
response = client.install_app(app_zip=app_zip)
print("\nInstall app response: ", response)
Response
{
"app_details": {
"app_name": "contract_review",
"status": "installed"
}
}Additional Information
- • Category: hq
- • Timeout: 10 seconds
- • Requires authentication
