ai_chat
LLM chat completion, flat $0.003 a call: send a prompt (plus optional system) or an OpenAI-style messages array and get the reply text with token usage. Models: gpt-oss-20b (default), qwen3-30b, glm-4.7-flash, llama-4-scout. Up to 16,000 characters in and 1,024 tokens out; json=true for JSON output. Costs $0.003 USDC on Base via x402.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | true asks for a single JSON object | |
| model | No | Model (default gpt-oss-20b) | |
| prompt | No | The user message (or send an OpenAI-style messages array instead) | |
| system | No | Optional system instructions | |
| max_tokens | No | Most tokens to generate, up to 1024 | |
| temperature | No | 0 to 2 (default 0.6) |