generate_text
Generate text using frontier AI language models. Pure per-character pricing (no minimum): Kimi K3 (best, ~10 chars/sat, 1M context, vision support, default), GPT-OSS-120B (standard, ~1000 chars/sat, 119 languages, best value). Rates are BTC-pegged and re-quoted hourly, so treat them as approximate — the 402 challenge is the authoritative price. Supports document Q&A via fileContext and vision analysis via imageBase64 (best model). Stable endpoints — models upgrade automatically. Pay per request with Bitcoin Lightning — no API key or signup needed. Requires create_payment with toolName='generate_text' and the exact prompt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The text prompt or question | |
| modelId | No | Optional. Omit for default (best) model. | |
| fileName | No | Name of the attached file | |
| maxTokens | No | Max tokens in response | |
| paymentId | Yes | Valid payment ID (must be paid) | |
| fileContext | No | Extracted file text to include as context | |
| imageBase64 | No | Base64 data URI for vision analysis (best model only) | |
| systemPrompt | No | Optional system prompt |