Skip to main content
Glama

Sats4AI - Bitcoin-Powered AI Tools

create_payment

Create a Lightning invoice to pay for one AI service call. Returns JSON: { paymentId, lightningInvoice (BOLT11), amountSats, 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)); translate_text requires prompt (the text to translate) and takes targetLanguage (it picks the engine and so the price; leave modelId out: a chat model named by modelId, such as Best, costs at least its per-request minimum); 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 is a flat 200 sats per edit (resolution is optional and does not change the price); 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.

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": {
      "toolName": "<toolName>"
    },
    "name": "create_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
ocrNoFor 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.
modeNoLegacy alias for generate_video: 'standard'→768p, 'pro'→2K. Prefer 'resolution'.
textNoRequired for text_to_speech: the exact text to synthesize (price is per-character by tier, locked to payment)
promptNoRequired for generate_text: the exact prompt (price calculated from char count, locked to payment)
messageNoRequired for send_sms: message text (max 1544 chars; billed per SMS segment, so longer or accented messages cost more)
modelIdNoOptional. AI model ID from list_models. Omit for default (best) model.
durationNoRequired for generate_video / animate_image: duration in seconds (5-15)
quantityNoUnits 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.
toolNameYesTool name to pay for (e.g., 'generate_text', 'generate_image', 'generate_video', 'send_sms', 'place_call')
cashuTokenNoOptional. Pay with Cashu ecash instead of Lightning: a cashuB token from an accepted mint that pays exactly this call's price after the mint's fee (in most wallets: send the price with the receiver's fee included). With it, the reply has no invoice and the paymentId is already paid. A wrong amount or mint is refused before anything is spent, and the error names the price.
resolutionNo768p (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: a flat 200 sats per edit, so resolution does not change the price.
fileContextNoFor generate_text: include extracted file text if attaching a file (affects price)
phoneNumberNoRequired for send_sms and place_call: phone in E.164 format (e.g., +14155550100)
systemPromptNoFor generate_text: include if using a custom system prompt (affects price)
characterCountNoRequired 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_audioNoAccepted and IGNORED — H3 audio is native and always on, at no extra cost. There is no way to request a silent render.
targetLanguageNoFor translate_text, transcribe_translate and translate_epub: the target language, the same value you will send to the tool. It picks the translation engine and so the price. Without it a translate_text payment buys the standard engine.
durationMinutesNoMinutes 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / cashuToken
      Added value: +{
      +  "description": "Optional. Pay with Cashu ecash instead of Lightning: a cashuB token from an accepted mint that pays exactly this call's price after the mint's fee (in most wallets: send the price with the receiver's fee included). With it, the reply has no invoice and the paymentId is already paid. A wrong amount or mint is refused before anything is spent, and the error names the price.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / targetLanguage
      Added value: +{
      +  "description": "For translate_text, transcribe_translate and translate_epub: the target language, the same value you will send to the tool. It picks the translation engine and so the price. Without it a translate_text payment buys the standard engine.",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / resolution / description
      Previous value: -"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: flat 200 sats at any size, so resolution does not change the price."New value: +"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: a flat 200 sats per edit, so resolution does not change the price."
  4. Changed1 schema field changed
    • changedInput schema / properties / resolution / description
      Previous value: -"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."New value: +"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: flat 200 sats at any size, so resolution does not change the price."
  5. Changed1 schema field changed
    • changedInput schema / properties / generate_audio / description
      Previous value: -"For generate_video / animate_image: include native audio (default: false). Free — no surcharge."New value: +"Accepted and IGNORED — H3 audio is native and always on, at no extra cost. There is no way to request a silent render."
  6. Changed1 schema field changed
    • removedInput schema / properties / styleModel
      Removed value: -{
      -  "description": "style_transfer ONLY — quality tier, and it SETS THE PRICE (fast 15, realistic 20, cinematic 35, high-quality 35, animated 45 sats). Omit for fast. Quote the same tier you intend to run or execution will refuse the short-pay.",
      -  "enum": [
      -    "fast",
      -    "realistic",
      -    "cinematic",
      -    "high-quality",
      -    "animated"
      -  ],
      -  "type": "string"
      -}
  7. Changed1 schema field changed
    • addedInput schema / properties / styleModel
      Added value: +{
      +  "description": "style_transfer ONLY — quality tier, and it SETS THE PRICE (fast 15, realistic 20, cinematic 35, high-quality 35, animated 45 sats). Omit for fast. Quote the same tier you intend to run or execution will refuse the short-pay.",
      +  "enum": [
      +    "fast",
      +    "realistic",
      +    "cinematic",
      +    "high-quality",
      +    "animated"
      +  ],
      +  "type": "string"
      +}
  8. Changed4 schema fields changed
    • changedInput schema / properties / duration / description
      Previous value: -"Required for generate_video / animate_image: duration in seconds (4-15)"New value: +"Required for generate_video / animate_image: duration in seconds (5-15)"
    • changedInput schema / properties / mode / description
      Previous value: -"Legacy alias for generate_video: 'standard'→720p, 'pro'→1080p. Prefer 'resolution'."New value: +"Legacy alias for generate_video: 'standard'→768p, 'pro'→2K. Prefer 'resolution'."
    • changedInput schema / properties / resolution / description
      Previous value: -"480p / 720p / 1080p for generate_video (default 1080p) and animate_image (default 720p) — priced by resolution × duration, native audio free. For edit_image: 1K=200, 2K=300, 4K=450 sats."New value: +"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."
    • changedInput schema / properties / resolution / enum
      Previous value: -[
      -  "480p",
      -  "720p",
      -  "1080p",
      -  "1K",
      -  "2K",
      -  "4K"
      -]New value: +[
      +  "768p",
      +  "2K",
      +  "480p",
      +  "720p",
      +  "1080p",
      +  "1K",
      +  "4K"
      +]
  9. Changed1 schema field changed
    • changedInput schema / properties / message / description
      Previous value: -"Required for send_sms: message text (max 126 chars)"New value: +"Required for send_sms: message text (max 1544 chars; billed per SMS segment, so longer or accented messages cost more)"
  10. Changed2 schema fields changed
    • addedInput schema / properties / characterCount
      Added value: +{
      +  "description": "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.",
      +  "type": "number"
      +}
    • addedInput schema / properties / ocr
      Added value: +{
      +  "description": "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.",
      +  "type": "boolean"
      +}
  11. Changed1 schema field changed
    • addedInput schema / properties / quantity
      Added value: +{
      +  "description": "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.",
      +  "type": "number"
      +}
  12. Changed1 schema field changed
    • changedInput schema / properties / resolution / description
      Previous value: -"For generate_video / animate_image: 480p / 720p (default) / 1080p — priced by resolution × duration, native audio free. For edit_image: 1K=200, 2K=300, 4K=450 sats."New value: +"480p / 720p / 1080p for generate_video (default 1080p) and animate_image (default 720p) — priced by resolution × duration, native audio free. For edit_image: 1K=200, 2K=300, 4K=450 sats."
  13. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: it discloses the exact return shape, the 10-minute invoice expiry, the error contract for missing required fields, price-lock semantics (value locked at payment, under-count rejected with the exact amount to re-pay), and the Cashu path where no invoice is returned and paymentId is already paid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose, return shape, flow and expiry are front-loaded and zero-waste. The middle 'Some tools require extra params…' block is effectively one very long run-on sentence that is harder to scan than a short list would be, though nearly every clause carries pricing or requirement information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter payment-creation tool with no output schema, the description supplies everything needed to call correctly: what is returned, how long the invoice lives, per-tool parameter requirements, pricing drivers, the alternate Cashu payment mode, and failure behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a 3 is the baseline, but the description goes beyond per-field docs by mapping which parameters each toolName requires and how each drives price (char-count pricing, per-minute audio, resolution × duration). It also warns to quote with the SAME duration/resolution you will execute with, which is cross-parameter guidance the schema does not state.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource: 'Create a Lightning invoice to pay for one AI service call.' It also pins the granularity ('Each payment covers exactly one tool call'), which clearly separates it from check_payment_status and from the execution tools themselves.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit ordering ('list_models → create_payment → check_payment_status → call tool'), a cardinality rule ('call this once per operation'), and a decision rule for discovering modelId or omitting it for the default. It also names the precondition for each downstream tool's required params, so the agent knows exactly what to supply or when it will be rejected.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.