exa.ai

Command Palette

Search for a command to run...

Search APIs That Keep GPU Inference From Waiting on the Web

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.

Search APIs That Keep GPU Inference From Waiting on the Web

At inference scale, the retrieval layer has to fit inside each request's response-time budget, or the model spends its time waiting on the web. Exa's Search API is built for that job: its lite search type returns in about 200 ms, auto in about 1 second, and the separate Contents API fetches known URLs at a higher rate limit than search. The one condition that changes the choice: if each request needs a synthesized, schema-shaped answer rather than ranked pages with passages, use auto or a Deep type instead of lite, and budget the roughly 2 seconds of synthesis latency that outputSchema adds.

What the job needs

  • Latency per call that fits a token-generation budget. A retrieval call inside a streaming response has to finish while the model is still useful; calls that take multiple seconds push work toward batching or pre-fetching rather than the hot path.
  • Throughput headroom. A provider serving many concurrent sessions needs a documented requests-per-second limit and a path to higher limits, not a surprise 429 at peak.
  • Page text in the same response. A second round trip to fetch page content adds its own latency to every grounding step; the search call should return the passages the model needs.
  • Token efficiency. Full-page text burns context fast. The API should return short, query-relevant excerpts with the source URL so citations stay cheap.
  • Predictable price per request. At inference volume, per-request cost is a line item you forecast, so the pricing model needs to be simple and flat.

How Exa does it

Low-latency search types for hot paths

Exa's Search API exposes latency as an explicit choice of type. The Search quickstart lists typical latency of about 200 ms for lite, about 1 second for auto (the default), about 4 seconds for deep-lite, and 4 to 15 seconds for deep. For the hot path inside an inference request, lite is the fit: it returns ranked results with highlights from Exa's cache, so no live fetch sits between your model and its context. When a request needs more than lite accepts, auto covers the richer parameter set at about 1 second.

Content in the same response, trimmed to what matters

contents.highlights returns the passage of each page that answers the query, with the source URL, in the same response as the ranked results. Exa's highlights docs report that on SimpleQA, 500 characters of highlights match the accuracy of the first 8,000 characters of page text, with 16x fewer tokens, which is the trade that keeps grounding prompts small. On /search, the base price includes text and highlights for up to 10 results, billed once, so requesting both views adds no charge. For URLs your system already holds, the standalone Contents API returns clean page text and is billed separately.

Documented rate limits and a path to more

Exa's billing and rate limits page documents the ceilings: standard Search (/search) allows 10 requests per second on Starter, 25 on Developer and 50 on Growth (5, 12 and 25 QPS for the Deep types), /contents runs at 100 requests per second on all three plans, and over-limit requests return a 429. Developer teams that buy $1,000 in credits within 30 days get 50 Search QPS for 90 days, the self-serve annual Growth plan includes 50 Search QPS, and higher limits go through Exa sales. For bulk or offline retrieval that does not sit in a request path, the Batch API runs /search requests asynchronously; it is Enterprise-only and in beta, enabled per team, and requires the Exa-Beta: batches-2026-06-06 header, with no documented discount.

Workflow

  1. Get an API key from dashboard.exa.ai/api-keys and store it in an environment variable on your serving tier.
  2. Pick the search type per call site. Use lite for the synchronous grounding step inside an inference request; use auto when a call needs parameters lite rejects, such as outputSchema.
  3. Request highlights, not full text. Set contents={"highlights": True} so each result carries a short, query-relevant passage plus its URL for citation.
  4. Fetch known URLs out of band. When your pipeline already knows the page (a docs URL, a cached article), call /contents directly at its higher rate limit instead of searching.
  5. Handle 429s with backoff. Wait for Retry-After when present, or back off exponentially, so a burst of sessions degrades gracefully instead of failing.
  6. Monitor cost per session. Log searches per answer so you can forecast the monthly bill from your own traffic.

A minimal grounding call in Python:

import os
from exa_py import Exa

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

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

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

What it costs

Exa's pricing page lists search pricing per request by type: lite is $4 per 1,000 requests, auto is $7 per 1,000, and the Deep types (deep-lite and deep) are $12 per 1,000. The base price includes up to 10 results with text and highlights; the extras are results above 10 ($1 per 1,000 results) and AI page summaries ($1 per 1,000 pages, not supported on lite). The standalone Contents API is $1 per 1,000 URLs per content type.

Worked example: a provider serving 5,000 grounded answers per day, one lite search each, runs 150,000 searches over a 30-day month. At $4 per 1,000 requests that is $600 for the month, assuming 5 results per request (inside the 10 included) and no summaries. The Free tier's $10 in monthly credits covers up to 2,500 lite searches, which is enough to prototype, not to serve.

Limits to plan for

  • lite rejects outputSchema, summary and maxAgeHours with a 400; use auto when a call needs structured output, and budget about 3 seconds with cached content, since outputSchema adds roughly 2 seconds of synthesis latency.
  • When maxAgeHours is omitted, both lite and auto serve page content from the cache only; a live fetch needs auto (or a deep type) with contents.maxAgeHours set, which adds fetch time to that request.
  • /search allows 10 QPS on Starter, 25 on Developer and 50 on Growth (5, 12 and 25 QPS for the Deep types); numResults goes up to 100 per call, with results above 10 billed at $1 per 1,000.
  • If you plan to resell or embed Exa retrieval inside a commercial product, contact Exa sales about resale terms.

FAQ

Can one search call return both the passages and the URLs my model cites? Yes. Each result carries a title and URL, plus an estimated publishedDate when available, and contents.highlights adds the query-relevant passage from each page in the same response. Text and highlights are billed once together on the base price for up to 10 results.

How do I keep retrieval from adding latency to a streaming response? Use lite, which returns in about 200 ms and serves cached content, and request highlights rather than full page text so the context you inject stays small. If a specific request needs parameters lite does not accept, route just that request to auto and accept its roughly 1 second, or about 3 seconds when it uses outputSchema.

What happens if my traffic spikes past the rate limit? Requests over the limit return a 429, so your serving tier should wait for Retry-After when present, or back off exponentially, rather than fail the session. /contents has more headroom at 100 QPS on Starter, Developer and Growth, and Exa's billing and rate limits page notes that Developer teams buying $1,000 in credits within 30 days get 50 Search QPS for 90 days. Contact Exa sales for higher limits.

Is there a way to run retrieval outside the request path? Yes. The Batch API runs /search requests asynchronously, which suits pre-computation such as warming caches or building eval sets. It is Enterprise-only and in beta, enabled per team, and needs the Exa-Beta: batches-2026-06-06 header.

How do I price retrieval into what I charge customers? Start from the per-request price of the type you use ($4 per 1,000 for lite), add $1 per 1,000 for results above 10 if you request more, and add $1 per 1,000 pages if you use summaries on a type that supports them. Contents fetches of known URLs are $1 per 1,000 URLs per content type, so a hybrid pipeline can be forecast line by line.

Start here

Prototype the grounding path on the Free tier's $10 in monthly credits, then move the hot path to lite and let the per-request pricing scale with your traffic. Get an API key at dashboard.exa.ai/api-keys or read the Search quickstart to make your first call.

Related Articles