ESTAGE Support
IdeasMy tickets

What you can build with it

Updated October 25, 2026

Real examples of window.estageAI — chat, smart forms, summaries, translation, image understanding, document Q&A, and image generation.

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.

Note

Every method is safe to call: if a call fails — the cap is reached, the visitor is rate limited, image generation is off — it returns an empty result instead of an error. If you turn the assistant off (or remove it), window.estageAI is taken off your site, so the features that use it stop working until you turn it back on.

Chat

The floating chat bubble needs no code — it's the Chat bubble on your site switch in Settings. Use chat() when you want the conversation inside your own page design. 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
  onToolCall: (name) => showWorking(name),     // the chat is running one of your actions
});
// messages = [{ role: 'user', content: 'What are your hours?' }, …]

The chat answers from your persona and knowledge, and can run the actions you set up — onToolCall fires when it does, so you can show a "working…" hint.

Smart forms

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.

Summarize & translate

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.

Image understanding (vision)

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.

Document Q&A (PDF)

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.

Image generation

Generate an image from a prompt (needs AI image generation 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' }   // '1:1' | '3:4' | '4:3' | '9:16' | '16:9'
);   // → a hosted image URL you can drop into <img src>

Pass referenceImage (an image URL, or { base64, mediaType }) to get a new image in the same visual style as an existing one.

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

Reading the config

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 }

Method reference

Method Does
chat(messages, { onToken, onToolCall }) Streamed conversation reply; can run your actions
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) (also analyzeImage) Analyzes an image
readDocument(file, prompt) (also askDocument) Answers about a PDF / text file
image(prompt, { aspectRatio, referenceImage }) Generates an image (needs AI image generation on)

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

Was this helpful? Still stuck? Write to the team