LLM chat completions: Llama 4 Scout
ai_chatSend a prompt, get an answer from Meta's Llama 4 Scout (17B active, 16 experts), with an optional system prompt, up to 1,024 output tokens and adjustable temperature. Fast and cheap. Use for drafting, reasoning steps, Q&A and any quick LLM call without an AI provider account; other open models by name at /v1/chat/completions, harder reasoning at ai_chat_large. Example: prompt=Explain x402 in one sentence.. Price $0.002/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tools | No | Optional OpenAI tools array as JSON (function calling, up to 32 functions); the answer then carries tool_calls | |
| prompt | Yes | User prompt, up to 8,000 characters | |
| system | No | Optional system prompt, up to 2,000 characters | |
| messages | No | Optional OpenAI messages array as JSON (system, user, assistant with tool_calls, tool); replaces prompt and system. Together with tools, at most 20,000 characters | |
| maxTokens | No | Maximum output tokens, 1-1024 (default 400) | |
| temperature | No | 0-1.5 (default 0.6) | |
| tool_choice | No | Optional: auto, none, required, or a JSON object naming one function | |
| response_format | No | Optional OpenAI response_format as JSON: {"type":"json_object"} or a json_schema |