- Raily Chat on your website. Add a short script to your site and visitors get a chat button that opens a branded chat panel.
- The chat API. Your app sends a conversation to the endpoint with an API key and gets back an answer with its sources.
Chat is available on request. Contact us to turn it on for your Account. Turning Chat on for an endpoint is available on paid plans.
Turn on Chat for an endpoint
1
Open the endpoint
In the Rail, open the endpoint you want to chat with. Chat needs an endpoint with a search source.
2
Turn on Chat
In the card with Search results with UI, turn on Chat.You can also turn it on when you create an endpoint: the New endpoint form has the same Chat switch.
3
Save
Click Save Changes.
4
Try it
Click Preview next to the Chat switch. A preview of Raily Chat opens, answering from this endpoint. Click Hide preview to close it.
Put Raily Chat on your website
Raily Chat only loads on the websites you list. A site that isn’t on the list can’t show it, even with your script.1
Turn on and save Chat
Follow the steps above. The Websites list appears under the Chat switch. You can add websites once Chat is saved.
2
Add your website
In Website address, type the address of your site, such as
https://your-site.com, and click Add website.Add each address your visitors use. https://example.com and https://www.example.com are different websites, so add both if both serve your pages. You can add up to 20 websites.3
Copy the snippet
Under Paste it into your website’s HTML, click the copy button next to the script. It looks like this:
4
Add the snippet to your site
Paste it once, before the closing
</body> tag on every page where you want chat. You don’t need to change it when you add or remove websites later.Customize the chat
Open Customize the chat under the website list to match Raily Chat to your brand. Click Preview next to the Chat switch to see your changes before you save. The preview follows the language you’re editing. The settings have three tabs.Button
- Style: Round, Button with label (an icon with optional text), or Your own SVG (a complete SVG of your own).
- Icon, Show label and Label for the button, plus Button background and Icon colour.
- Side (Left or Right), Location (Bottom or Center), Distance from side and Distance from bottom.
- Size and shape: Height, Width, Rotation and Corner radius, depending on the style.
- Chat opens: Above button, Beside button, or From bottom. On smaller screens the chat moves to fit. From bottom hides the button until the visitor closes the chat.
Chat
- Chat logo: click Add logo to use an image link (it must be a direct
https://image that doesn’t need a sign-in) or an icon from the library. - Chat text, per language: Chat title, Chat subtitle, Welcome heading, Welcome text and Message placeholder. Pick the language to edit from the menu next to Chat text.
- Suggested questions: up to 4 per language. Visitors click one to ask it. Use Show icons and Show arrows to change how they look.
- Disclaimer: Show disclaimer, an optional icon, and the Disclaimer text shown under the chat.
- Appearance: the Accent, Background, Text and Prompt background colours, and Chat corner radius.
- Source tags: up to 8 short labels on the welcome screen that tell visitors what they can ask about. Tags are one text for every language, so write them in a way that works for all your visitors.
Languages
- Languages: add the languages Raily Chat should speak. 13 languages are available, including English, Hebrew, German, French, Spanish and Arabic.
- Choose language by:
- Page language: the language your page declares.
- Visitor language: the visitor’s browser language.
- Per website: a fixed language for each website in your list.
Icons
Wherever you pick an icon, the Choose icon panel has two tabs. Raily has the built-in icons. Custom holds SVG icons your Organization uploaded: click Upload SVG to add one (SVG only, up to 50 KB). Uploaded icons are shared by every endpoint in the Organization.Save your changes
Click Save at the bottom of the settings. Your website picks up the new look; you don’t need to change the snippet. Discard goes back to your last saved settings. Restore defaults replaces every setting, including uploaded SVGs, text, prompts, colours, languages and source tags, with Raily’s defaults. Nothing changes on your website until you click Save.What visitors see
A visitor clicks the chat button and asks a question. Raily Chat answers from your endpoint’s sources and shows the sources it used as cards that open in a new tab. Visitors can ask follow-up questions, including about a source from an earlier answer. The footer reads Powered by Raily, with a link to raily.ai. Raily protects the chat from bots. Before the first message, the visitor briefly sees Checking your browser… while Raily checks the browser. Chat needs cookies, so a visitor who blocks cookies for your site is asked to allow them and reload. Each visitor can ask up to 30 questions a day. When a visitor reaches the limit, the chat tells them when they can ask again. The count resets at midnight UTC. Contact us if your site needs a different limit.Remove websites or turn chat off
- Remove one website: click the trash icon on its row. Raily Chat stops loading there.
- Remove every website: click Remove all above the list. Raily Chat comes off your website right away. This always works, even if Chat is no longer available for your Account. If you add a website again later, the snippet you already pasted keeps working.
- Pause chat: turn off Chat and click Save Changes. The website chat pauses and your website list and settings are kept. Turn Chat back on to resume.
Use the chat API
Your app can chat with an endpoint over HTTP with an API key. Only API keys work here: a token from a user’s sign-in is refused.Before you start
- Chat is on and saved for the endpoint (see Turn on Chat).
- You have the endpoint URL and an API key for the endpoint. See Get your endpoint URL and key.
Send a question
The chat address is your endpoint URL with/v1/chat in place of /mcp. For example, https://endpoints.app.raily.ai/t/your-workspace/123/mcp becomes https://endpoints.app.raily.ai/t/your-workspace/123/v1/chat.
The request
Send the whole conversation inmessages on every call. Raily keeps no conversation on its side.
A follow-up turn looks like this:
The response
The numbers in
citations can skip (for example [1, 3] with two sources), so find a marker’s source by its position in citations, not by counting.
When the endpoint has nothing relevant, answer holds your endpoint’s no-results message and sources is empty.
Errors
An error response has anerror code, and usually a request_id:
Each call has 55 seconds to answer. Set your client’s timeout a little above that, for example 65 seconds.
Next steps
Create an AI endpoint
Let agents search this source
Search from your app
Call an endpoint with an API key