BUILD WITH INFERMAX
Tool calling
Declare tools and validate model-proposed calls in your application.
Your client executes tools
Chat Completions accepts tools and tool_choice. Support depends on the entitled model’s qualified capabilities. Infermax returns proposed calls; your application validates arguments, checks permissions, and executes approved functions.
JSON · request example
{
"model": "<entitled-model-id>",
"messages": [
{
"role": "user",
"content": "What is the weather in London?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string"
}
},
"required": [
"city"
],
"additionalProperties": false
}
}
}
],
"tool_choice": "auto",
"max_completion_tokens": 128
}Return each tool result using role tool and the corresponding tool_call_id. Preserve the assistant tool-call message in the conversation. Bound tool loops and require approval for consequential actions. Read the full wire schema →