Lumiqa Docs

generate_variants

Generation write

What it does

Produces a matrix of A/B-testable assets — captions, hashtag sets, hook lines (text-overlay candidates), and CTAs — for a content item, using its title/description/note and (when available) the latest transcript excerpt.

Results land in the D1 content_variants table for later attribution. If the migration hasn't been applied yet, the variants still come back in the response with persisted: false.

Input schema

NameTypeRequiredDefaultDescription
id string required Content id.
n_captions number optional 5 1-10.
n_hook_lines number optional 5 1-10.
tone string optional Force a single tone across every variant (e.g. "professional", "playful", "controversial"). Omit to vary tone deliberately.
language string optional "it" Output language code (ISO 639-1).

Example call

json{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "generate_variants",
    "arguments": {
        "id": "c_abc123",
        "n_captions": 5,
        "n_hook_lines": 7,
        "tone": "controversial",
        "language": "it"
    }
  }
}

Response shape

json{
  "ok": true,
  "content_id": "c_abc123",
  "variants_id": "v_4f2a8c19e3b7",
  "model_used": "claude-sonnet-4-6",
  "language": "it",
  "persisted": true,
  "captions": [
    { "id": "cap_1", "angle": "question_hook", "text": "Stai facendo il caffè sbagliato?", "char_count": 32 }
  ],
  "hashtag_sets": [
    { "id": "ht_1", "niche": "coffee", "tags": ["#espresso", "#barista"] }
  ],
  "hook_lines": [
    { "id": "hook_1", "text": "18 grammi in. 36 fuori. 27 secondi.", "tone": "stat" }
  ],
  "ctas": [
    { "id": "cta_1", "text": "Salva il post per la prossima volta che fai un caffè.", "intent": "soft" }
  ]
}

Usage from Claude Desktop

prompt"Give me 7 hook lines and 5 captions for c_abc123 in a controversial tone."

Usage from Python

pythonimport requests

LUMIQA = "https://lumiqa.io/mcp/your-slug"
HEADERS = {"Authorization": "Bearer lk_live_xxxxxxxxxxxx"}

r = requests.post(LUMIQA, headers=HEADERS, json={
    "jsonrpc": "2.0", "id": 1,
    "method": "tools/call",
    "params": {
        "name": "generate_variants",
        "arguments": {"id": "c_abc123", "tone": "playful"}
    },
})
print(r.json())

Usage from Node

javascriptconst r = await fetch("https://lumiqa.io/mcp/your-slug", {
  method: "POST",
  headers: {
    "Authorization": "Bearer lk_live_xxxxxxxxxxxx",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0", id: 1,
    method: "tools/call",
    params: {
      name: "generate_variants",
      arguments: { id: "c_abc123", tone: "playful" },
    },
  }),
});
const data = await r.json();
console.log(data);

Required env vars / integrations

Known limitations