Call a text model
chat_completionSend a conversation to any text model available through CCAPI (Claude, GPT, Gemini, DeepSeek, GLM, MiniMax, Kimi, Qwen…) and get the reply. Useful for consulting a second model for a different perspective, running a cheap model over bulk work, or reaching a model the current client does not have configured. Responses are non-streaming.
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>",
"messages": "<messages>"
},
"name": "chat_completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stop | No | Up to 4 sequences that stop generation. | |
| model | Yes | Exact model name, e.g. claude-sonnet-5 or deepseek-v4-pro. Call list_models with category 'text' if unsure. | |
| top_p | No | Nucleus sampling probability mass, 0-1. Omit for the model default. | |
| messages | Yes | Conversation so far, oldest first. Must contain at least one message. | |
| max_tokens | No | Maximum tokens to generate. Omit for the model default. | |
| temperature | No | Sampling temperature, typically 0-2. Omit for the model default. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model that actually served the request. | |
| usage | Yes | Token accounting for this call. | |
| content | Yes | The model's reply text. | |
| finish_reason | No | Why generation stopped, e.g. stop or length. |