excalibur_refine_post_region
Refine a flagged region of a post with an LLM — server-side.
The operator's LLM key stays in the vault and never leaves the
server. Send the flagged region, the surrounding full_text, an
optional instruction (what to change), and the editor's voice
profile + bans (JSON array or comma list of banned constructions).
Returns {"success": true, "suggestions": [...3 strings...]}.
Paid: the AI cost is metered as a tollbooth fare. The fare is refunded if no LLM key is configured or the upstream call returns nothing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bans | No | Banned constructions — JSON array or comma-separated (optional). | |
| npub | No | Required. Your Nostr public key (npub1...) for credit billing. | |
| voice | No | Voice-profile text fed to the model (optional). | |
| region | Yes | The flagged span to rewrite. | |
| full_text | No | The whole tweet, for context. | |
| dpop_token | No | ||
| instruction | No | What the editor wants changed (optional). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||