llama4 chat completions
llama4_chat_completionsOpenAI-compatible chat completions on Meta Llama 4 Scout, multimodal (image input) with tool calling. Set your OpenAI SDK base URL to https://agentrxi.com/v1/llama4 and pay per token with x402 instead of an API key: $0.81 per million input and $2.55 per million output tokens, minimum $0.002 a call, at most $0.0145. The 402 quotes your request's maximum; "upto" payers are charged only the tokens used. Same request/response shape as OpenAI (tool calling, image input, streaming supported), up to 2048 output tokens. Costs $0.0145 USDC per call (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": "llama4_chat_completions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Ignored; always llama-4-scout-17b | |
| tools | No | OpenAI function tools | |
| stream | No | ||
| messages | Yes | ||
| max_tokens | No | ||
| temperature | No |