warungcyber_chat_completion
Send chat prompts to selected WarungCyber AI models through an HTTP API, using an API key and token balance to return generated text and usage metrics.
Instructions
Send a chat completion prompt to a selected WarungCyber AI model via external HTTP API call. Consumes account token balance based on prompt and completion length. Requires an active WarungCyber API key (sk-wc-...). Returns generated text and token usage metrics.
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>",
"prompt": "<prompt>"
},
"name": "warungcyber_chat_completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Target AI model identifier to execute | |
| apiKey | No | WarungCyber API key (starts with sk-wc-). Uses WARUNGCYBER_API_KEY environment variable if omitted. | |
| prompt | Yes | The user prompt, task instruction, or code snippet to complete | |
| maxTokens | No | Maximum completion tokens to generate (default: 2048) | |
| temperature | No | Sampling temperature between 0.0 and 2.0 (default: 0.7) | |
| systemPrompt | No | Optional system instruction or persona definition |