Skip to content
Start here

Update instances.

client.AISearch.Instances.Update(ctx, id, params) (*InstanceUpdateResponse, error)
PUT/accounts/{account_id}/ai-search/instances/{id}

Update instances.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
id string

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
params InstanceUpdateParams
AccountID param.Field[string]

Path param

AIGatewayID param.Field[string]optional

Body param

AISearchModel param.Field[InstanceUpdateParamsAISearchModel]optional

Body param

const InstanceUpdateParamsAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateParamsAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceUpdateParamsAISearchModelCfZaiOrgGlm4_7Flash InstanceUpdateParamsAISearchModel = "@cf/zai-org/glm-4.7-flash"
const InstanceUpdateParamsAISearchModelCfMetaLlama3_1_8bInstructFast InstanceUpdateParamsAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceUpdateParamsAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateParamsAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceUpdateParamsAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateParamsAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceUpdateParamsAISearchModelCfQwenQwen3_30bA3bFp8 InstanceUpdateParamsAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceUpdateParamsAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateParamsAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceUpdateParamsAISearchModelCfMoonshotaiKimiK2Instruct InstanceUpdateParamsAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceUpdateParamsAISearchModelCfGoogleGemma3_12bIt InstanceUpdateParamsAISearchModel = "@cf/google/gemma-3-12b-it"
const InstanceUpdateParamsAISearchModelAnthropicClaude3_7Sonnet InstanceUpdateParamsAISearchModel = "anthropic/claude-3-7-sonnet"
const InstanceUpdateParamsAISearchModelAnthropicClaudeSonnet4 InstanceUpdateParamsAISearchModel = "anthropic/claude-sonnet-4"
const InstanceUpdateParamsAISearchModelAnthropicClaudeOpus4 InstanceUpdateParamsAISearchModel = "anthropic/claude-opus-4"
const InstanceUpdateParamsAISearchModelAnthropicClaude3_5Haiku InstanceUpdateParamsAISearchModel = "anthropic/claude-3-5-haiku"
const InstanceUpdateParamsAISearchModelCerebrasQwen3_235bA22bInstruct InstanceUpdateParamsAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceUpdateParamsAISearchModelCerebrasQwen3_235bA22bThinking InstanceUpdateParamsAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceUpdateParamsAISearchModelCerebrasLlama3_3_70b InstanceUpdateParamsAISearchModel = "cerebras/llama-3.3-70b"
const InstanceUpdateParamsAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateParamsAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceUpdateParamsAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateParamsAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceUpdateParamsAISearchModelCerebrasGptOSs120b InstanceUpdateParamsAISearchModel = "cerebras/gpt-oss-120b"
const InstanceUpdateParamsAISearchModelGoogleAIStudioGemini2_5Flash InstanceUpdateParamsAISearchModel = "google-ai-studio/gemini-2.5-flash"
const InstanceUpdateParamsAISearchModelGoogleAIStudioGemini2_5Pro InstanceUpdateParamsAISearchModel = "google-ai-studio/gemini-2.5-pro"
const InstanceUpdateParamsAISearchModelGrokGrok4 InstanceUpdateParamsAISearchModel = "grok/grok-4"
const InstanceUpdateParamsAISearchModelGroqLlama3_3_70bVersatile InstanceUpdateParamsAISearchModel = "groq/llama-3.3-70b-versatile"
const InstanceUpdateParamsAISearchModelGroqLlama3_1_8bInstant InstanceUpdateParamsAISearchModel = "groq/llama-3.1-8b-instant"
const InstanceUpdateParamsAISearchModelOpenAIGpt5 InstanceUpdateParamsAISearchModel = "openai/gpt-5"
const InstanceUpdateParamsAISearchModelOpenAIGpt5Mini InstanceUpdateParamsAISearchModel = "openai/gpt-5-mini"
const InstanceUpdateParamsAISearchModelOpenAIGpt5Nano InstanceUpdateParamsAISearchModel = "openai/gpt-5-nano"
const InstanceUpdateParamsAISearchModelEmpty InstanceUpdateParamsAISearchModel = ""
Cache param.Field[bool]optional

Body param

CacheThreshold param.Field[InstanceUpdateParamsCacheThreshold]optional

Body param

const InstanceUpdateParamsCacheThresholdSuperStrictMatch InstanceUpdateParamsCacheThreshold = "super_strict_match"
const InstanceUpdateParamsCacheThresholdCloseEnough InstanceUpdateParamsCacheThreshold = "close_enough"
const InstanceUpdateParamsCacheThresholdFlexibleFriend InstanceUpdateParamsCacheThreshold = "flexible_friend"
const InstanceUpdateParamsCacheThresholdAnythingGoes InstanceUpdateParamsCacheThreshold = "anything_goes"
Chunk param.Field[bool]optional

Body param

ChunkOverlap param.Field[int64]optional

Body param

maximum30
minimum0
ChunkSize param.Field[int64]optional

Body param

minimum64
CustomMetadata param.Field[[]InstanceUpdateParamsCustomMetadata]optional

Body param

DataType InstanceUpdateParamsCustomMetadataDataType
One of the following:
const InstanceUpdateParamsCustomMetadataDataTypeText InstanceUpdateParamsCustomMetadataDataType = "text"
const InstanceUpdateParamsCustomMetadataDataTypeNumber InstanceUpdateParamsCustomMetadataDataType = "number"
const InstanceUpdateParamsCustomMetadataDataTypeBoolean InstanceUpdateParamsCustomMetadataDataType = "boolean"
const InstanceUpdateParamsCustomMetadataDataTypeDatetime InstanceUpdateParamsCustomMetadataDataType = "datetime"
FieldName string
maxLength64
minLength1
EmbeddingModel param.Field[InstanceUpdateParamsEmbeddingModel]optional

Body param

