> For clean Markdown of any page on these docs, append `.md` to the page URL
> Full documentation index: https://you.com/docs/llms.txt
> Search over these docs using a free, read-only MCP server (it is the best way to pick the right API(s) for the job and understand how to use them): https://you.com/docs/_mcp/server
> Access web search, web fetch, and deep research tools using our product MCP server: https://api.you.com/mcp (use `/mcp/research` and `/mcp/finance` paths for Research and Finance Research respectively)
> Call live Web Search for free: https://api.you.com/mcp/free
> OpenAPI spec index: https://you.com/docs/openapi.json
> How to authenticate: https://you.com/docs/using-the-api/authentication
> Changelog: https://you.com/docs/changelog
> Full onboarding instructions for agents: https://you.com/SKILL.md

# Otari

[Otari](https://otari.ai) is the model gateway from Mozilla AI. [Release 0.52.0](https://github.com/mozilla-ai/otari/releases/tag/v0.52.0), from [pull request 3064](https://github.com/mozilla-ai/otari/pull/3064), adds You.com as a search provider and as a fetch provider. Search calls the [Web Search API](/docs/guides/search). Fetch calls the [Extract API](/docs/guides/extract): one webpage or PDF per call, returned as Markdown.

## Prerequisites

Run Otari 0.52.0 or later. Earlier releases have no `youdotcom` provider.

Create a You.com API key at [you.com/platform](https://you.com/platform) and export it on the host that runs Otari:

```bash
export YDC_API_KEY="<YDC_API_KEY>"
```

The Docker Compose file in 0.52.0 forwards `YDC_API_KEY` into the gateway container. Reference it from config as `${YDC_API_KEY}`. Do not paste the key into `config.yml`.

## Configure Search and Fetch

Names are unique across `search_tools` and `fetch_tools`, so the fetch instance needs its own name. `youdotcom-fetch` is the one used below. Both providers report no cost. Set `price_per_call` on each instance. With `require_pricing` left at its default, a call on an unpriced tool is refused with `402`.

`web_fetch_enabled` defaults to false. A request that declares `otari_web_fetch` is rejected until you set it to true. Search-result enrichment does not use that switch. It follows `web_search_extract`, which stays on when unset.

```yaml
web_fetch_enabled: true
search_tools:
  youdotcom:
    provider: youdotcom
    api_key: ${YDC_API_KEY}
    price_per_call: 0.005
    fetch_tool: youdotcom-fetch
fetch_tools:
  youdotcom-fetch:
    provider: youdotcom
    api_key: ${YDC_API_KEY}
    timeout: 45
    price_per_call: 0.0009
    options:
      parse_effort: lite
web_search_default_tool: youdotcom
web_fetch_default_tool: youdotcom-fetch
```

`fetch_tool` is the fetch instance that reads pages for that search instance. Leave it unset and enrichment uses `web_fetch_default_tool`. Each page it reads is billed as a fetch on that instance. `web_search_default_tool` is what `otari_web_search` and an unnamed direct search run on. `web_fetch_default_tool` is what `otari_web_fetch` runs on.

The keys are the same ones in Otari's [search tools configuration](https://docs.otari.ai/self-hosting/configuration#search-tools). That page's sample is Exa and SearXNG. The You.com values come from the provider in Otari 0.52.0, which the [gateway tools reference](https://docs.otari.ai/reference/gateway/tools) describes.

## Search Options

With no `options` on the search instance, Otari sends `language: EN`, `knowledge: core`, and `extraction: {extraction_mode: highlights}`. Set `knowledge` or `extraction` to null to leave that field off. Knowledge rows have no URL, so they stay in the raw response and are not returned as hits.

Highlights are included in the Web Search API price of \$5.00 per 1,000 calls. They share one token pool across the results. `total_max_tokens` must be from 1,024 to 8,192. The Web Search API uses 8,192 when the field is omitted. A lower cap keeps each snippet shorter when the search returns few results. Highlights accept at most 50 results. Otari sends `count` 10 unless the instance sets `max_results`, and it caps that count at 50 under highlights and at 100 otherwise.

```yaml
options:
  extraction:
    extraction_mode: highlights
    highlights:
      total_max_tokens: 1024
```

`extraction_mode: full_page` returns each page as Markdown in the hit text. Pages crawled live add \$1.00 per 1,000 pages on the You.com bill. Pages served from cache add nothing. A search for 10 results therefore costs from \$0.005 to \$0.015 there. `crawl_timeout` is the per-page wait under `full_page`, from 1 to 60 seconds, default 10. Highlights reject it.

```yaml
options:
  extraction:
    extraction_mode: full_page
```

A workspace or a request can still set `extraction`. Otari settles the search at `price_per_call` either way, because You.com reports no cost on the call. A call that omits `extraction` returns snippets. Otari does not send that call unless you set `extraction` to null.

## Fetch Options

Fetch calls `POST /v1/extract`. `parse_effort` applies to PDFs and has no effect on webpages. Otari sends `lite` unless `options` set another value. The Extract API itself defaults to `standard`. Otari does not send that default: `standard` adds a per-page charge, and You.com does not report the charge back, so a flat `price_per_call` would not cover it.

* `lite` reads the text embedded in each page and adds no page charge. Use it for a digitally created PDF, such as a text-based contract, and for a fetch instance priced at the URL rate alone.
* `standard` also sends complex pages, such as charts and images, through an advanced model, and adds \$0.50 per 1,000 pages in the PDF. Use it when the figures carry the information, such as an earnings report with revenue charts. Price that instance for the PDFs it will read. Otari still bills the flat `price_per_call`.

`timeout` inside `options` is how long You.com may spend on the request, from 2 to 100 seconds, default 30. Past that, Extract returns `504`. The `timeout` on the instance is how long Otari waits. It must be a number of seconds greater than 0, and it has to be longer than the You.com value or the gateway cancels the call first. The config above waits 45 seconds and leaves You.com at 30.

You.com answers with the URL that was asked, including after a redirect, and it does not run the page's scripts. A redirect it follows is not checked against the workspace domain policy. When every hop has to stay inside that policy, keep fetch and enrichment on `builtin_fetch`.

## Pricing

You.com charges the account that owns `YDC_API_KEY`. Otari charges the caller `price_per_call` in USD, because both providers report no cost. Map the flat part of each You.com rate onto that field. Page charges show up on the You.com bill and not in Otari.

| You.com charge                           | Rate                   | `price_per_call`      |
| ---------------------------------------- | ---------------------- | --------------------- |
| Web Search API call, highlights included | \$5.00 per 1,000 calls | `0.005`               |
| Full page extraction, pages crawled live | \$1.00 per 1,000 pages | Not reported to Otari |
| Extract API, per URL                     | \$0.90 per 1,000 URLs  | `0.0009`              |
| Extract API, `standard` PDF pages        | \$0.50 per 1,000 pages | Not reported to Otari |

An Extract call under `standard` for a 350-page PDF is \$0.0009 plus 350 pages × \$0.50 / 1,000, or \$0.1759, on the You.com bill. Otari still settles that fetch at `price_per_call`. The same split for a full-page search is on the [billing page](/docs/administration/billing).

## Example Request

Declare both tools on a chat completion. The deployment has to already serve the model you name. The model may call search with a query and fetch with one public `http` or `https` URL. The fetch argument is that `url` alone.

```bash
curl http://localhost:8000/api/v1/chat/completions \
  -H "Authorization: Bearer $OTARI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic:claude-sonnet-4-6",
    "messages": [
      {"role": "user", "content": "Find the latest Python release and open the downloads page."}
    ],
    "tools": [
      {"type": "otari_web_search"},
      {"type": "otari_web_fetch"}
    ]
  }'
```

Search and fetch share `web_search_max_calls`. The default is 10.

Parameter details for the gateway are in the [tools reference](https://docs.otari.ai/reference/gateway/tools). Web Search API fields are in the [search reference](/docs/api-reference/search/v1-search). Extract fields, including `parse_effort` and `timeout`, are in the [Extract reference](/docs/api-reference/extract).