---
title: "Create Search Provider"
method: POST
path: "/search-providers"
---

# Create Search Provider

`POST /search-providers`

Create a new search provider integration, validating connectivity first.

## Request body

- SearchProviderRequest — POST/PUT body. Key is optional on both: free providers need none, and null on update keeps the stored key.
  - `integration_name` string, required — User-friendly name
  - `provider` string, required — LiteLLM provider key (tavily, serper, etc.)
  - `search_model` string, required — LiteLLM model key for cost lookup (tavily/search, etc.)
  - `api_key` string, nullable — Plaintext API key (null to keep unchanged)
  - `base_url` string, nullable — Custom endpoint URL for LiteLLM Proxy

## Response `200`

Successful Response

- SearchProviderConfig — Configuration for a single search provider integration.
  - `integration_id` string, nullable — Integration UUID
  - `integration_name` string, required — User-friendly name
  - `provider` string, required — LiteLLM provider key (tavily, serper, etc.)
  - `search_model` string, required — LiteLLM model key for cost lookup (tavily/search, etc.)
  - `encrypted_api_key` string, nullable — Encrypted API key from DB (null for free providers)
  - `api_key` string, nullable — Plaintext API key for create/update requests (null to keep unchanged)
  - `base_url` string, nullable — Custom endpoint URL for LiteLLM Proxy
  - `is_default` boolean — Whether this is the org default search provider
  - `cost_per_query` number, nullable — Cost per query from litellm.model_cost

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-30** `11d1e74d88c7` — 4 warning
  - removed the request property `cost_per_query`
  - removed the request property `encrypted_api_key`
  - removed the request property `integration_id`
  - removed the request property `is_default`

[Change history](https://skmtc.dev/discolike/apis/discolike-api/changes/search-providers/post.md)

---

[API](https://skmtc.dev/discolike/apis/discolike-api.md) · [All operations](https://skmtc.dev/discolike/apis/discolike-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/discolike/discolike-api/revisions/11d1e74d88c7/schema)