const InstanceUpdateParamsEmbeddingModelCfQwenQwen3Embedding0_6b InstanceUpdateParamsEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
const InstanceUpdateParamsEmbeddingModelCfBaaiBgeM3 InstanceUpdateParamsEmbeddingModel = "@cf/baai/bge-m3"
const InstanceUpdateParamsEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceUpdateParamsEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
const InstanceUpdateParamsEmbeddingModelCfGoogleEmbeddinggemma300m InstanceUpdateParamsEmbeddingModel = "@cf/google/embeddinggemma-300m"
const InstanceUpdateParamsEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceUpdateParamsEmbeddingModel = "google-ai-studio/gemini-embedding-001"
const InstanceUpdateParamsEmbeddingModelGoogleAIStudioGeminiEmbedding2Preview InstanceUpdateParamsEmbeddingModel = "google-ai-studio/gemini-embedding-2-preview"
const InstanceUpdateParamsEmbeddingModelOpenAITextEmbedding3Small InstanceUpdateParamsEmbeddingModel = "openai/text-embedding-3-small"
const InstanceUpdateParamsEmbeddingModelOpenAITextEmbedding3Large InstanceUpdateParamsEmbeddingModel = "openai/text-embedding-3-large"
const InstanceUpdateParamsEmbeddingModelEmpty InstanceUpdateParamsEmbeddingModel = ""
FusionMethod param.Field[InstanceUpdateParamsFusionMethod]optional

Body param

const InstanceUpdateParamsFusionMethodMax InstanceUpdateParamsFusionMethod = "max"
const InstanceUpdateParamsFusionMethodRrf InstanceUpdateParamsFusionMethod = "rrf"
HybridSearchEnabled param.Field[bool]optional

Body param

IndexingOptions param.Field[InstanceUpdateParamsIndexingOptions]optional

Body param

KeywordTokenizer InstanceUpdateParamsIndexingOptionsKeywordTokenizeroptional

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.

One of the following:
const InstanceUpdateParamsIndexingOptionsKeywordTokenizerPorter InstanceUpdateParamsIndexingOptionsKeywordTokenizer = "porter"
const InstanceUpdateParamsIndexingOptionsKeywordTokenizerTrigram InstanceUpdateParamsIndexingOptionsKeywordTokenizer = "trigram"
MaxNumResults param.Field[int64]optional

Body param

maximum50
minimum1
Metadata param.Field[InstanceUpdateParamsMetadata]optional

Body param

CreatedFromAISearchWizard booloptional
WorkerDomain stringoptional
Paused param.Field[bool]optional

Body param

PublicEndpointParams param.Field[InstanceUpdateParamsPublicEndpointParams]optional

Body param

AuthorizedHosts []stringoptional
ChatCompletionsEndpoint InstanceUpdateParamsPublicEndpointParamsChatCompletionsEndpointoptional
Disabled booloptional

Disable chat completions endpoint for this public endpoint

Enabled booloptional
Mcp InstanceUpdateParamsPublicEndpointParamsMcpoptional
Description stringoptional
Disabled booloptional

Disable MCP endpoint for this public endpoint

RateLimit InstanceUpdateParamsPublicEndpointParamsRateLimitoptional
PeriodMs int64optional
maximum3600000
minimum60000
Requests int64optional
minimum1
Technique InstanceUpdateParamsPublicEndpointParamsRateLimitTechniqueoptional
One of the following:
const InstanceUpdateParamsPublicEndpointParamsRateLimitTechniqueFixed InstanceUpdateParamsPublicEndpointParamsRateLimitTechnique = "fixed"
const InstanceUpdateParamsPublicEndpointParamsRateLimitTechniqueSliding InstanceUpdateParamsPublicEndpointParamsRateLimitTechnique = "sliding"
SearchEndpoint InstanceUpdateParamsPublicEndpointParamsSearchEndpointoptional
Disabled booloptional

Disable search endpoint for this public endpoint

Reranking param.Field[bool]optional

Body param

RerankingModel param.Field[InstanceUpdateParamsRerankingModel]optional

Body param

const InstanceUpdateParamsRerankingModelCfBaaiBgeRerankerBase InstanceUpdateParamsRerankingModel = "@cf/baai/bge-reranker-base"
const InstanceUpdateParamsRerankingModelEmpty InstanceUpdateParamsRerankingModel = ""
RetrievalOptions param.Field[InstanceUpdateParamsRetrievalOptions]optional

Body param

BoostBy []InstanceUpdateParamsRetrievalOptionsBoostByoptional

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.

Field string

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.

maxLength64
minLength1
Direction InstanceUpdateParamsRetrievalOptionsBoostByDirectionoptional

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.

One of the following:
const InstanceUpdateParamsRetrievalOptionsBoostByDirectionAsc InstanceUpdateParamsRetrievalOptionsBoostByDirection = "asc"
const InstanceUpdateParamsRetrievalOptionsBoostByDirectionDesc InstanceUpdateParamsRetrievalOptionsBoostByDirection = "desc"
const InstanceUpdateParamsRetrievalOptionsBoostByDirectionExists InstanceUpdateParamsRetrievalOptionsBoostByDirection = "exists"
const InstanceUpdateParamsRetrievalOptionsBoostByDirectionNotExists InstanceUpdateParamsRetrievalOptionsBoostByDirection = "not_exists"
KeywordMatchMode InstanceUpdateParamsRetrievalOptionsKeywordMatchModeoptional

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'. Legacy values 'exact_match' and 'fuzzy_match' are accepted and map to 'and' and 'or' respectively.

One of the following:
const InstanceUpdateParamsRetrievalOptionsKeywordMatchModeAnd InstanceUpdateParamsRetrievalOptionsKeywordMatchMode = "and"
const InstanceUpdateParamsRetrievalOptionsKeywordMatchModeOr InstanceUpdateParamsRetrievalOptionsKeywordMatchMode = "or"
RewriteModel param.Field[InstanceUpdateParamsRewriteModel]optional

Body param

const InstanceUpdateParamsRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateParamsRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceUpdateParamsRewriteModelCfZaiOrgGlm4_7Flash InstanceUpdateParamsRewriteModel = "@cf/zai-org/glm-4.7-flash"
const InstanceUpdateParamsRewriteModelCfMetaLlama3_1_8bInstructFast InstanceUpdateParamsRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceUpdateParamsRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateParamsRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceUpdateParamsRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateParamsRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceUpdateParamsRewriteModelCfQwenQwen3_30bA3bFp8 InstanceUpdateParamsRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceUpdateParamsRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateParamsRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceUpdateParamsRewriteModelCfMoonshotaiKimiK2Instruct InstanceUpdateParamsRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceUpdateParamsRewriteModelCfGoogleGemma3_12bIt InstanceUpdateParamsRewriteModel = "@cf/google/gemma-3-12b-it"
const InstanceUpdateParamsRewriteModelAnthropicClaude3_7Sonnet InstanceUpdateParamsRewriteModel = "anthropic/claude-3-7-sonnet"
const InstanceUpdateParamsRewriteModelAnthropicClaudeSonnet4 InstanceUpdateParamsRewriteModel = "anthropic/claude-sonnet-4"
const InstanceUpdateParamsRewriteModelAnthropicClaudeOpus4 InstanceUpdateParamsRewriteModel = "anthropic/claude-opus-4"
const InstanceUpdateParamsRewriteModelAnthropicClaude3_5Haiku InstanceUpdateParamsRewriteModel = "anthropic/claude-3-5-haiku"
const InstanceUpdateParamsRewriteModelCerebrasQwen3_235bA22bInstruct InstanceUpdateParamsRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceUpdateParamsRewriteModelCerebrasQwen3_235bA22bThinking InstanceUpdateParamsRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceUpdateParamsRewriteModelCerebrasLlama3_3_70b InstanceUpdateParamsRewriteModel = "cerebras/llama-3.3-70b"
const InstanceUpdateParamsRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateParamsRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceUpdateParamsRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateParamsRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceUpdateParamsRewriteModelCerebrasGptOSs120b InstanceUpdateParamsRewriteModel = "cerebras/gpt-oss-120b"
const InstanceUpdateParamsRewriteModelGoogleAIStudioGemini2_5Flash InstanceUpdateParamsRewriteModel = "google-ai-studio/gemini-2.5-flash"
const InstanceUpdateParamsRewriteModelGoogleAIStudioGemini2_5Pro InstanceUpdateParamsRewriteModel = "google-ai-studio/gemini-2.5-pro"
const InstanceUpdateParamsRewriteModelGrokGrok4 InstanceUpdateParamsRewriteModel = "grok/grok-4"
const InstanceUpdateParamsRewriteModelGroqLlama3_3_70bVersatile InstanceUpdateParamsRewriteModel = "groq/llama-3.3-70b-versatile"
const InstanceUpdateParamsRewriteModelGroqLlama3_1_8bInstant InstanceUpdateParamsRewriteModel = "groq/llama-3.1-8b-instant"
const InstanceUpdateParamsRewriteModelOpenAIGpt5 InstanceUpdateParamsRewriteModel = "openai/gpt-5"
const InstanceUpdateParamsRewriteModelOpenAIGpt5Mini InstanceUpdateParamsRewriteModel = "openai/gpt-5-mini"
const InstanceUpdateParamsRewriteModelOpenAIGpt5Nano InstanceUpdateParamsRewriteModel = "openai/gpt-5-nano"
const InstanceUpdateParamsRewriteModelEmpty InstanceUpdateParamsRewriteModel = ""
RewriteQuery param.Field[bool]optional

Body param

ScoreThreshold param.Field[float64]optional

Body param

maximum1
minimum0
SourceParams param.Field[InstanceUpdateParamsSourceParams]optional

Body param

ExcludeItems []stringoptional

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)

IncludeItems []stringoptional

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)

Prefix stringoptional
R2Jurisdiction stringoptional
WebCrawler InstanceUpdateParamsSourceParamsWebCrawleroptional
CrawlOptions InstanceUpdateParamsSourceParamsWebCrawlerCrawlOptionsoptional
Depth float64optional
maximum100000
minimum1
IncludeSubdomains booloptional
MaxAge float64optional
maximum604800
minimum0
Source InstanceUpdateParamsSourceParamsWebCrawlerCrawlOptionsSourceoptional
One of the following:
const InstanceUpdateParamsSourceParamsWebCrawlerCrawlOptionsSourceAll InstanceUpdateParamsSourceParamsWebCrawlerCrawlOptionsSource = "all"
const InstanceUpdateParamsSourceParamsWebCrawlerCrawlOptionsSourceSitemaps InstanceUpdateParamsSourceParamsWebCrawlerCrawlOptionsSource = "sitemaps"
const InstanceUpdateParamsSourceParamsWebCrawlerCrawlOptionsSourceLinks InstanceUpdateParamsSourceParamsWebCrawlerCrawlOptionsSource = "links"
ParseOptions InstanceUpdateParamsSourceParamsWebCrawlerParseOptionsoptional
ContentSelector []InstanceUpdateParamsSourceParamsWebCrawlerParseOptionsContentSelectoroptional

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.

Path string

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

maxLength200
Selector string

CSS selector to extract content from pages matching the path pattern. Supports standard CSS selectors including class, ID, element, and attribute selectors.

maxLength200
IncludeHeaders map[string, string]optional
IncludeImages booloptional
SpecificSitemaps []stringoptional

List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'.

