PUT /accounts/{account_id}/ai-search/namespaces/{name}/instances/{id}

Update instances.

Servers

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:

  • ""
  • "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
  • "@cf/qwen/qwen3-30b-a3b-fp8"
  • "cerebras/llama-3.3-70b"
  • "@cf/zai-org/glm-4.7-flash"
  • "@cf/google/gemma-3-12b-it"
  • "google-ai-studio/gemini-2.5-pro"
  • "@cf/google/gemma-4-26b-a4b-it"
  • "@cf/meta/llama-4-scout-17b-16e-instruct"
  • "cerebras/qwen-3-235b-a22b-instruct"
  • "anthropic/claude-opus-4"
  • "@cf/meta/llama-3.1-8b-instruct-fp8"
  • "openai/gpt-5-nano"
  • "groq/llama-3.1-8b-instant"
  • "anthropic/claude-3-7-sonnet"
  • "@cf/moonshotai/kimi-k2-instruct"
  • "cerebras/qwen-3-235b-a22b-thinking"
  • "@cf/meta/llama-3.1-8b-instruct-fast"
  • "anthropic/claude-sonnet-4"
  • "cerebras/gpt-oss-120b"
  • null
  • "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
  • "cerebras/llama-4-maverick-17b-128e-instruct"
  • "grok/grok-4"
  • "cerebras/llama-4-scout-17b-16e-instruct"
  • "openai/gpt-5-mini"
  • "anthropic/claude-3-5-haiku"
  • "openai/gpt-5"
  • "@cf/moonshotai/kimi-k2.5"
  • "google-ai-studio/gemini-2.5-flash"
  • "groq/llama-3.3-70b-versatile"
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:

  • "trigram"
  • "porter"

Default value: "porter"

fusion_method String No

Valid values:

  • "max"
  • "rrf"

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:

  • ""
  • null
  • "@cf/baai/bge-reranker-base"
chunk_size Integer No
rewrite_model String No

Valid values:

  • ""
  • "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
  • "@cf/qwen/qwen3-30b-a3b-fp8"
  • "cerebras/llama-3.3-70b"
  • "@cf/zai-org/glm-4.7-flash"
  • "@cf/google/gemma-3-12b-it"
  • "google-ai-studio/gemini-2.5-pro"
  • "@cf/google/gemma-4-26b-a4b-it"
  • "@cf/meta/llama-4-scout-17b-16e-instruct"
  • "cerebras/qwen-3-235b-a22b-instruct"
  • "anthropic/claude-opus-4"
  • "@cf/meta/llama-3.1-8b-instruct-fp8"
  • "openai/gpt-5-nano"
  • "groq/llama-3.1-8b-instant"
  • "anthropic/claude-3-7-sonnet"
  • "@cf/moonshotai/kimi-k2-instruct"
  • "cerebras/qwen-3-235b-a22b-thinking"
  • "@cf/meta/llama-3.1-8b-instruct-fast"
  • "anthropic/claude-sonnet-4"
  • "cerebras/gpt-oss-120b"
  • null
  • "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
  • "cerebras/llama-4-maverick-17b-128e-instruct"
  • "grok/grok-4"
  • "cerebras/llama-4-scout-17b-16e-instruct"
  • "openai/gpt-5-mini"
  • "anthropic/claude-3-5-haiku"
  • "openai/gpt-5"
  • "@cf/moonshotai/kimi-k2.5"
  • "google-ai-studio/gemini-2.5-flash"
  • "groq/llama-3.3-70b-versatile"
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:

  • "feed-rss"
  • "crawl"
  • "sitemap"

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:

  • "r2"

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:

  • "links"
  • "sitemaps"
  • "all"

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:

  • "exists"
  • "not_exists"
  • "desc"
  • "asc"
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:

  • "and"
  • "or"

Default value: "and"

custom_metadata[] Array No
custom_metadata[].data_type String Yes

Valid values:

  • "text"
  • "boolean"
  • "datetime"
  • "number"
custom_metadata[].field_name String Yes
chunk_overlap Integer No

Default value: 10

summarization_model String No

Valid values:

  • ""
  • "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
  • "@cf/qwen/qwen3-30b-a3b-fp8"
  • "cerebras/llama-3.3-70b"
  • "@cf/zai-org/glm-4.7-flash"
  • "@cf/google/gemma-3-12b-it"
  • "google-ai-studio/gemini-2.5-pro"
  • "@cf/google/gemma-4-26b-a4b-it"
  • "@cf/meta/llama-4-scout-17b-16e-instruct"
  • "cerebras/qwen-3-235b-a22b-instruct"
  • "anthropic/claude-opus-4"
  • "@cf/meta/llama-3.1-8b-instruct-fp8"
  • "openai/gpt-5-nano"
  • "groq/llama-3.1-8b-instant"
  • "anthropic/claude-3-7-sonnet"
  • "@cf/moonshotai/kimi-k2-instruct"
  • "cerebras/qwen-3-235b-a22b-thinking"
  • "@cf/meta/llama-3.1-8b-instruct-fast"
  • "anthropic/claude-sonnet-4"
  • "cerebras/gpt-oss-120b"
  • null
  • "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
  • "cerebras/llama-4-maverick-17b-128e-instruct"
  • "grok/grok-4"
  • "cerebras/llama-4-scout-17b-16e-instruct"
  • "openai/gpt-5-mini"
  • "anthropic/claude-3-5-haiku"
  • "openai/gpt-5"
  • "@cf/moonshotai/kimi-k2.5"
  • "google-ai-studio/gemini-2.5-flash"
  • "groq/llama-3.3-70b-versatile"
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:

  • "fixed"
  • "sliding"
cache_threshold String No

Valid values:

  • "flexible_friend"
  • "super_strict_match"
  • "anything_goes"
  • "close_enough"

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:

  • ""
  • "openai/text-embedding-3-small"
  • "google-ai-studio/gemini-embedding-2-preview"
  • "openai/text-embedding-3-large"
  • null
  • "@cf/qwen/qwen3-embedding-0.6b"
  • "google-ai-studio/gemini-embedding-001"
  • "@cf/baai/bge-m3"
  • "@cf/google/embeddinggemma-300m"
  • "@cf/baai/bge-large-en-v1.5"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.