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

# Quickstart

AI Search gives your application live access to the web through a single Novita gateway. Instead of signing up with each search provider, managing separate keys, and learning different auth schemes, you call Novita with one API key and pick the search engine you want per request.

This guide takes you from zero to a working web search in a few minutes. You'll authenticate with a single Novita API key, run a search, and see how to switch providers without changing your setup.

## Before you start

1. A Novita account and an API key. See [API Key Management](/docs/api-reference/basic-authentication) to create one.
2. Export your key so the examples below can use it. `NOVITA_API_KEY` is just your Novita API key from step 1 — the same key works for every provider:

```bash theme={"system"}
export NOVITA_API_KEY="<Your API Key>"
```

All AI Search endpoints share the same base URL and authentication:

* **Base URL:** `https://api.novita.ai`
* **Auth header:** `Authorization: Bearer <api_key>`
* **Content type:** `application/json`

## Your first search

The example below runs an Exa search. Every request is just a route plus a JSON body.

<CodeGroup>
  ```bash curl theme={"system"}
  curl -X POST 'https://api.novita.ai/v3/exa/search' \
    -H "Authorization: Bearer ${NOVITA_API_KEY}" \
    -H 'Content-Type: application/json' \
    -d '{
      "query": "latest open-source LLM releases",
      "numResults": 5
    }'
  ```

  ```python Python theme={"system"}
  import os
  import requests

  resp = requests.post(
      "https://api.novita.ai/v3/exa/search",
      headers={
          "Authorization": f"Bearer {os.environ['NOVITA_API_KEY']}",
          "Content-Type": "application/json",
      },
      json={
          "query": "latest open-source LLM releases",
          "numResults": 5,
      },
  )
  resp.raise_for_status()

  for result in resp.json()["results"]:
      print(result["title"], "-", result["url"])
  ```

  ```javascript JavaScript theme={"system"}
  const resp = await fetch("https://api.novita.ai/v3/exa/search", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.NOVITA_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      query: "latest open-source LLM releases",
      numResults: 5,
    }),
  });

  const data = await resp.json();
  for (const result of data.results) {
    console.log(`${result.title} - ${result.url}`);
  }
  ```
</CodeGroup>

## Switching search engines

Switching search engines means changing the **route** and the **request body** to match the provider — your key, host, and auth header stay the same. Here's the same intent expressed for Tavily:

```bash theme={"system"}
curl -X POST 'https://api.novita.ai/v3/tavily/search' \
  -H "Authorization: Bearer ${NOVITA_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "latest open-source LLM releases",
    "max_results": 5
  }'
```

Note the small differences: Exa uses `numResults`, Tavily uses `max_results`. Each provider's full parameter list lives in its API reference.

## Bring your own provider SDK

AI Search is a passthrough integration, so a provider's official SDK works as long as it lets you override the base URL — point it at the matching gateway route and pass your Novita key. The Exa Python SDK, for example, takes a `base_url`:

```python theme={"system"}
import os
from exa_py import Exa

exa = Exa(
    api_key=os.environ["NOVITA_API_KEY"],
    base_url="https://api.novita.ai/v3/exa",
)

results = exa.search("latest open-source LLM releases", num_results=5)
for r in results.results:
    print(r.title, "-", r.url)
```

<Note>
  If an SDK doesn't expose a base-URL setting, just call the REST endpoints directly with any HTTP client, as shown above — that path always works.
</Note>

## How it works

Novita exposes each provider as a passthrough endpoint. Your request is authenticated with your Novita API key, then forwarded to the upstream provider using the provider's own request and response format.

* **One credential.** Use your existing Novita API key as `Bearer <api_key>` for every provider.
* **Provider-native bodies.** Request and response shapes match the upstream provider, so the provider's own examples and request formats carry over — just point the base URL at Novita.
* **Swap engines per request.** Switching providers means changing the route and the body, not your auth or your account setup.

This is useful whenever a model needs information it wasn't trained on: current events, fast-moving documentation, prices, or any fact that lives on the open web. Pair it with the [LLM API](/docs/guides/llm-api) to build retrieval-augmented generation (RAG), research agents, and web-grounded assistants.

## Supported providers

<CardGroup cols={2}>
  <Card title="Exa" icon="brain">
    Neural and semantic web search with built-in content extraction and answer synthesis. Strong for research, finding pages by meaning, and structured output.
  </Card>

  <Card title="Tavily" icon="bolt">
    Fast, LLM-optimized search and retrieval with site crawling and mapping. Strong for news and finance topics, extraction pipelines, and low-latency lookups.
  </Card>
</CardGroup>

## Capabilities at a glance

| Capability         | What it does                         |                         Exa                        |                        Tavily                       |
| ------------------ | ------------------------------------ | :------------------------------------------------: | :-------------------------------------------------: |
| Search             | Find relevant pages from a query     |   [Search](/docs/api-reference/model-apis-exa-search)   |  [Search](/docs/api-reference/model-apis-tavily-search)  |
| Content extraction | Pull clean text/metadata from URLs   | [Contents](/docs/api-reference/model-apis-exa-contents) | [Extract](/docs/api-reference/model-apis-tavily-extract) |
| Answer synthesis   | Generate a cited answer from results |   [Answer](/docs/api-reference/model-apis-exa-answer)   |                 via `include_answer`                |
| Site crawling      | Follow links to gather many pages    |                          —                         |   [Crawl](/docs/api-reference/model-apis-tavily-crawl)   |
| Site mapping       | Discover a site's reachable URLs     |                          —                         |     [Map](/docs/api-reference/model-apis-tavily-map)     |

## Endpoint reference

| Provider | Endpoint                                            | Route                     |
| -------- | --------------------------------------------------- | ------------------------- |
| Exa      | [Search](/docs/api-reference/model-apis-exa-search)      | `POST /v3/exa/search`     |
| Exa      | [Contents](/docs/api-reference/model-apis-exa-contents)  | `POST /v3/exa/contents`   |
| Exa      | [Answer](/docs/api-reference/model-apis-exa-answer)      | `POST /v3/exa/answer`     |
| Tavily   | [Search](/docs/api-reference/model-apis-tavily-search)   | `POST /v3/tavily/search`  |
| Tavily   | [Extract](/docs/api-reference/model-apis-tavily-extract) | `POST /v3/tavily/extract` |
| Tavily   | [Crawl](/docs/api-reference/model-apis-tavily-crawl)     | `POST /v3/tavily/crawl`   |
| Tavily   | [Map](/docs/api-reference/model-apis-tavily-map)         | `POST /v3/tavily/map`     |

## Troubleshooting

* **400 Bad Request** — a parameter doesn't match the provider's schema. Check that you're using that provider's field names (for example, `numResults` vs `max_results`).
* **429 Too Many Requests** — you've hit a rate limit. Back off and retry, or reduce request volume.

For the full list, see the Errors section on any AI Search [API reference](/docs/api-reference/model-apis-tavily-search) page.

## Where to go next

<Card title="Web-Grounded Answers & RAG" icon="link" href="/docs/guides/ai-search-grounded-answers">
  Feed search results into the LLM API to build retrieval-augmented generation (RAG) pipelines with cited answers.
</Card>