UseBrowserRendering booloptional
ParseType InstanceUpdateParamsSourceParamsWebCrawlerParseTypeoptional
One of the following:
const InstanceUpdateParamsSourceParamsWebCrawlerParseTypeSitemap InstanceUpdateParamsSourceParamsWebCrawlerParseType = "sitemap"
const InstanceUpdateParamsSourceParamsWebCrawlerParseTypeFeedRss InstanceUpdateParamsSourceParamsWebCrawlerParseType = "feed-rss"
const InstanceUpdateParamsSourceParamsWebCrawlerParseTypeCrawl InstanceUpdateParamsSourceParamsWebCrawlerParseType = "crawl"
StoreOptions InstanceUpdateParamsSourceParamsWebCrawlerStoreOptionsoptional
StorageID string
R2Jurisdiction stringoptional
StorageType Provideroptional
Summarization param.Field[bool]optional

Body param

SummarizationModel param.Field[InstanceUpdateParamsSummarizationModel]optional

Body param

const InstanceUpdateParamsSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateParamsSummarizationModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceUpdateParamsSummarizationModelCfZaiOrgGlm4_7Flash InstanceUpdateParamsSummarizationModel = "@cf/zai-org/glm-4.7-flash"
const InstanceUpdateParamsSummarizationModelCfMetaLlama3_1_8bInstructFast InstanceUpdateParamsSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceUpdateParamsSummarizationModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateParamsSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceUpdateParamsSummarizationModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateParamsSummarizationModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceUpdateParamsSummarizationModelCfQwenQwen3_30bA3bFp8 InstanceUpdateParamsSummarizationModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceUpdateParamsSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateParamsSummarizationModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceUpdateParamsSummarizationModelCfMoonshotaiKimiK2Instruct InstanceUpdateParamsSummarizationModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceUpdateParamsSummarizationModelCfGoogleGemma3_12bIt InstanceUpdateParamsSummarizationModel = "@cf/google/gemma-3-12b-it"
const InstanceUpdateParamsSummarizationModelAnthropicClaude3_7Sonnet InstanceUpdateParamsSummarizationModel = "anthropic/claude-3-7-sonnet"
const InstanceUpdateParamsSummarizationModelAnthropicClaudeSonnet4 InstanceUpdateParamsSummarizationModel = "anthropic/claude-sonnet-4"
const InstanceUpdateParamsSummarizationModelAnthropicClaudeOpus4 InstanceUpdateParamsSummarizationModel = "anthropic/claude-opus-4"
const InstanceUpdateParamsSummarizationModelAnthropicClaude3_5Haiku InstanceUpdateParamsSummarizationModel = "anthropic/claude-3-5-haiku"
const InstanceUpdateParamsSummarizationModelCerebrasQwen3_235bA22bInstruct InstanceUpdateParamsSummarizationModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceUpdateParamsSummarizationModelCerebrasQwen3_235bA22bThinking InstanceUpdateParamsSummarizationModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceUpdateParamsSummarizationModelCerebrasLlama3_3_70b InstanceUpdateParamsSummarizationModel = "cerebras/llama-3.3-70b"
const InstanceUpdateParamsSummarizationModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateParamsSummarizationModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceUpdateParamsSummarizationModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateParamsSummarizationModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceUpdateParamsSummarizationModelCerebrasGptOSs120b InstanceUpdateParamsSummarizationModel = "cerebras/gpt-oss-120b"
const InstanceUpdateParamsSummarizationModelGoogleAIStudioGemini2_5Flash InstanceUpdateParamsSummarizationModel = "google-ai-studio/gemini-2.5-flash"
const InstanceUpdateParamsSummarizationModelGoogleAIStudioGemini2_5Pro InstanceUpdateParamsSummarizationModel = "google-ai-studio/gemini-2.5-pro"
const InstanceUpdateParamsSummarizationModelGrokGrok4 InstanceUpdateParamsSummarizationModel = "grok/grok-4"
const InstanceUpdateParamsSummarizationModelGroqLlama3_3_70bVersatile InstanceUpdateParamsSummarizationModel = "groq/llama-3.3-70b-versatile"
const InstanceUpdateParamsSummarizationModelGroqLlama3_1_8bInstant InstanceUpdateParamsSummarizationModel = "groq/llama-3.1-8b-instant"
const InstanceUpdateParamsSummarizationModelOpenAIGpt5 InstanceUpdateParamsSummarizationModel = "openai/gpt-5"
const InstanceUpdateParamsSummarizationModelOpenAIGpt5Mini InstanceUpdateParamsSummarizationModel = "openai/gpt-5-mini"
const InstanceUpdateParamsSummarizationModelOpenAIGpt5Nano InstanceUpdateParamsSummarizationModel = "openai/gpt-5-nano"
const InstanceUpdateParamsSummarizationModelEmpty InstanceUpdateParamsSummarizationModel = ""
SystemPromptIndexSummarization param.Field[string]optional

Body param

SystemPromptRewriteQuery param.Field[string]optional

Body param

TokenID param.Field[string]optional

Body param

formatuuid
ReturnsExpand Collapse
type InstanceUpdateResponse struct{…}
ID string

AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.

