Skip to content

What you can build with it

When the AI Assistant is on, your site gets a global helper — window.estageAI — with methods for every kind of AI task. You usually don’t write this yourself: ask the builder for the feature (“on form submit, classify the message”) and it wires the right call. The examples below show what’s possible and the shape of each call.

The classic use — a support/sales chatbot. It streams the reply token-by-token so it types out live:

const reply = await window.estageAI.chat(messages, {
onToken: (chunk) => appendToBubble(chunk), // live typing
});
// messages = [{ role: 'user', content: 'What are your hours?' }, …]

This is what “add an AI chatbot” wires for you, using the greeting, starter prompts, name, and accent color from your Settings.

Make a plain form intelligent. Two favorites:

Route a submission into a category — tag a contact message so it reaches the right inbox:

const category = await window.estageAI.classify(
message,
['Sales', 'Support', 'Billing', 'Other']
); // → "Support"

Auto-generate a title — e.g. name a support ticket or a user post from its body:

const title = await window.estageAI.generate(
`Write a short, clear title for this message:\n\n${message}`
);

Pull structured fields out of free text — e.g. parse a booking request:

const data = await window.estageAI.extract(
message,
['name', 'email', 'preferred_date', 'party_size']
); // → { name: 'Sam', email: '…', preferred_date: 'Fri', party_size: '4' }

Realistic scenario: a “Contact us” form where, on submit, Genesis classifies the message, generates a title, and shows the visitor a tailored confirmation — all before the email even sends.

const short = await window.estageAI.summarize(longArticleText);
const spanish = await window.estageAI.translate(text, 'Spanish');

Scenario: a “TL;DR” button on a long blog post, or a one-click translate on a product description.

Give the AI an image and a question — great for upload forms:

const description = await window.estageAI.vision(
{ base64, mediaType: file.type }, // or an image URL string
'Describe this photo in one sentence for alt text.'
);

Scenario: a user uploads a profile photo and you auto-fill its alt text; or a “what’s in this picture?” feature on a gallery.

Ask questions about an uploaded PDF or text file:

const answer = await window.estageAI.readDocument(
{ base64, mediaType: 'application/pdf' }, // or a URL, or { text }
'What is the total amount and the due date on this invoice?'
);

Scenario: a “drop your brief and ask anything” widget, or auto-summarizing an uploaded contract.

Generate an image from a prompt (needs the Image generation toggle on in Settings — it costs more):

const url = await window.estageAI.image(
`A friendly cartoon avatar, soft colors, for the name "${name}"`,
{ aspectRatio: '1:1' }
); // → a hosted image URL you can drop into <img src>

Scenario: auto-generate an avatar on sign-up, or a cover image for a user-submitted post.

The widget’s settings are available client-side too, so custom UI can match:

const cfg = window.estageAI.config;
// { greeting, suggestions: [...], ui: { name, accent, position }, enabled, imageEnabled }
MethodDoes
chat(messages, { onToken })Streamed conversation reply
ask(prompt) / generate(prompt)One-shot text answer
classify(text, categories)Picks one of your categories
extract(text, fields)Returns an object of the requested fields
summarize(text)Condenses long text
translate(text, targetLang)Translates text
vision(image, prompt)Analyzes an image
readDocument(file, prompt)Answers about a PDF / text file
image(prompt, { aspectRatio })Generates an image (toggle-gated)

Every call spends the owner’s credits and is bounded by your monthly cap and per-visitor rate limit — see billing.