Skip to content

Public endpoint settings

Configure public endpoints to expose your AI Search instance directly to users without requiring authentication. This enables you to share your AI Search functionality with external users, or to integrate it into public-facing applications.

Available endpoints

Each AI Search instance can expose three public endpoints:

EndpointDescription
/mcpModel Context Protocol endpoint for AI agents
/chat/completionsOpenAI-compatible chat completion endpoint
/searchSearch endpoint that returns relevant chunks

For details on how to use these endpoints, refer to Public endpoint usage.

Public URL format

When enabled, public endpoints are accessible at:

https://<hash>.search.ai.cloudflare.com/<endpoint>

The <hash> is your instance's unique public endpoint identifier.

For example:

  • https://abc123.search.ai.cloudflare.com/mcp
  • https://abc123.search.ai.cloudflare.com/chat/completions
  • https://abc123.search.ai.cloudflare.com/search

Enabling and disabling public endpoints

You can enable or disable each public endpoint independently:

  1. Log in to your Cloudflare account, and go to AI Search. Go to AI Search
  2. Select your AI Search instance.
  3. Go to Settings > Public Endpoints.
  4. Toggle on Public Endpoints to enable the feature, then toggle each individual endpoint on or off as needed.

Each endpoint has its own configuration panel for granular control.

Rate limiting

Configure rate limits to control usage across all public endpoints:

SettingDescriptionDefault
Requests per periodMaximum number of requests allowed120
Time periodTime window for the rate limit1 minute
Period typeRate limiting technique: fixed or slidingfixed

Rate limits apply across all enabled public endpoints for the AI Search instance.

CORS configuration

Cross-Origin Resource Sharing (CORS) is enabled by default to support browser-based applications.

The default allowed origins depend on your data source type:

  • Website data sources: The source domain is automatically added as an allowed origin.
  • Other data sources: All origins (*) are allowed by default.

You can customize allowed origins in the Public Endpoints settings by adding specific hostnames to the CORS rules.

Tool description

The Tool Description field allows you to customize how your AI Search instance is described to MCP clients. The default description is Finds exactly what you're looking for. This description helps AI agents understand what content is available, and when to use your search tool. A good tool description should explain what type of content is indexed, and what kinds of questions it can answer.

For example:

Search the Acme product documentation for information about
installation, configuration, API references, and troubleshooting
guides. Use this tool when users ask questions about how to set up
or use Acme products.

Security considerations

  • Public endpoints do not require authentication.
  • Consider enabling rate limiting to prevent abuse.
  • Use CORS rules to restrict access to specific domains.
  • Monitor usage through your dashboard analytics.
  • UI snippets - Add pre-built search and chat components to your website using your public endpoints.