Lookio Docs
Lookio websiteOpen Lookio
WidgetsCreate a widget
widgets

Create a widget

Creates a widget for an assistant and returns it with its snippets: paste snippets.bubble before </body> for a launcher, snippets.embed where the chat should sit, link to snippets.hosted for a full page, or use snippets.iframe where scripts are refused. Only the bubble is on by default: snippets.embed and snippets.iframe work once settings.embed is true, snippets.hosted once settings.hosted_page is true; a format that is off answers 404. Add the websites that show it to allowed_domains: the browser refuses the bubble and the embed on any site not listed. Visitors' answers are charged to this workspace in the widget's mode; limits caps them per visitor and per month. Costs no credits itself.

POST/v1/widgets

Requires assistants:write.

Creating a widget costs no credits. Each visitor question that reaches the model spends the widget’s mode price (flash by default, 30 credits), whether or not Lookio finds an answer. Say so to whoever sets it up, and set limits to cap the spending.

  • Allowed domains. List the websites that show the widget in allowed_domains, for example docs.acme.com. acme.com also covers www.acme.com, and *.acme.com covers every subdomain. The browser refuses the bubble and the embed on any site not listed. With no domain, nothing shows on any site; only the hosted page works, once you turn it on.
  • Formats. Each format is on or off with a setting: settings.bubble (on by default), settings.embed (off) and settings.hosted_page (off). A new widget starts with the chat bubble only. A format that is off does not exist: the loader script draws no launcher, and the in-page frame and the hosted page answer 404. snippets.iframe belongs to the embed format.
  • Limits. By default a visitor may ask 20 questions per hour and 60 per day, and the widget may spend 3,000 credits per calendar month (UTC). Set limits.monthly_credits to null for no ceiling beyond the workspace’s balance. See Access and limits.
  • Sources. settings.sources is numbered (the default), numbered_no_links, inline_links or none. See Appearance.
  • Snippets. The response holds the code to install it: snippets.bubble before </body> for a launcher, snippets.embed where the chat should sit, snippets.hosted for a full page and snippets.iframe where scripts are refused. See Install a widget.

The widget is live as soon as it exists. Send an Idempotency-Key header so a retried request does not create two widgets.

Authorizations

Authorizationbearerin headerrequired

Header parameters

Idempotency-Keystringlength: 1–255 chars

A unique key for this request, such as a UUID, 1 to 255 visible ASCII characters. Send the same key when you retry: the first response is returned (with Idempotent-Replayed: true) instead of running the request again, for 24 hours, per credential. The same key on a different request is a 409 conflict. A streamed answer is not recorded.

Body

application/jsonrequired
assistant_idstringrequiredpattern: ^ast_[abcdefghjkmnpqrstuvwxyz23456789]{12}$

The assistant the widget speaks for. A technical identity limited to some assistants can only pick one of them.

namestringlength: 1–120 chars

1 to 120 characters. Defaults to the assistant's name followed by widget.

modeenum<string>one of: eco, flash, deep

The query mode every answer of this widget uses, so what it costs per answer (Eco 10, Flash 30 credits (the default), Deep 80). Default flash.

statusenum<string>one of: live, paused

live answers visitors; paused shows nothing and answers nothing, until set live again.

allowed_domainsstring[]items: ≤ 50 items

The websites allowed to show the widget, as hosts (docs.acme.com) or *.acme.com for all subdomains (which also covers acme.com). Scheme, path and port are removed. The browser refuses to show the bubble and the embed on any other site, so a widget with no domain shows nowhere (the hosted page still works). Replaces the previous list.

settingsobject

Appearance, words and behaviour. Every field is optional and has a default.

limitsobject

Spending and abuse limits. Every field is optional and has a default.

Response

application/json

Create a widget

dataobjectrequired
request_idstringrequired

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search Lookio Docs documentation and read it in full, instead of answering from memory.

https://lookio.app/docs/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://lookio.app/docs/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.