API Features · Python
Function Calling
Use XALEN function calling to let AI models interact with your application logic. Build agents that can call your APIs.
1. Install
pip install xalen
2. Code
tools = [{
#A6E3A1;">"type": "function",
#A6E3A1;">"function": {
#A6E3A1;">"name": "get_kundali",
#A6E3A1;">"description": "Generate a birth chart",
#A6E3A1;">"parameters": {
#A6E3A1;">"type": "object",
#A6E3A1;">"properties": {
#A6E3A1;">"date": {"type": "string"},
#A6E3A1;">"time": {"type": "string"},
#A6E3A1;">"place": {"type": "string"}
},
#A6E3A1;">"required": ["date", "time", "place"]
}
}
}]
response = client.chat.completions.create(
model=#A6E3A1;">"vedika-standard",
messages=[{#A6E3A1;">"role": "user", "content": "Generate my kundali for 1990-03-15 14:30 Mumbai"}],
tools=tools,
tool_choice=#A6E3A1;">"auto"
)
Related Tutorials
Streaming Responses API Features · Python
JSON Mode API Features · Python
Batch Processing (50% Off) API Features · Python
Build RAG with Embeddings API Features · Python
Python Quickstart Getting Started · Python
JavaScript Quickstart Getting Started · JavaScript
200+ AI models. One API. Start building in 5 minutes.
Get API KeyLast updated: 2026-05-21