---
title: "Test Search Tool Connection"
method: POST
path: "/search_tools/test_connection"
tags: ["search_tools"]
---

# Test Search Tool Connection

`POST /search_tools/test_connection`

Test connection to a search provider with the given configuration.

Makes a simple test search query to verify the API key and configuration are valid.

Example Request:
```bash
curl -X POST "http://localhost:4000/search_tools/test_connection" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "litellm_params": {
            "search_provider": "perplexity",
            "api_key": "sk-..."
        }
    }'
```

Example Response (Success):
```json
{
    "status": "success",
    "message": "Successfully connected to perplexity search provider",
    "test_query": "test",
    "results_count": 5
}
```

Example Response (Failure):
```json
{
    "status": "error",
    "message": "Authentication failed: Invalid API key",
    "error_type": "AuthenticationError"
}
```

## Request body

- TestSearchToolConnectionRequest
  - `litellm_params` object, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/flock/apis/litellm-api.md) · [All operations](https://skmtc.net/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flock/litellm-api/revisions/8fbaab4fc7c5/schema)
