For the complete documentation index, see llms.txt. This page is also available as Markdown.

Search

Create Search

post

Run a search against a configured search tool.

The tool is taken from search_tool_name, which may be omitted when the deployment's web_search_default_tool names one, or when exactly one tool is configured. Such a call runs on the workspace's organization search key when it has one.

Authentication modes:

  • Master key: the user field is required and may name any existing user.

  • API key: usage and spend bind to the key's own user. A user field naming a different user is rejected with 403 (or ignored, when the key's own reject_user_mismatch is false, or the deployment-wide setting is disabled and the key does not override it); it is never billed to that user.

  • Service key: a user field names one of the key owner's end users, created on first use on the budget Otari-End-User-Budget names (or the key's default), and is billed and rate limited as that end user, as on chat completions.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Body

A direct search request: LiteLLM's /v1/search body, plus include_raw and provider_options.

countrystring · min: 2 · max: 2 · nullableOptional

Two-letter ISO country code to localize results to

include_rawbooleanOptional

Also return the provider's whole response, as raw.

Default: false
max_resultsinteger · min: 1 · nullableOptional

Maximum number of results to return; 10 when unset. Lowered to the workspace's ceiling when it sets one, and to the provider's own maximum.

max_tokens_per_pageinteger · min: 1 · nullableOptional

Approximate cap on the page content returned per result

querystring · min: 1Required

The search query

search_domain_filterstring[] · max: 20 · nullableOptional

Restrict results to these domains; prefix a domain with '-' to exclude it instead

search_tool_namestring · nullableOptional

Configured search tool to run against. Optional when the deployment names a default (web_search_default_tool) or has exactly one tool, and ignored on POST /api/v1/search/{search_tool_name}.

userstring · nullableOptional

User ID for usage attribution

Responses
200

Successful Response

application/json

A completed direct search.

objectconst: searchOptionalDefault: search
search_toolstringRequired

The configured search tool that served the request

post/api/v1/search
POST /api/v1/search HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "max_results": 5,
  "query": "otari llm gateway"
}
{
  "object": "search",
  "raw": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "results": [
    {
      "date": "text",
      "last_updated": "text",
      "snippet": "text",
      "title": "text",
      "url": "text"
    }
  ],
  "search_tool": "text"
}

Create Search For Tool

post

Run a search against the search tool named in the path.

Identical to POST /api/v1/search except that the path names the tool, which is the form LiteLLM clients use. Any search_tool_name in the body is ignored.

Authentication modes:

  • Master key: the user field is required and may name any existing user.

  • API key: usage and spend bind to the key's own user. A user field naming a different user is rejected with 403 (or ignored, when the key's own reject_user_mismatch is false, or the deployment-wide setting is disabled and the key does not override it); it is never billed to that user.

  • Service key: a user field names one of the key owner's end users, created on first use on the budget Otari-End-User-Budget names (or the key's default), and is billed and rate limited as that end user, as on chat completions.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
search_tool_namestringRequired

Configured search tool to run against

Body

A direct search request: LiteLLM's /v1/search body, plus include_raw and provider_options.

countrystring · min: 2 · max: 2 · nullableOptional

Two-letter ISO country code to localize results to

include_rawbooleanOptional

Also return the provider's whole response, as raw.

Default: false
max_resultsinteger · min: 1 · nullableOptional

Maximum number of results to return; 10 when unset. Lowered to the workspace's ceiling when it sets one, and to the provider's own maximum.

max_tokens_per_pageinteger · min: 1 · nullableOptional

Approximate cap on the page content returned per result

querystring · min: 1Required

The search query

search_domain_filterstring[] · max: 20 · nullableOptional

Restrict results to these domains; prefix a domain with '-' to exclude it instead

search_tool_namestring · nullableOptional

Configured search tool to run against. Optional when the deployment names a default (web_search_default_tool) or has exactly one tool, and ignored on POST /api/v1/search/{search_tool_name}.

userstring · nullableOptional

User ID for usage attribution

Responses
200

Successful Response

application/json

A completed direct search.

objectconst: searchOptionalDefault: search
search_toolstringRequired

The configured search tool that served the request

post/api/v1/search/{search_tool_name}
POST /api/v1/search/{search_tool_name} HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "max_results": 5,
  "query": "otari llm gateway"
}
{
  "object": "search",
  "raw": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "results": [
    {
      "date": "text",
      "last_updated": "text",
      "snippet": "text",
      "title": "text",
      "url": "text"
    }
  ],
  "search_tool": "text"
}

Last updated

Was this helpful?