MostlyRender

Guida rapida

Genera la tua prima immagine in meno di un minuto. MostlyRender trasforma un template (una tela con livelli denominati) in PNG, JPEG, WebP o PDF — tramite una semplice API REST.

# 1. Ottieni una chiave API

Crea una chiave nell’app in Impostazioni → Chiavi API. Le chiavi hanno l’aspetto di mr_live_… (produzione) o mr_test_… (test). Inviale come Bearer token ad ogni richiesta. Vedi Autenticazione.

# 2. Crea un template

Nell’editor, progetta un template e dai nomi ai tuoi livelli — un livello di testo denominato title, un livello di immagine denominato photo, e così via. Il nome del livello è il parametro API che riempi al momento del rendering. Vedi Template come parametri.

# 3. Renderizzalo

bash
curl https://api.mostlyrender.com/v1/renders \
  -H "Authorization: Bearer mr_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "tpl_abc",
    "modifications": { "title": "Renders that never go dark" },
    "output": "png"
  }'
json
{
  "id": "rnd_abc123",
  "url": "https://img.mostlyrender.com/mostlyrender/renders/rnd_abc123.png",
  "output": "png"
}

L’url è un asset pubblico, cached su CDN — inseriscilo direttamente in un <img>, un’email o un tag OG.

# 4. Oppure usa un SDK

python
from mostlyrender import MostlyRender

mr = MostlyRender("mr_live_…")
out = mr.render("tpl_abc", modifications={"title": "Renders that never go dark"})
print(out["url"])

# Prossimi passi