generate_thumbnail
What it does
Builds three distinct thumbnail variants using Replicate FLUX (preferred provider: black-forest-labs/flux-schnell, native multi-aspect, ~$0.003/image). Falls back to DALL-E 3 (OpenAI) or fal.ai Flux if only those keys are set. One landscape (16:9), one portrait (9:16), one square (1:1) — each with a different style descriptor.
PNGs are stored at <slug>/thumbnails/<content_id>/variant-N.png and the response exposes a per-variant URL plus the exact prompt used.
Input schema
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | required | — |
Content id (uses title + brand for prompt building). |
| style_hint | string | optional | — |
Override the per-variant style. One of cinematic, minimalist, energetic. |
Example call
json{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "generate_thumbnail", "arguments": { "id": "c_abc123", "style_hint": "minimalist" } } }
Response shape
json{ "ok": true, "content_id": "c_abc123", "provider": "replicate", "prompt_strategy": "Per-variant prompt built from title... + brand...", "variants": [ { "id": "thumb_1", "url": "https://lumiqa.io/api/asset/your-slug%2Fthumbnails%2Fc_abc123%2Fvariant-1.png", "r2_key": "your-slug/thumbnails/c_abc123/variant-1.png", "aspect_ratio": "16:9", "style": "cinematic", "prompt_used": "Bold, high-contrast YouTube thumbnail..." } ] }
Usage from Claude Desktop
prompt"Make me three thumbnails for c_abc123, all in minimalist style."
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_thumbnail", "arguments": {"id": "c_abc123"} }, }) 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_thumbnail", arguments: { id: "c_abc123" }, }, }), }); const data = await r.json(); console.log(data);
Required env vars / integrations
- BYO Keys (preferred):
REPLICATE_API_TOKEN→flux-schnellnative multi-aspect, ~$0.003 / image. - Fallback:
OPENAI_API_KEY(DALL-E 3, fixed sizes, ~$0.04 / image) orFAL_API_KEY(fal.ai Flux). - R2 binding
UPLOADS(managed by Lumiqa). - Optional
APP_URLoverride for the returned asset URLs. - Typical latency: 8–14 s end-to-end for all 3 variants on Replicate.
Known limitations
- Replicate FLUX schnell honors
aspect_rationatively (16:9, 9:16, 1:1). DALL-E 3 quantizes to (1792x1024, 1024x1792, 1024x1024) — pixel-perfect aspects require post-processing. - If only some variants fail, the tool still returns the successful ones with
partial_failurespopulated. - Prompts intentionally exclude on-image text (overlay it client-side for proper typography).