maxLength64
minLength1
CreatedAt Time
formatdate-time
ModifiedAt Time
formatdate-time
AIGatewayID stringoptional
AISearchModel InstanceUpdateResponseAISearchModeloptional
One of the following:
const InstanceUpdateResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateResponseAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceUpdateResponseAISearchModelCfZaiOrgGlm4_7Flash InstanceUpdateResponseAISearchModel = "@cf/zai-org/glm-4.7-flash"
const InstanceUpdateResponseAISearchModelCfMetaLlama3_1_8bInstructFast InstanceUpdateResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceUpdateResponseAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceUpdateResponseAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateResponseAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceUpdateResponseAISearchModelCfQwenQwen3_30bA3bFp8 InstanceUpdateResponseAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceUpdateResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateResponseAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceUpdateResponseAISearchModelCfMoonshotaiKimiK2Instruct InstanceUpdateResponseAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceUpdateResponseAISearchModelCfGoogleGemma3_12bIt InstanceUpdateResponseAISearchModel = "@cf/google/gemma-3-12b-it"
const InstanceUpdateResponseAISearchModelAnthropicClaude3_7Sonnet InstanceUpdateResponseAISearchModel = "anthropic/claude-3-7-sonnet"
const InstanceUpdateResponseAISearchModelAnthropicClaudeSonnet4 InstanceUpdateResponseAISearchModel = "anthropic/claude-sonnet-4"
const InstanceUpdateResponseAISearchModelAnthropicClaudeOpus4 InstanceUpdateResponseAISearchModel = "anthropic/claude-opus-4"
const InstanceUpdateResponseAISearchModelAnthropicClaude3_5Haiku InstanceUpdateResponseAISearchModel = "anthropic/claude-3-5-haiku"
const InstanceUpdateResponseAISearchModelCerebrasQwen3_235bA22bInstruct InstanceUpdateResponseAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceUpdateResponseAISearchModelCerebrasQwen3_235bA22bThinking InstanceUpdateResponseAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceUpdateResponseAISearchModelCerebrasLlama3_3_70b InstanceUpdateResponseAISearchModel = "cerebras/llama-3.3-70b"
const InstanceUpdateResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateResponseAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceUpdateResponseAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateResponseAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceUpdateResponseAISearchModelCerebrasGptOSs120b InstanceUpdateResponseAISearchModel = "cerebras/gpt-oss-120b"
const InstanceUpdateResponseAISearchModelGoogleAIStudioGemini2_5Flash InstanceUpdateResponseAISearchModel = "google-ai-studio/gemini-2.5-flash"
const InstanceUpdateResponseAISearchModelGoogleAIStudioGemini2_5Pro InstanceUpdateResponseAISearchModel = "google-ai-studio/gemini-2.5-pro"
const InstanceUpdateResponseAISearchModelGrokGrok4 InstanceUpdateResponseAISearchModel = "grok/grok-4"
const InstanceUpdateResponseAISearchModelGroqLlama3_3_70bVersatile InstanceUpdateResponseAISearchModel = "groq/llama-3.3-70b-versatile"
const InstanceUpdateResponseAISearchModelGroqLlama3_1_8bInstant InstanceUpdateResponseAISearchModel = "groq/llama-3.1-8b-instant"
const InstanceUpdateResponseAISearchModelOpenAIGpt5 InstanceUpdateResponseAISearchModel = "openai/gpt-5"
const InstanceUpdateResponseAISearchModelOpenAIGpt5Mini InstanceUpdateResponseAISearchModel = "openai/gpt-5-mini"
const InstanceUpdateResponseAISearchModelOpenAIGpt5Nano InstanceUpdateResponseAISearchModel = "openai/gpt-5-nano"
const InstanceUpdateResponseAISearchModelEmpty InstanceUpdateResponseAISearchModel = ""
Cache booloptional
CacheThreshold InstanceUpdateResponseCacheThresholdoptional
One of the following:
const InstanceUpdateResponseCacheThresholdSuperStrictMatch InstanceUpdateResponseCacheThreshold = "super_strict_match"
const InstanceUpdateResponseCacheThresholdCloseEnough InstanceUpdateResponseCacheThreshold = "close_enough"
const InstanceUpdateResponseCacheThresholdFlexibleFriend InstanceUpdateResponseCacheThreshold = "flexible_friend"
const InstanceUpdateResponseCacheThresholdAnythingGoes InstanceUpdateResponseCacheThreshold = "anything_goes"
ChunkOverlap int64optional
maximum30
minimum0
ChunkSize int64optional
minimum64
CreatedBy stringoptional
CustomMetadata []InstanceUpdateResponseCustomMetadataoptional
DataType InstanceUpdateResponseCustomMetadataDataType
One of the following:
const InstanceUpdateResponseCustomMetadataDataTypeText InstanceUpdateResponseCustomMetadataDataType = "text"
const InstanceUpdateResponseCustomMetadataDataTypeNumber InstanceUpdateResponseCustomMetadataDataType = "number"
const InstanceUpdateResponseCustomMetadataDataTypeBoolean InstanceUpdateResponseCustomMetadataDataType = "boolean"
const InstanceUpdateResponseCustomMetadataDataTypeDatetime InstanceUpdateResponseCustomMetadataDataType = "datetime"
FieldName string
maxLength64
minLength1
EmbeddingModel InstanceUpdateResponseEmbeddingModeloptional
One of the following:
const InstanceUpdateResponseEmbeddingModelCfQwenQwen3Embedding0_6b InstanceUpdateResponseEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
const InstanceUpdateResponseEmbeddingModelCfBaaiBgeM3 InstanceUpdateResponseEmbeddingModel = "@cf/baai/bge-m3"
const InstanceUpdateResponseEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceUpdateResponseEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
const InstanceUpdateResponseEmbeddingModelCfGoogleEmbeddinggemma300m InstanceUpdateResponseEmbeddingModel = "@cf/google/embeddinggemma-300m"
const InstanceUpdateResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceUpdateResponseEmbeddingModel = "google-ai-studio/gemini-embedding-001"
const InstanceUpdateResponseEmbeddingModelGoogleAIStudioGeminiEmbedding2Preview InstanceUpdateResponseEmbeddingModel = "google-ai-studio/gemini-embedding-2-preview"
const InstanceUpdateResponseEmbeddingModelOpenAITextEmbedding3Small InstanceUpdateResponseEmbeddingModel = "openai/text-embedding-3-small"
const InstanceUpdateResponseEmbeddingModelOpenAITextEmbedding3Large InstanceUpdateResponseEmbeddingModel = "openai/text-embedding-3-large"
const InstanceUpdateResponseEmbeddingModelEmpty InstanceUpdateResponseEmbeddingModel = ""
Enable booloptional
EngineVersion float64optional
FusionMethod InstanceUpdateResponseFusionMethodoptional
One of the following:
const InstanceUpdateResponseFusionMethodMax InstanceUpdateResponseFusionMethod = "max"
const InstanceUpdateResponseFusionMethodRrf InstanceUpdateResponseFusionMethod = "rrf"
HybridSearchEnabled booloptional
IndexingOptions InstanceUpdateResponseIndexingOptionsoptional
KeywordTokenizer InstanceUpdateResponseIndexingOptionsKeywordTokenizeroptional

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.

