chat_with_model
Send messages to any OpenRouter model with customizable parameters. Control response length, randomness, and system instructions for precise AI output.
Instructions
Send a message to a specific OpenRouter model
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>",
"message": "<message>"
},
"name": "chat_with_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | OpenRouter model ID (e.g., 'openai/gpt-4') | |
| message | Yes | Message to send to the model | |
| max_tokens | No | Maximum tokens in response | |
| temperature | No | Temperature for response randomness | |
| system_prompt | No | System prompt for the conversation |