chat_completion
Call LMX Cloud OpenAI-compatible chat completions. Prefers a pre-funded API key (Bearer / api_key); when omitted and x402 is enabled, requires a USDC pay-per-call payment. Optional image_url / images enable vision input (OpenAI content-parts format) — use a vision model such as llama-3.2-90b-vision, qwen-3.6-35b, or qwen-3.5-35b.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model name or alias. Uses default if omitted. | |
| images | No | Optional additional images (https URLs or data:image/...;base64,... URIs). Requires a vision-capable model. | |
| prompt | Yes | User prompt to send to the selected model. | |
| api_key | No | Optional LMX API key (lmx_...). Prefer MCP client Authorization header or env; use this to override per call. | |
| image_url | No | Optional image as an https URL or data:image/...;base64,... URI. Requires a vision-capable model. | |
| max_tokens | No | Optional max completion tokens. | |
| temperature | No | Optional sampling temperature. |