Chat completions API, pay per call
Send a prompt and get an answer from Meta's Llama 4 Scout for $0.002 a call, or from Llama 3.3 70B or gpt-oss-120b for $0.01, with an optional system prompt and up to 1,024 output tokens; no provider account.
When an agent wants this
- A cheap model for summaries, classification and drafts inside an agent
- An OpenAI-compatible endpoint (/v1/chat/completions) with function calling and JSON mode
- A larger model by name when the small one is not enough
Chat completions (LLM): Llama 4 Scout $0.002
Send 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.
Inputs: prompt (required): User prompt, up to 8,000 characters; system: Optional system prompt, up to 2,000 characters; maxTokens: Maximum output tokens, 1-1024 (default 400); temperature: 0-1.5 (default 0.6); messages: 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; tools: Optional OpenAI tools array as JSON (function calling, up to 32 functions); the answer then carries tool_calls; tool_choice: Optional: auto, none, required, or a JSON object naming one function; response_format: Optional OpenAI response_format as JSON: {"type":"json_object"} or a json_schema.
Free first (25 successful calls per caller, no key):
curl "https://tools.funwords.eu/ai/chat?prompt=Explain%20x402%20in%20one%20sentence.&trial=1"
With a card key from /credits, in a header or, when your client can only fetch a URL, in the URL:
curl -H "Authorization: Bearer adt_…" "https://tools.funwords.eu/ai/chat?prompt=Explain%20x402%20in%20one%20sentence."
curl "https://tools.funwords.eu/ai/chat?prompt=Explain%20x402%20in%20one%20sentence.&api_key=adt_…"
Without a key the same URL answers 402 Payment Required with x402 and MPP terms, so a wallet client pays USDC per call and retries. Over MCP (https://tools.funwords.eu/mcp) this tool is ai_chat.
Example result
{
"model": "@cf/meta/llama-4-scout-17b-16e-instruct",
"response": "x402 lets software pay for an HTTP request with a stablecoin by answering a 402 Payment Required challenge.",
"tool_calls": [],
"finish_reason": "stop",
"usage": {
"prompt_tokens": 24,
"completion_tokens": 22,
"total_tokens": 46
}
}LLM inference, large model: Llama 3.3 70B or gpt-oss-120b $0.01
Send a prompt, get an answer from a larger open model: Llama 3.3 70B Instruct (default) or OpenAI gpt-oss-120b, with an optional system prompt, up to 1,024 output tokens and adjustable temperature. Same call as /ai/chat with a stronger model. Use when the 8B model is not enough: reasoning, drafting and Q&A.
Inputs: prompt (required): User prompt, up to 8,000 characters; model: llama-3.3-70b (default) or gpt-oss-120b; system: Optional system prompt, up to 2,000 characters; maxTokens: Maximum output tokens, 1-1024 (default 400); temperature: 0-1.5 (default 0.6).
Not in the free calls (it costs capacity per call); pay from the first call.
With a card key from /credits, in a header or, when your client can only fetch a URL, in the URL:
curl -H "Authorization: Bearer adt_…" "https://tools.funwords.eu/ai/chat-large?prompt=Explain%20x402%20in%20one%20sentence."
curl "https://tools.funwords.eu/ai/chat-large?prompt=Explain%20x402%20in%20one%20sentence.&api_key=adt_…"
Without a key the same URL answers 402 Payment Required with x402 and MPP terms, so a wallet client pays USDC per call and retries. Over MCP (https://tools.funwords.eu/mcp) this tool is ai_chat_large.
Example result
{
"model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"response": "x402 lets software pay for an HTTP request with a stablecoin by answering a 402 Payment Required challenge."
}Questions
Is there an OpenAI-compatible endpoint?
Yes: POST /v1/chat/completions, /v1/responses and /v1/embeddings take the same payment methods; a card key works as the SDK apiKey.
Which models?
Llama 4 Scout on /ai/chat; Llama 3.3 70B or gpt-oss-120b on /ai/chat-large; other open models by name under /ai/model/.
How do I pay?
Each successful call costs the tool's price; failed calls are not charged. The first 25 calls are free. Then pay with card credits from $1 (the key goes in an Authorization header or as api_key= in the URL) or per call in USDC over x402 or MPP. No account is needed.