POST /accounts/{account_id}/ai-search/instances
Create new instances.Servers
- https://api.cloudflare.com/client/v4
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id |
String | Yes |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
retrieval_options |
Object | No | |
retrieval_options.keyword_match_mode |
String | No |
Controls how keyword search terms are matched. exact_match requires all terms to appear (AND); fuzzy_match returns results containing any term (OR). Defaults to exact_match. Valid values:
Default value: "exact_match" |
source |
String | Yes | |
custom_metadata[] |
Array | No | |
custom_metadata[].data_type |
String | Yes |
Valid values:
|
custom_metadata[].field_name |
String | Yes | |
ai_search_model |
No | ||
chunk_overlap |
Integer | No |
Default value: 10 |
token_id |
String | No | |
reranking |
Boolean | No |
Default value: false |
chunk |
Boolean | No |
Default value: true |
rewrite_query |
Boolean | No |
Default value: false |
metadata |
Object | No | |
metadata.worker_domain |
String | No | |
metadata.created_from_aisearch_wizard |
Boolean | No | |
score_threshold |
Number | No |
Default value: 0.4 |
hybrid_search_enabled |
Boolean | No |
Default value: false |
id |
String | Yes |
Use your AI Search ID. |
public_endpoint_params |
Object | No | |
public_endpoint_params.chat_completions_endpoint |
Object | No | |
public_endpoint_params.chat_completions_endpoint.disabled |
Boolean | No |
Disable chat completions endpoint for this public endpoint Default value: false |
public_endpoint_params.search_endpoint |
Object | No | |
public_endpoint_params.search_endpoint.disabled |
Boolean | No |
Disable search endpoint for this public endpoint Default value: false |
public_endpoint_params.enabled |
Boolean | No |
Default value: false |
public_endpoint_params.authorized_hosts[] |
Array | No | |
public_endpoint_params.mcp |
Object | No | |
public_endpoint_params.mcp.description |
String | No |
Default value: "Finds exactly what you're looking for" |
public_endpoint_params.mcp.disabled |
Boolean | No |
Disable MCP endpoint for this public endpoint Default value: false |
public_endpoint_params.rate_limit |
Object | No | |
public_endpoint_params.rate_limit.requests |
Integer | No | |
public_endpoint_params.rate_limit.period_ms |
Integer | No | |
public_endpoint_params.rate_limit.technique |
String | No |
Valid values:
|
fusion_method |
String | No |
Valid values:
Default value: "max" |
max_num_results |
Integer | No |
Default value: 10 |
reranking_model |
No | ||
chunk_size |
Integer | No |
Default value: 256 |
rewrite_model |
No | ||
type |
String | Yes |
Valid values:
|
ai_gateway_id |
String | No | |
source_params |
Object | No | |
source_params.prefix |
String | No | |
source_params.web_crawler |
Object | No |
Default value: { "parse_type": "sitemap" } |
source_params.web_crawler.parse_type |
String | No |
Valid values:
Default value: "sitemap" |
source_params.web_crawler.parse_options |
Object | No | |
source_params.web_crawler.parse_options.include_headers |
Object | No | |
source_params.web_crawler.parse_options.use_browser_rendering |
Boolean | No |
Default value: false |
source_params.web_crawler.parse_options.include_images |
Boolean | No |
Default value: false |
source_params.web_crawler.parse_options.specific_sitemaps[] |
Array | No |
List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'. |
source_params.web_crawler.store_options |
Object | No | |
source_params.web_crawler.store_options.r2_jurisdiction |
String | No |
Default value: "default" |
source_params.web_crawler.store_options.storage_id |
String | Yes | |
source_params.web_crawler.store_options.storage_type |
String | No |
Valid values:
Default value: "r2" |
source_params.include_items[] |
Array | No |
List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post) |
source_params.r2_jurisdiction |
String | No |
Default value: "default" |
source_params.exclude_items[] |
Array | No |
List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced) |
embedding_model |
No |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.