{"openapi":"3.1.0","info":{"title":"Cloudflare AI Search (BYOK) API","version":"0.1.0","description":"Cloudflare AI Search (BYOK) lets an AI assistant read your own Cloudflare AI Search data through the Cloudflare AI Search API with a key you supply (Cloudflare API token with AI Search read permission). Read-only: 6 tools (list_namespaces, list_instances, get_instance, get_instance_stats, list_instance_jobs, list_instance_items). The BYOK key travels with each request, is used for that one call...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-cloudflare-ai-search.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-cloudflare-ai-search/docs"},"termsOfService":"https://connectorbay.com/byok-cloudflare-ai-search/terms"},"servers":[{"url":"https://byok-cloudflare-ai-search.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-cloudflare-ai-search/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_namespaces":{"post":{"operationId":"list_namespaces","summary":"List the account's AI Search namespaces with description and creation time. Reads configuration or status only: it runs ","description":"List the account's AI Search namespaces with description and creation time. Reads configuration or status only: it runs no search or model and costs nothing. Use for \"Which AI Search namespaces do I have in Cloudflare\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL or returned by the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only namespaces whose name or description contains this text.","title":"Search"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many namespaces to return (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_namespacesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_instances":{"post":{"operationId":"list_instances","summary":"List the AI Search instances in a namespace with status, data source type, embedding and generation models, chunking and","description":"List the AI Search instances in a namespace with status, data source type, embedding and generation models, chunking and retrieval settings. Reads configuration or status only: it runs no search or model and costs nothing. Use for \"What AI Search instances exist in my default Cloudflare namespace\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL or returned by the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"namespace":{"description":"AI Search namespace name; use 'default' for the default namespace.","maxLength":64,"title":"Namespace","type":"string"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only instances whose id contains this text.","title":"Search"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many instances to return (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id","namespace"],"title":"list_instancesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_instance":{"post":{"operationId":"get_instance","summary":"Get one AI Search instance's configuration and status: source, models, chunking, caching, reranking and retrieval limits","description":"Get one AI Search instance's configuration and status: source, models, chunking, caching, reranking and retrieval limits. Reads configuration or status only: it runs no search or model and costs nothing. Use for \"Show the settings of my Cloudflare AI Search instance docs-search\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL or returned by the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"namespace":{"description":"AI Search namespace name; use 'default' for the default namespace.","maxLength":64,"title":"Namespace","type":"string"},"id":{"description":"AI Search instance id (lowercase letters, digits, hyphens, underscores), as returned by list_instances.","maxLength":64,"title":"Id","type":"string"}},"required":["account_id","namespace","id"],"title":"get_instanceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_instance_stats":{"post":{"operationId":"get_instance_stats","summary":"Get indexing statistics of one AI Search instance: counts of completed, queued, running, errored, skipped and outdated i","description":"Get indexing statistics of one AI Search instance: counts of completed, queued, running, errored, skipped and outdated items, and last activity. Reads configuration or status only: it runs no search or model and costs nothing. Use for \"How many files of my Cloudflare AI Search instance docs-search are indexed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL or returned by the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"namespace":{"description":"AI Search namespace name; use 'default' for the default namespace.","maxLength":64,"title":"Namespace","type":"string"},"id":{"description":"AI Search instance id (lowercase letters, digits, hyphens, underscores), as returned by list_instances.","maxLength":64,"title":"Id","type":"string"}},"required":["account_id","namespace","id"],"title":"get_instance_statsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_instance_jobs":{"post":{"operationId":"list_instance_jobs","summary":"List indexing jobs of one AI Search instance: start and end time, who started it (user or schedule), end reason and desc","description":"List indexing jobs of one AI Search instance: start and end time, who started it (user or schedule), end reason and description. Reads configuration or status only: it runs no search or model and costs nothing. Use for \"Did the last indexing job of my Cloudflare AI Search instance docs-search finish\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL or returned by the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"namespace":{"description":"AI Search namespace name; use 'default' for the default namespace.","maxLength":64,"title":"Namespace","type":"string"},"id":{"description":"AI Search instance id (lowercase letters, digits, hyphens, underscores), as returned by list_instances.","maxLength":64,"title":"Id","type":"string"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id","namespace","id"],"title":"list_instance_jobsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_instance_items":{"post":{"operationId":"list_instance_items","summary":"List indexed items (files or pages) of one AI Search instance with key, status, size, chunk count and any error. Filter ","description":"List indexed items (files or pages) of one AI Search instance with key, status, size, chunk count and any error. Filter by status or exact key. Reads configuration or status only: it runs no search or model and costs nothing. Use for \"Which files failed to index in my Cloudflare AI Search instance docs-search\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Cloudflare account id (32-character hex string shown in the dashboard URL or returned by the Cloudflare connector's list_accounts).","maxLength":40,"title":"Account Id","type":"string"},"namespace":{"description":"AI Search namespace name; use 'default' for the default namespace.","maxLength":64,"title":"Namespace","type":"string"},"id":{"description":"AI Search instance id (lowercase letters, digits, hyphens, underscores), as returned by list_instances.","maxLength":64,"title":"Id","type":"string"},"status":{"anyOf":[{"enum":["queued","running","completed","error","skipped","outdated"],"type":"string"},{"type":"null"}],"default":null,"description":"Only items with this status.","title":"Status"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only items matching this text.","title":"Search"},"key":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Only the item with this exact key (file name or object key).","title":"Key"},"sort_by":{"anyOf":[{"enum":["status","modified_at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort order: status (default) or modified_at.","title":"Sort By"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 50).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id","namespace","id"],"title":"list_instance_itemsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}