One of the following:
const InstanceUpdateResponseIndexingOptionsKeywordTokenizerPorter InstanceUpdateResponseIndexingOptionsKeywordTokenizer = "porter"
const InstanceUpdateResponseIndexingOptionsKeywordTokenizerTrigram InstanceUpdateResponseIndexingOptionsKeywordTokenizer = "trigram"
LastActivity Timeoptional
formatdate-time
MaxNumResults int64optional
maximum50
minimum1
Metadata InstanceUpdateResponseMetadataoptional
CreatedFromAISearchWizard booloptional
WorkerDomain stringoptional
ModifiedBy stringoptional
Namespace stringoptional
maxLength32
minLength1
Paused booloptional
PublicEndpointID stringoptional
PublicEndpointParams InstanceUpdateResponsePublicEndpointParamsoptional
AuthorizedHosts []stringoptional
ChatCompletionsEndpoint InstanceUpdateResponsePublicEndpointParamsChatCompletionsEndpointoptional
Disabled booloptional

Disable chat completions endpoint for this public endpoint

Enabled booloptional
Mcp InstanceUpdateResponsePublicEndpointParamsMcpoptional
Description stringoptional
Disabled booloptional

Disable MCP endpoint for this public endpoint

RateLimit InstanceUpdateResponsePublicEndpointParamsRateLimitoptional
PeriodMs int64optional
maximum3600000
minimum60000
Requests int64optional
minimum1
Technique InstanceUpdateResponsePublicEndpointParamsRateLimitTechniqueoptional
One of the following:
const InstanceUpdateResponsePublicEndpointParamsRateLimitTechniqueFixed InstanceUpdateResponsePublicEndpointParamsRateLimitTechnique = "fixed"
const InstanceUpdateResponsePublicEndpointParamsRateLimitTechniqueSliding InstanceUpdateResponsePublicEndpointParamsRateLimitTechnique = "sliding"
SearchEndpoint InstanceUpdateResponsePublicEndpointParamsSearchEndpointoptional
Disabled booloptional

Disable search endpoint for this public endpoint

Reranking booloptional
RerankingModel InstanceUpdateResponseRerankingModeloptional
One of the following:
const InstanceUpdateResponseRerankingModelCfBaaiBgeRerankerBase InstanceUpdateResponseRerankingModel = "@cf/baai/bge-reranker-base"
const InstanceUpdateResponseRerankingModelEmpty InstanceUpdateResponseRerankingModel = ""
RetrievalOptions InstanceUpdateResponseRetrievalOptionsoptional
BoostBy []InstanceUpdateResponseRetrievalOptionsBoostByoptional

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.

Field string

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.

maxLength64
minLength1
Direction InstanceUpdateResponseRetrievalOptionsBoostByDirectionoptional

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.

One of the following:
const InstanceUpdateResponseRetrievalOptionsBoostByDirectionAsc InstanceUpdateResponseRetrievalOptionsBoostByDirection = "asc"
const InstanceUpdateResponseRetrievalOptionsBoostByDirectionDesc InstanceUpdateResponseRetrievalOptionsBoostByDirection = "desc"
const InstanceUpdateResponseRetrievalOptionsBoostByDirectionExists InstanceUpdateResponseRetrievalOptionsBoostByDirection = "exists"
const InstanceUpdateResponseRetrievalOptionsBoostByDirectionNotExists InstanceUpdateResponseRetrievalOptionsBoostByDirection = "not_exists"
KeywordMatchMode InstanceUpdateResponseRetrievalOptionsKeywordMatchModeoptional

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'. Legacy values 'exact_match' and 'fuzzy_match' are accepted and map to 'and' and 'or' respectively.

