fim_completions
Code fill-in-the-middle (Mistral FIM-compatible) — Drop-in for Mistral's Codestral FIM endpoint (POST /v1/fim/completions): send {model, prompt, suffix?, max_tokens?, temperature?, stop?} where prompt is the code before the cursor and suffix the code after; returns the missing middle as choices[0].message.content in the chat.completion shape with usage. Fences and repeated prefix/suffix are stripped. Served by Llama 3.3 70B, non-streaming; pay per call with x402, no API key. Price: $0.008 USDC (Base, via 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": {
"model": "<model>",
"prompt": "<prompt>"
},
"name": "fim_completions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | codestral-latest | |
| prompt | Yes | def is_palindrome(s: str) -> bool: |