create_payment
Create a Lightning invoice to pay for one AI service call. Returns JSON: { paymentId, invoice (BOLT11), amount (sats), expiresAt }. Each payment covers exactly one tool call — call this once per operation. Typical flow: list_models → create_payment → check_payment_status → call tool. The invoice expires in 10 minutes. Call list_models first to discover modelId values. modelId is optional — omit it to use the default (best) model. Some tools require extra params at payment time because pricing depends on them: generate_text requires prompt (price = f(char count)); text_to_speech requires text (price = f(char count) by tier); transcribe_audio / transcribe_translate take durationMinutes (10 sats/min — declare your audio length, default 1); send_sms, place_call, ai_call require phoneNumber; generate_video and animate_image require duration, and take an optional resolution (250-400 sats/sec by resolution — quote with the SAME duration and resolution you will execute with); edit_image requires resolution (1K=200, 2K=300, 4K=450 sats); epub_to_audiobook requires characterCount (total text characters in the book — price is per-character by voice tier, minimum 500 sats). If required params are missing, the response includes an error with the missing field names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ocr | No | For receive_fax: include the OCR text-extraction add-on (+200 sats). Must be set HERE at payment time — receive_fax refuses ocr=true at execution unless the charge covered it. | |
| mode | No | Legacy alias for generate_video: 'standard'→768p, 'pro'→2K. Prefer 'resolution'. | |
| text | No | Required for text_to_speech: the exact text to synthesize (price is per-character by tier, locked to payment) | |
| prompt | No | Required for generate_text: the exact prompt (price calculated from char count, locked to payment) | |
| message | No | Required for send_sms: message text (max 1544 chars; billed per SMS segment, so longer or accented messages cost more) | |
| modelId | No | Optional. AI model ID from list_models. Omit for default (best) model. | |
| duration | No | Required for generate_video / animate_image: duration in seconds (5-15) | |
| quantity | No | Units to pay for when the price scales: passes for boardingpass_wallet, pages for extract_document / extract_receipt / send_fax. Default 1 — under-counting is rejected at execution with the exact price to re-pay. | |
| toolName | Yes | Tool name to pay for (e.g., 'generate_text', 'generate_image', 'generate_video', 'send_sms', 'place_call') | |
| resolution | No | 768p (default) or 2K for generate_video / animate_image — priced by resolution × duration, native audio free; 2K is upscaled from a 768p render. 480p/720p/1080p are retired Seedance rungs, still accepted (480p/720p→768p, 1080p→2K). For edit_image: 1K=200, 2K=300, 4K=450 sats. | |
| fileContext | No | For generate_text: include extracted file text if attaching a file (affects price) | |
| phoneNumber | No | Required for send_sms and place_call: phone in E.164 format (e.g., +14155550100) | |
| systemPrompt | No | For generate_text: include if using a custom system prompt (affects price) | |
| characterCount | No | Required for epub_to_audiobook: total text characters in the book (price is per-character by voice tier, minimum 500 sats). Send the count, not the book — the file goes to epub_to_audiobook itself. Execution re-derives the price from the real file and rejects a short-pay with the exact amount to re-pay. | |
| generate_audio | No | Accepted and IGNORED — H3 audio is native and always on, at no extra cost. There is no way to request a silent render. | |
| durationMinutes | No | Minutes of audio/call. Required for place_call with audioUrl (1-30); for transcribe_audio / transcribe_translate it sets the per-minute price (10 sats/min) — declare your audio length (default 1). Audio longer than paid is rejected + refunded at execution. |