Skip to main content

Write Marketing Copy

Copy, metadata, translations, images and speech.

get_marketing_desc

const desc = await Gen.get_marketing_desc('an ergonomic gaming chair', apiKey, provider);

get_blog_post

const post = await Gen.get_blog_post('the future of remote work', apiKey, provider);

generate_landing_copy

const copy = await Gen.generate_landing_copy('an AI meeting assistant', apiKey, provider, { featureCount: 4, tone: 'friendly' });
// { headline, subheadline, features, cta, socialProof, faq }

generate_faq

const faq = await Gen.generate_faq('a specialty coffee subscription', apiKey, provider, { count: 5 });
// [{ question, answer }]

generate_seo_meta

const meta = await Gen.generate_seo_meta('a product page for wireless headphones', apiKey, provider, { url, siteName });
// { title, description, keywords, openGraph, twitter, jsonLd, html }

html holds the rendered <title>, meta, Open Graph, Twitter card and JSON-LD tags, ready for the page head.

translate_ui_strings

const spanish = await Gen.translate_ui_strings({ save: 'Save', greeting: 'Hello, {name}!' }, apiKey, provider, { targetLanguage: 'Spanish' });
// { save: 'Guardar', greeting: '¡Hola, {name}!' }

Keys and placeholders are kept. Options: targetLanguage (required), sourceLanguage.

generate_image_from_desc

const image = await Gen.generate_image_from_desc('A vibrant coral reef teeming with fish', openaiKey, stabilityKey, true);

Writes an image description with the chat model, then generates the image (Stability by default, or 'openai' as the provider argument). Returns a base64 string, or a Buffer when is_base64 is false.

generate_speech_synthesis

const speech = await Gen.generate_speech_synthesis('Welcome to the AI revolution!', googleKey);

Text to speech with Google.