PUT /accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}
Update instances.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
String | Yes |
AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores. |
name |
String | Yes |
Namespace name |
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 |
|---|---|---|---|
ai_search_model |
String | No |
Valid values:
|
reranking |
Boolean | No |
Default value: false |
chunk |
Boolean | No |
Default value: true |
metadata |
Object | No | |
metadata.worker_domain |
String | No | |
metadata.created_from_aisearch_wizard |
Boolean | No | |
metadata.search_for_agents |
Object | No | |
metadata.search_for_agents.zone_name |
String | Yes | |
metadata.search_for_agents.hostname |
String | Yes | |
metadata.search_for_agents.zone_id |
String | Yes | |
paused |
Boolean | No |
Default value: false |
indexing_options |
Object | No | |
indexing_options.keyword_tokenizer |
String | No |
Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter. Valid values:
Default value: "porter" |
fusion_method |
String | No |
Valid values:
Default value: "rrf" |
summarization |
Boolean | No |
Default value: false |
cache |
Boolean | No |
Default value: true |
max_num_results |
Integer | No |
Default value: 10 |
reranking_model |
String | No |
Valid values:
|
chunk_size |
Integer | No | |
rewrite_model |
String | No |
Valid values:
|
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.content_selector[] |
Array | No |
List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. Only the matched HTML fragment is stored and indexed. |
source_params.web_crawler.parse_options.content_selector[].selector |
String | Yes |
CSS selector to extract content from pages matching the path pattern. Supports standard CSS selectors including class, ID, element, and attribute selectors. |
source_params.web_crawler.parse_options.content_selector[].path |
String | Yes |
Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories. |
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.web_crawler.crawl_options |
Object | No | |
source_params.web_crawler.crawl_options.include_subdomains |
Boolean | No |
Default value: false |
source_params.web_crawler.crawl_options.source |
String | No |
Valid values:
Default value: "all" |
source_params.web_crawler.crawl_options.depth |
Number | No | |
source_params.web_crawler.crawl_options.max_age |
Number | No | |
source_params.web_crawler.crawl_options.include_external_links |
Boolean | No |
Default value: false |
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) |
system_prompt_index_summarization |
String | No | |
retrieval_options |
Object | No | |
retrieval_options.boost_by[] |
Array | No |
Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to 'asc' for numeric fields and 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field. |
retrieval_options.boost_by[].field |
String | Yes |
Metadata field name to boost by. Use 'timestamp' for document freshness, or any custom_metadata field. Numeric and datetime fields support asc/desc directions; text/boolean fields support exists/not_exists. |
retrieval_options.boost_by[].direction |
String | No |
Boost direction. 'desc' = higher values rank higher (e.g. newer timestamps). 'asc' = lower values rank higher. 'exists' = boost chunks that have the field. 'not_exists' = boost chunks that lack the field. Optional ��� defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Valid values:
|
retrieval_options.keyword_match_mode |
String | No |
Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. Defaults to 'and'. Valid values:
Default value: "and" |
custom_metadata[] |
Array | No | |
custom_metadata[].data_type |
String | Yes |
Valid values:
|
custom_metadata[].field_name |
String | Yes | |
chunk_overlap |
Integer | No |
Default value: 10 |
summarization_model |
String | No |
Valid values:
|
token_id |
String | No | |
rewrite_query |
Boolean | No |
Default value: false |
score_threshold |
Number | No |
Default value: 0.4 |
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:
|
cache_threshold |
String | No |
Valid values:
Default value: "close_enough" |
system_prompt_rewrite_query |
String | No | |
index_method |
Object | No |
Controls which storage backends are used during indexing. Defaults to vector-only. Default value: { "vector": true, "keyword": false } |
index_method.vector |
Boolean | Yes |
Enable vector (embedding) storage backend. |
index_method.keyword |
Boolean | Yes |
Enable keyword (BM25) storage backend. |
system_prompt_ai_search |
String | No | |
ai_gateway_id |
String | No | |
sync_interval |
No |
Interval between automatic syncs, in seconds. Allowed values: 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h). Default value: 21600 |
|
embedding_model |
String | No |
Valid values:
|
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.