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

# Auto Search

> Access frontier models through one API key, with live web search built in.

For AI agents: [docs.octen.ai/capabilities/auto-search.md](https://docs.octen.ai/capabilities/auto-search.md)

Building with LLMs usually means juggling providers, protocols, and API keys, and every model only knows the web as of its training date.

Auto Search closes both gaps: it serves frontier models from Anthropic, OpenAI, Google, and more behind one API key, with built-in Octen search tools that let any model answer with live web data.

For the full list of parameters, see the [Auto Search API reference](/api-reference/chat-completions.md).

## Why Auto Search

* **One key, frontier lineup.** Claude, GPT, Gemini, and more. Switch models by changing one string.
* **Built-in search.** Enable the built-in search tools and the model grounds its answers on the live web; Octen runs the searches server-side, with no tool plumbing on your side.
* **Drop-in compatibility.** Speaks the OpenAI Chat Completions and Anthropic Messages protocols. Point your existing SDK at the Octen base URL.
* **Image generation.** Create or edit images with image models through the same gateway.
* **Video generation.** Generate videos from a text prompt, optionally guided by reference images.

## How It Works

1. Point your existing OpenAI or Anthropic SDK at the Octen base URL and pick a model.
2. Octen routes the request to the model provider; when built-in search tools are enabled, the model decides when to search and Octen executes the searches server-side.
3. The response comes back in the standard protocol shape, grounded in live web results when search was used.

## Scenarios

### Bring your existing code

If your app already uses the OpenAI or Anthropic SDK, switch to Octen by changing the base URL and API key. The rest of your code stays the same.

```python OpenAI SDK theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_OCTEN_API_KEY",
    base_url="https://api.octen.ai/v1",
)

response = client.chat.completions.create(
    model="openai/gpt-5.4",
    messages=[{"role": "user", "content": "Explain vector search in one paragraph"}],
)
```

```python Anthropic SDK theme={null}
import anthropic

client = anthropic.Anthropic(
    api_key="YOUR_OCTEN_API_KEY",
    base_url="https://api.octen.ai",
)

response = client.messages.create(
    model="anthropic/claude-sonnet-4.6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain vector search in one paragraph"}],
)
```

### Chat with a frontier model

Call any model in the lineup through the OpenAI Chat Completions protocol.

```bash theme={null}
curl -X POST https://api.octen.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "model": "anthropic/claude-sonnet-4.6",
    "messages": [{ "role": "user", "content": "Explain vector search in one paragraph" }]
  }'
```

### Answer with live web data

Enable a built-in search tool; the model searches when it needs fresh information.

```json theme={null}
{
  "model": "openai/gpt-5.4",
  "messages": [{ "role": "user", "content": "What happened in tech today?" }],
  "tools": [{ "type": "octen_search" }]
}
```

Use `octen_broad_search` instead for multi-angle questions.

### Generate images

Create images from text at `/v1/images/generations`, following the OpenAI Images protocol; pass an input image to edit it instead.

```json theme={null}
{
  "model": "openai/gpt-image-2",
  "prompt": "an isometric illustration of a search engine indexing the web"
}
```

### Generate videos

Generate a video from text at `/v1/videos`.

```json theme={null}
{
  "model": "google/veo-3.1",
  "prompt": "an isometric illustration of a search engine indexing the web"
}
```

Generation is asynchronous. The call returns a task id; poll `/v1/videos/{id}` until `status` is `completed`, then download the file from `video_url`.

## Next Steps

> **[Try in Console](https://octen.ai/platform/model)**
>
> Run Auto Search live in the Octen console.

> **[Auto Search API Reference](/api-reference/chat-completions.md)**
>
> Full request/response schema.

***

Last modified on October 22, 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.