One of the following:
const InstanceUpdateResponseRetrievalOptionsKeywordMatchModeAnd InstanceUpdateResponseRetrievalOptionsKeywordMatchMode = "and"
const InstanceUpdateResponseRetrievalOptionsKeywordMatchModeOr InstanceUpdateResponseRetrievalOptionsKeywordMatchMode = "or"
RewriteModel InstanceUpdateResponseRewriteModeloptional
One of the following:
const InstanceUpdateResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateResponseRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
const InstanceUpdateResponseRewriteModelCfZaiOrgGlm4_7Flash InstanceUpdateResponseRewriteModel = "@cf/zai-org/glm-4.7-flash"
const InstanceUpdateResponseRewriteModelCfMetaLlama3_1_8bInstructFast InstanceUpdateResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
const InstanceUpdateResponseRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
const InstanceUpdateResponseRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateResponseRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
const InstanceUpdateResponseRewriteModelCfQwenQwen3_30bA3bFp8 InstanceUpdateResponseRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
const InstanceUpdateResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateResponseRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
const InstanceUpdateResponseRewriteModelCfMoonshotaiKimiK2Instruct InstanceUpdateResponseRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
const InstanceUpdateResponseRewriteModelCfGoogleGemma3_12bIt InstanceUpdateResponseRewriteModel = "@cf/google/gemma-3-12b-it"
const InstanceUpdateResponseRewriteModelAnthropicClaude3_7Sonnet InstanceUpdateResponseRewriteModel = "anthropic/claude-3-7-sonnet"
const InstanceUpdateResponseRewriteModelAnthropicClaudeSonnet4 InstanceUpdateResponseRewriteModel = "anthropic/claude-sonnet-4"
const InstanceUpdateResponseRewriteModelAnthropicClaudeOpus4 InstanceUpdateResponseRewriteModel = "anthropic/claude-opus-4"
const InstanceUpdateResponseRewriteModelAnthropicClaude3_5Haiku InstanceUpdateResponseRewriteModel = "anthropic/claude-3-5-haiku"
const InstanceUpdateResponseRewriteModelCerebrasQwen3_235bA22bInstruct InstanceUpdateResponseRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
const InstanceUpdateResponseRewriteModelCerebrasQwen3_235bA22bThinking InstanceUpdateResponseRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
const InstanceUpdateResponseRewriteModelCerebrasLlama3_3_70b InstanceUpdateResponseRewriteModel = "cerebras/llama-3.3-70b"
const InstanceUpdateResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateResponseRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
const InstanceUpdateResponseRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateResponseRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
const InstanceUpdateResponseRewriteModelCerebrasGptOSs120b InstanceUpdateResponseRewriteModel = "cerebras/gpt-oss-120b"
const InstanceUpdateResponseRewriteModelGoogleAIStudioGemini2_5Flash InstanceUpdateResponseRewriteModel = "google-ai-studio/gemini-2.5-flash"
const InstanceUpdateResponseRewriteModelGoogleAIStudioGemini2_5Pro InstanceUpdateResponseRewriteModel = "google-ai-studio/gemini-2.5-pro"
const InstanceUpdateResponseRewriteModelGrokGrok4 InstanceUpdateResponseRewriteModel = "grok/grok-4"
const InstanceUpdateResponseRewriteModelGroqLlama3_3_70bVersatile InstanceUpdateResponseRewriteModel = "groq/llama-3.3-70b-versatile"
const InstanceUpdateResponseRewriteModelGroqLlama3_1_8bInstant InstanceUpdateResponseRewriteModel = "groq/llama-3.1-8b-instant"
const InstanceUpdateResponseRewriteModelOpenAIGpt5 InstanceUpdateResponseRewriteModel = "openai/gpt-5"
const InstanceUpdateResponseRewriteModelOpenAIGpt5Mini InstanceUpdateResponseRewriteModel = "openai/gpt-5-mini"
const InstanceUpdateResponseRewriteModelOpenAIGpt5Nano InstanceUpdateResponseRewriteModel = "openai/gpt-5-nano"
const InstanceUpdateResponseRewriteModelEmpty InstanceUpdateResponseRewriteModel = ""
RewriteQuery booloptional
ScoreThreshold float64optional
maximum1
minimum0
Source stringoptional
SourceParams InstanceUpdateResponseSourceParamsoptional
ExcludeItems []stringoptional

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)

IncludeItems []stringoptional

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)

Prefix stringoptional
R2Jurisdiction stringoptional
WebCrawler InstanceUpdateResponseSourceParamsWebCrawleroptional
CrawlOptions InstanceUpdateResponseSourceParamsWebCrawlerCrawlOptionsoptional
Depth float64optional
maximum100000
minimum1
IncludeSubdomains booloptional
MaxAge float64optional
maximum604800
minimum0
Source InstanceUpdateResponseSourceParamsWebCrawlerCrawlOptionsSourceoptional
One of the following:
const InstanceUpdateResponseSourceParamsWebCrawlerCrawlOptionsSourceAll InstanceUpdateResponseSourceParamsWebCrawlerCrawlOptionsSource = "all"
const InstanceUpdateResponseSourceParamsWebCrawlerCrawlOptionsSourceSitemaps InstanceUpdateResponseSourceParamsWebCrawlerCrawlOptionsSource = "sitemaps"
const InstanceUpdateResponseSourceParamsWebCrawlerCrawlOptionsSourceLinks InstanceUpdateResponseSourceParamsWebCrawlerCrawlOptionsSource = "links"
ParseOptions InstanceUpdateResponseSourceParamsWebCrawlerParseOptionsoptional
ContentSelector []InstanceUpdateResponseSourceParamsWebCrawlerParseOptionsContentSelectoroptional

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.

Path string

Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.

maxLength200
Selector string

CSS selector to extract content from pages matching the path pattern. Supports standard CSS selectors including class, ID, element, and attribute selectors.

maxLength200
IncludeHeaders map[string, string]optional
IncludeImages booloptional
SpecificSitemaps []stringoptional

List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'.

UseBrowserRendering booloptional
ParseType InstanceUpdateResponseSourceParamsWebCrawlerParseTypeoptional
One of the following:
const InstanceUpdateResponseSourceParamsWebCrawlerParseTypeSitemap InstanceUpdateResponseSourceParamsWebCrawlerParseType = "sitemap"
const InstanceUpdateResponseSourceParamsWebCrawlerParseTypeFeedRss InstanceUpdateResponseSourceParamsWebCrawlerParseType = "feed-rss"
const InstanceUpdateResponseSourceParamsWebCrawlerParseTypeCrawl InstanceUpdateResponseSourceParamsWebCrawlerParseType = "crawl"
StoreOptions InstanceUpdateResponseSourceParamsWebCrawlerStoreOptionsoptional
StorageID string
R2Jurisdiction stringoptional
StorageType Provideroptional
Status stringoptional
TokenID stringoptional
formatuuid
Type InstanceUpdateResponseTypeoptional
One of the following:
const InstanceUpdateResponseTypeR2 InstanceUpdateResponseType = "r2"
const InstanceUpdateResponseTypeWebCrawler InstanceUpdateResponseType = "web-crawler"

