> ## Documentation Index
> Fetch the complete documentation index at: https://platform.kimi.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# WebSearch Pricing

export const DocTable = ({columns = [], rows = []}) => {
  return <div className="doc-table-wrap">
      <table className="doc-table">
        {columns.length > 0 ? <colgroup>
            {columns.map((column, index) => <col key={index} style={column.width ? {
    width: column.width
  } : undefined} />)}
          </colgroup> : null}
        <thead>
          <tr>
            {columns.map((column, index) => <th key={index}>{column.title}</th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, rowIndex) => <tr key={rowIndex}>
              {row.map((cell, cellIndex) => <td key={cellIndex}>{cell}</td>)}
            </tr>)}
        </tbody>
      </table>
    </div>;
};

## Product Pricing

**Explanation: Prices exclude applicable taxes. Specific tax obligations are subject to local tax regulations and will be calculated at checkout based on your jurisdiction.**

<DocTable
  columns={[
{ title: "Tool", width: "28%" },
{ title: "Unit", width: "46%" },
{ title: "Price", width: "26%" },
]}
  rows={[
[<code>{"$"}web_search</code>, "Per successful tool call", <>{"$"}0.005</>],
]}
/>

## Internet Search Billing Logic

When you add the `$web_search` tool in `tools` and receive a response with `finish_reason = tool_calls` and `tool_call.function.name = $web_search`, we charge a fee of \$0.005 for the `$web_search` call. If the response has `finish_reason = stop`, no call fee will be charged.

Additionally, when using `$web_search`, we still charge for the Tokens generated by the `/chat/completions` interface based on the model size. **It is important to note that when the `$web_search` tool is triggered, the search results are also counted in the Tokens. The number of Tokens occupied by the search results can be obtained from the returned `tool_call.function.arguments`.** For example, if the content of the `$web_search` occupies 4k Tokens, these 4k Tokens will be included in the total Tokens when the caller makes the next call to the `/chat/completions` interface. The total billing Tokens will be:

```text theme={null}
total_tokens = prompt_tokens + search_tokens + completions_tokens
```

*Note: If you stop after triggering the `$web_search` without continuing with `tool_calls`, we will only charge the tool call fee of \$0.005, and the Tokens occupied by the search content will not be billed.*
