---
title: "Create Search Tool"
method: POST
path: "/v1/search-tools"
tags: ["search-tools"]
---

# Create Search Tool

`POST /v1/search-tools`

Add a search tool at runtime. Storing an API key requires OTARI_SECRET_KEY.

## Request body

- CreateSearchToolRequest — Create a stored search tool. ``api_key`` is write-only and requires OTARI_SECRET_KEY.
  - `api_base` string, nullable — Backend endpoint. Omit to inherit the provider's default (searxng inherits web_search_url).
  - `api_key` string, nullable — Provider API key. Stored encrypted; never returned.
  - `name` string, required — Name callers pass as 'search_tool_name' or in /v1/search/{tool}.
  - `options` object, nullable — Provider-native request fields used as defaults (e.g. exa's 'type', searxng's 'engines').
  - `provider` string, required — Search provider, one of: exa, searxng.
  - `timeout` number, nullable — Per-request timeout in seconds.

## Response `201`

Successful Response

- StoredSearchToolSchema — A runtime-stored search tool. The API key is never returned, only ``last4``.
  - `api_base` string, nullable
  - `created_at` string, nullable
  - `decryptable` boolean
  - `last4` string, nullable
  - `name` string, required
  - `options` object
  - `provider` string, required
  - `shadows_config` boolean — True when a config-file search tool of the same name exists; the stored one is in effect.
  - `timeout` number, nullable
  - `updated_at` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.net/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/otari/revisions/6133543facaf/schema)
