chat_completions
OpenAI-compatible chat completions, flat $0.002 a call: the same request and response as OpenAI's /v1/chat/completions (messages, model, max_tokens, temperature, response_format json_object, stream), so an OpenAI SDK works by changing the base URL. Models: llama-4-scout (default), gpt-oss-20b, qwen3-30b, glm-4.7-flash. Up to 10,000 characters in, 1,024 tokens out. Costs $0.002 USDC on Base via x402.
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": {
"messages": "<messages>"
},
"name": "chat_completions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model (default llama-4-scout; other names run on the default) | |
| stream | No | true answers as Server-Sent Events chunks | |
| messages | Yes | OpenAI-style messages | |
| max_tokens | No | Most tokens to generate (above 1,024 is capped) | |
| temperature | No |