function generateCreative(){var prompt=document.getElementById("creative-prompt").value;if(!prompt)return;var csrf=document.querySelector("meta[name=csrf-token]").content;fetch("api/bridge.php?target=charlie",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","X-CSRF-Token":csrf},body:"target=charlie&endpoint=generate&data[prompt]="+encodeURIComponent(prompt)+"&_csrf="+csrf}).then(r=>r.json()).then(d=>{document.getElementById("creative-result").innerHTML=d.success?"<p>Generation complete</p>":"<p>Error: "+(d.error||"Unknown")+"</p>";});}
