chat
Chat with a text LLM and get reply text, token usage and credit cost. Supports strict JSON Schema output and an idempotency key for safe transport retries. Pass either a single prompt or a full messages array. Charged in credits from the connected account.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "chat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | LLM model slug. Omit to use the default model. Pass a flagship reasoning model for hard tasks or a fast cheap model for simple ones. | |
| prompt | No | Single user message. Use this OR messages (messages wins if both are set). | |
| messages | No | Full conversation as [{role, content}] with role one of system/user/assistant. Content is plain text. | |
| max_tokens | No | Cap the reply length in tokens. | |
| temperature | No | Sampling temperature (0 = deterministic). | |
| idempotency_key | No | Stable key for safely retrying the same chat request without a duplicate model call or charge. Reusing it with different input returns a conflict. | |
| response_format | No | Optional structured-output contract. json_schema responses are validated by Clipia before success and billing. |