exa.ai

Command Palette

Search for a command to run...

Choosing a Search Layer for Inference Workloads

Last updated: 11/26/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Choosing a Search Layer for Inference Workloads

An inference provider needs a web search layer that stays fast under high request volume, returns passages a model can ground on, and prices predictably per call. Exa's Search API is that layer: the lite type returns in about 200 ms, auto in about 1 second, and the deep types run 4 to 15 seconds. The one condition that changes the choice is the call site: latency-sensitive paths inside an inference request want lite, while calls that need structured output or summaries need auto or a deep type.

What the job needs

  • Latency per call that fits the serving path. A search call inside an inference request adds directly to time to first token, so the per-call latency has to be known and small for interactive paths.
  • Relevance you can measure. The layer should return passages that actually answer the query, and the vendor should publish evals and datasets you can inspect, then test on your own traffic.
  • Predictable per-request pricing. You need a flat price per search request, with clear rates for extra results and any page-content add-ons, so unit economics per inference call hold at scale.
  • Page text in the same response. Fetching a second time for content doubles latency and cost; the search call should return highlights or text with the results.
  • Rate limits that survive agent loops. Inference workloads fan out many searches per user request, so the query-per-second ceiling matters as much as the price.

How Exa does it

Latency matched to the call site

The Search quickstart lists typical latency per type: lite at about 200 ms, auto at about 1 second, deep-lite at about 4 seconds, and deep at 4 to 15 seconds. auto is the default type. That lets you route by call site: lite for the latency-sensitive path inside an inference request, auto when the request needs parameters lite does not accept, and a deep type only for offline or background steps where a few seconds is fine. Exa's own benchmark runs from July 2026 put lite at about 200 ms p50 and 0.225 on SealQA on the Exa vs Parallel page; treat those as benchmark results, not guarantees.

Relevance with published evals

Exa runs its own retrieval benchmarks and publishes them at github.com/exa-labs/benchmarks, covering code retrieval, people, company and publication tracks, so you can inspect the methodology rather than take a marketing number on faith. Reproducibility varies by track: some are dataset-only exports, and the repo's README describes the published results as historical, so plan to rerun the evals that matter on your own traffic. For code retrieval, Exa's WebCode evaluation reports 96.7 code recall and 91.9 table recall. The benchmark repository publishes the 250 Contents records without the licensed reference Markdown needed to reproduce those scores. For grounding, contents.highlights returns the passage that answers the query with its source URL, and the highlights docs report that 500 characters of highlights match the accuracy of the first 8,000 characters of page text on SimpleQA, in Exa's evaluation, which keeps model prompts small without giving up relevance.

Pricing that maps to unit economics

Exa's pricing page lists search pricing per request by type: lite $4, auto $7, and deep-lite or deep $12 per 1,000 requests. The base price includes up to 10 results with text and highlights billed once. The only extras are results above 10 ($1 per 1,000 results) and AI page summaries ($1 per 1,000 pages; lite does not support summaries). Because the price is flat per request, you can compute the search cost inside each inference call and price your own product on top of it.

Contents for URLs you already have

When the inference pipeline already holds a URL, such as a documentation page or an article a user pasted in, the Contents API returns clean page text for $1 per 1,000 pages per content type returned, with no search step. Each returned page is billable for each content type returned, including summaries. Exa's Exa vs Parallel page puts highlights extraction on Contents at under 100 ms, which suits pre-fetching content before the model call.

Rate limits that survive fan-outs

The Billing and Rate Limits page sets standard /search limits at 10 queries per second on Starter, 25 on Developer and 50 on Growth (Deep Search types 5, 12 and 25 QPS), and the limit applies to the whole team rather than per key. Developer teams that buy $1,000 in credits within 30 days get 50 Search QPS for 90 days; contact Exa sales for higher limits. When a burst of inference requests fans out into many searches, a 429 response may include a Retry-After header; wait for it when present, or back off exponentially.

Workflow

  1. Get an API key and store it in an environment variable.
  2. Pick the search type per call site: lite for the interactive path, auto when you need outputSchema or summaries, a deep type for background research.
  3. Call /search with contents.highlights so the response carries grounded passages, not just links.
  4. Pass the highlights and source URLs into the model prompt as grounding context.
  5. Cache or reuse URLs you already hold through /contents instead of searching again.
  6. Monitor QPS against the rate limits and add backoff on 429 responses.

A minimal lite call in Python:

import os
from exa_py import Exa

exa = Exa(os.environ["EXA_API_KEY"])

result = exa.search(
    "latest stable release notes for the framework in use",
    type="lite",
    num_results=5,
    contents={"highlights": True},
)

for r in result.results:
    print(r.title, r.url)
    print(r.highlights)

What it costs

Worked example: an inference provider whose product runs 100 lite searches per day makes about 3,000 searches over a 30-day month. At $4 per 1,000 requests that is $12.00 for the month, assuming 5 results per request (inside the 10 included) and highlights only, with no summaries. The same volume on auto would be 3,000 × $0.007, or $21.00. Exa's pricing page states that the Free tier includes $10 in credits every month, up to 2,500 lite searches, plus a one-time $10 onboarding bonus. A pilot of up to 2,500 lite searches a month fits inside the monthly credit; the 3,000-search example above ($12.00) goes $2.00 over it.

Limits to plan for

  • lite rejects outputSchema, contents.summary and contents.maxAgeHours with a 400 error; use auto or a deep type when you need structured output or summaries.
  • lite serves page content from the cache only, so results without a cached copy are left out when you request text or highlights.
  • The Billing and Rate Limits page sets standard /search limits at 10 QPS on Starter, 25 on Developer and 50 on Growth, with Deep Search types at 5, 12 and 25 QPS; over the limit returns a 429, so build in backoff.
  • numResults goes up to 100, and results above 10 cost $1 per 1,000 results, so large fan-outs change the per-call math.

FAQ

How do I keep search latency out of my time-to-first-token? Use lite (about 200 ms typical) on the interactive path and reserve auto and the deep types for calls that can tolerate more time. You can also pre-fetch highlights for likely queries before the model call, since cached content returns without a live fetch.

What does grounding cost per inference call? On /search, text and highlights for up to 10 results are included in the base price and billed once, so a lite call with highlights is $0.004 per request. AI page summaries add $1 per 1,000 pages and are not available on lite.

Can the search layer return structured output for my API? Yes, on auto and the deep types: the Search reference documents that outputSchema adds an output object with synthesized content and field-level citations, at about 2 seconds of extra synthesis latency. Read synthesized content from output.content and citations from output.grounding, validate what your API needs, and check the citations before acting on important claims.

How fresh is the content the search layer returns? On Search, when freshness is omitted, page content comes from Exa's cache. Set contents.maxAgeHours on auto or a deep type to bound cache age: 0 requires content fetched within the last 60 seconds, and a positive value sets a cache-age threshold for refreshing content.

Where do I start without a commitment? Exa's pricing page states that the Free tier includes $10 in credits every month, up to 2,500 lite searches, with no payment method required, which is enough to benchmark relevance and latency on your own queries before you commit.

Closing

For inference workloads, the search layer you pick sets your latency floor, your grounding quality and your per-call margin, and Exa's Search API lets you tune all three per call site with published figures. Create an API key or see pricing to run your own benchmark.

Related Articles