Update instances.

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/ai_search"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  instance, err := client.AISearch.Instances.Update(
    context.TODO(),
    "my-ai-search",
    ai_search.InstanceUpdateParams{
      AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", instance.ID)
}
{
  "result": {
    "id": "my-ai-search",
    "created_at": "2019-12-27T18:11:19.117Z",
    "modified_at": "2019-12-27T18:11:19.117Z",
    "ai_gateway_id": "ai_gateway_id",
    "ai_search_model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "cache": true,
    "cache_threshold": "super_strict_match",
    "chunk_overlap": 0,
    "chunk_size": 64,
    "created_by": "created_by",
    "custom_metadata": [
      {
        "data_type": "text",
        "field_name": "x"
      }
    ],
    "embedding_model": "@cf/qwen/qwen3-embedding-0.6b",
    "enable": true,
    "engine_version": 0,
    "fusion_method": "max",
    "hybrid_search_enabled": true,
    "indexing_options": {
      "keyword_tokenizer": "porter"
    },
    "last_activity": "2019-12-27T18:11:19.117Z",
    "max_num_results": 1,
    "metadata": {
      "created_from_aisearch_wizard": true,
      "worker_domain": "worker_domain"
    },
    "modified_by": "modified_by",
    "namespace": "x",
    "paused": true,
    "public_endpoint_id": "public_endpoint_id",
    "public_endpoint_params": {
      "authorized_hosts": [
        "string"
      ],
      "chat_completions_endpoint": {
        "disabled": true
      },
      "enabled": true,
      "mcp": {
        "description": "description",
        "disabled": true
      },
      "rate_limit": {
        "period_ms": 60000,
        "requests": 1,
        "technique": "fixed"
      },
      "search_endpoint": {
        "disabled": true
      }
    },
    "reranking": true,
    "reranking_model": "@cf/baai/bge-reranker-base",
    "retrieval_options": {
      "boost_by": [
        {
          "field": "timestamp",
          "direction": "desc"
        }
      ],
      "keyword_match_mode": "and"
    },
    "rewrite_model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "rewrite_query": true,
    "score_threshold": 0,
    "source": "source",
    "source_params": {
      "exclude_items": [
        "/admin/**",
        "/private/**",
        "**\\temp\\**"
      ],
      "include_items": [
        "/blog/**",
        "/docs/**/*.html",
        "**\\blog\\**.html"
      ],
      "prefix": "prefix",
      "r2_jurisdiction": "r2_jurisdiction",
      "web_crawler": {
        "crawl_options": {
          "depth": 1,
          "include_external_links": true,
          "include_subdomains": true,
          "max_age": 0,
          "source": "all"
        },
        "parse_options": {
          "content_selector": [
            {
              "path": "**/blog/**",
              "selector": "article .post-body"
            }
          ],
          "include_headers": {
            "foo": "string"
          },
          "include_images": true,
          "specific_sitemaps": [
            "https://example.com/sitemap.xml",
            "https://example.com/blog-sitemap.xml"
          ],
          "use_browser_rendering": true
        },
        "parse_type": "sitemap",
        "store_options": {
          "storage_id": "storage_id",
          "r2_jurisdiction": "r2_jurisdiction",
          "storage_type": "r2"
        }
      }
    },
    "status": "status",
    "token_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "type": "r2"
  },
  "success": true
}
Returns Examples
{
  "result": {
    "id": "my-ai-search",
    "created_at": "2019-12-27T18:11:19.117Z",
    "modified_at": "2019-12-27T18:11:19.117Z",
    "ai_gateway_id": "ai_gateway_id",
    "ai_search_model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "cache": true,
    "cache_threshold": "super_strict_match",
    "chunk_overlap": 0,
    "chunk_size": 64,
    "created_by": "created_by",
    "custom_metadata": [
      {
        "data_type": "text",
        "field_name": "x"
      }
    ],
    "embedding_model": "@cf/qwen/qwen3-embedding-0.6b",
    "enable": true,
    "engine_version": 0,
    "fusion_method": "max",
    "hybrid_search_enabled": true,
    "indexing_options": {
      "keyword_tokenizer": "porter"
    },
    "last_activity": "2019-12-27T18:11:19.117Z",
    "max_num_results": 1,
    "metadata": {
      "created_from_aisearch_wizard": true,
      "worker_domain": "worker_domain"
    },
    "modified_by": "modified_by",
    "namespace": "x",
    "paused": true,
    "public_endpoint_id": "public_endpoint_id",
    "public_endpoint_params": {
      "authorized_hosts": [
        "string"
      ],
      "chat_completions_endpoint": {
        "disabled": true
      },
      "enabled": true,
      "mcp": {
        "description": "description",
        "disabled": true
      },
      "rate_limit": {
        "period_ms": 60000,
        "requests": 1,
        "technique": "fixed"
      },
      "search_endpoint": {
        "disabled": true
      }
    },
    "reranking": true,
    "reranking_model": "@cf/baai/bge-reranker-base",
    "retrieval_options": {
      "boost_by": [
        {
          "field": "timestamp",
          "direction": "desc"
        }
      ],
      "keyword_match_mode": "and"
    },
    "rewrite_model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "rewrite_query": true,
    "score_threshold": 0,
    "source": "source",
    "source_params": {
      "exclude_items": [
        "/admin/**",
        "/private/**",
        "**\\temp\\**"
      ],
      "include_items": [
        "/blog/**",
        "/docs/**/*.html",
        "**\\blog\\**.html"
      ],
      "prefix": "prefix",
      "r2_jurisdiction": "r2_jurisdiction",
      "web_crawler": {
        "crawl_options": {
          "depth": 1,
          "include_external_links": true,
          "include_subdomains": true,
          "max_age": 0,
          "source": "all"
        },
        "parse_options": {
          "content_selector": [
            {
              "path": "**/blog/**",
              "selector": "article .post-body"
            }
          ],
          "include_headers": {
            "foo": "string"
          },
          "include_images": true,
          "specific_sitemaps": [
            "https://example.com/sitemap.xml",
            "https://example.com/blog-sitemap.xml"
          ],
          "use_browser_rendering": true
        },
        "parse_type": "sitemap",
        "store_options": {
          "storage_id": "storage_id",
          "r2_jurisdiction": "r2_jurisdiction",
          "storage_type": "r2"
        }
      }
    },
    "status": "status",
    "token_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "type": "r2"
  },
  "success": true
}