> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raily.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Endpoints

> Expose your data collections in a trusted, authenticated, and transparent way to AI agents and applications

## Overview

AI Endpoints let you expose your data collections to AI agents and applications in a trusted, authenticated, and transparent way. Each AI Endpoint is configured with specific authentication and data settings.

<Frame caption="Create a new AI Endpoint">
  <img src="https://mintcdn.com/railyai/XX1nxXkekI9EWYGS/images/add_server/AI_endpoint.png?fit=max&auto=format&n=XX1nxXkekI9EWYGS&q=85&s=35da26f23b77e9d9c19e55ac001c4c18" alt="New endpoint form with name, collection, who can connect, and Search results with UI" width="1912" height="897" data-path="images/add_server/AI_endpoint.png" />
</Frame>

## What is an AI Endpoint?

An AI Endpoint is configured with:

* **Authentication** - Specific Identity Provider (IDP) for secure access
* **Data Integration** - Specific data collection or integration you choose to expose
* **Full Analytics** - Complete monitoring including latency, calls, and usage metrics

Raily manages these endpoints and provides comprehensive analytics on their usage.

## How AI Endpoints Work

Each AI Endpoint:

1. **Authenticates requests** via your configured IDP
2. **Serves data** from your chosen data collection or integration
3. **Tracks all activity** with detailed analytics
4. **Enforces access policies** based on your configuration

## Create or attach an endpoint

Your endpoints live in the **Your audience** panel on the right of **Search Rail**. Each one shows the collection it serves and whether it's active. Click **+ New endpoint** to add one.

You can also attach an endpoint while looking at a collection: find the **Searched by** row and click **add endpoint**, then either point an existing endpoint here or create a new one.

In trial mode, Raily has already created one endpoint for you. You can't add a second, but you can point it at any collection you connect.

Clicking **+ New endpoint** opens the **New endpoint** form shown above. Nothing is saved until you click **Create endpoint**.

<Steps>
  <Step title="Name the endpoint">
    Type a **Name** your audience recognizes (for example `partner-api`). Raily assigns the endpoint URL when you click **Create endpoint**.
  </Step>

  <Step title="Confirm the collection">
    The **Collection** is the source you started from, and its saved search config is used as-is. Click **Change** to point at a different one.
  </Step>

  <Step title="Choose who can connect">
    Pick a [sign-in provider](/concepts/identities-and-auth) under **Who can connect**. Your users sign in with it before searching. This is required; there is no open, no-auth option.
  </Step>

  <Step title="Set how results render (optional)">
    Leave **Search results with UI** on and your users get a rich, interactive results page inside Claude or ChatGPT, branded with your data. Turn it off for plain text. More in [Search with UI](#search-with-ui) below.
  </Step>

  <Step title="Add internal notes (optional)">
    Open **Advanced** for a **Description** (an internal note for your team, never shown to agents) and **Agent instructions** (sent to agents in the MCP handshake to tell them how to use this endpoint).
  </Step>

  <Step title="Create the endpoint">
    Click **Create endpoint**. The endpoint goes live and inherits the collection's search config, so there is nothing to regenerate.
  </Step>
</Steps>

## Search with UI

**Search with UI** controls how this endpoint presents results in the connected AI client. Turn it on and the endpoint returns an interactive visual dashboard that the client renders in the chat: the MCP UI in clients like Claude, or the app UI in ChatGPT. Turn it off and the same results come back as plain text, which every client can read.

<Frame caption="Search with UI">
  <img src="https://mintcdn.com/railyai/-DsVB9Gn8aLgjqgb/images/search_with_ai.png?fit=max&auto=format&n=-DsVB9Gn8aLgjqgb&q=85&s=4657a4ad90e4155da9e7ef7136ae9a13" alt="The Search with UI toggle on an AI Endpoint" width="1155" height="108" data-path="images/search_with_ai.png" />
</Frame>

With it on, a reader can scan, filter, and open results visually without leaving the chat. The fields shown in the dashboard come from your [Data Catalog](/integrations/data-catalog).

## Endpoint Configuration

An AI Endpoint is configured with:

### Identity Provider (IDP)

Connect the AI Endpoint to a specific IDP for authentication:

* OAuth providers
* API key authentication
* Custom authentication systems
* White-label authentication

### Data Collection

Choose which data collection or integration the endpoint exposes:

* Specific content collections
* Vector store data
* External data integrations
* Storage buckets

## Analytics

Raily provides full analytics for each AI Endpoint, including:

* **Total Calls** - Number of requests to the endpoint
* **Average Response Time** - Latency metrics
* **Total Input Tokens** - Tokens sent in requests
* **Total Output Tokens** - Tokens returned in responses
* **Average Input/Output Tokens** - Per-request averages
* **Access patterns over time** - Timeline of usage

Access analytics through the Raily dashboard at [app.raily.ai/dashboard](https://app.raily.ai/dashboard).

## AI Endpoint Types

<CardGroup cols={2}>
  <Card title="Agent Endpoints" icon="user-robot">
    Endpoints for autonomous AI agents
  </Card>

  <Card title="Application Endpoints" icon="wand-magic-sparkles">
    Endpoints for AI-powered applications
  </Card>

  <Card title="LLM Integration" icon="robot">
    Endpoints for LLM provider access
  </Card>

  <Card title="Custom Endpoints" icon="plug">
    Endpoints for custom integrations
  </Card>
</CardGroup>

## Trusted and Transparent

AI Endpoints provide:

* **Trust** - Authentication on every request
* **Transparency** - Full visibility into who accesses what
* **Control** - Configure exactly what data is exposed
* **Analytics** - Detailed metrics on all usage

## Best Practices

<CardGroup cols={2}>
  <Card title="Separate Endpoints" icon="code-branch">
    Create separate AI Endpoints for different use cases and environments
  </Card>

  <Card title="Monitor Analytics" icon="chart-line">
    Regularly review endpoint analytics to understand usage patterns
  </Card>

  <Card title="Secure Authentication" icon="shield-check">
    Use robust IDP configuration for endpoint authentication
  </Card>

  <Card title="Access Policies" icon="lock">
    Configure appropriate access policies for each endpoint
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Providers" icon="shield-check" href="/concepts/identities-and-auth">
    Add a sign-in provider for your endpoints
  </Card>

  <Card title="Analytics" icon="chart-line" href="/features/analytics">
    View endpoint analytics and metrics
  </Card>
</CardGroup>
