| name | exa-cost-tuning |
| description | Optimize Exa costs through search type selection, caching, and usage monitoring.
Use when analyzing Exa billing, reducing API costs,
or implementing budget controls and usage alerts.
Trigger with phrases like "exa cost", "exa billing",
"reduce exa costs", "exa pricing", "exa expensive", "exa budget".
|
| allowed-tools | Read, Grep, Bash(curl:*), Bash(node:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","exa","api","cost-optimization"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Exa Cost Tuning
Overview
Reduce Exa API costs through strategic search type selection, result caching, query deduplication, and usage monitoring. Exa charges per search request with costs varying by search type and content retrieval options.
Cost Drivers
| Factor | Higher Cost | Lower Cost |
|---|
| Search type | deep-reasoning > deep > neural | keyword < fast < instant |
| numResults | 10-100 results | 3-5 results |
| Content retrieval | Full text + highlights + summary | Metadata only (no content) |
| Content length | maxCharacters: 5000 | maxCharacters: 500 |
| Live crawling | livecrawl: "always" | Cached content (default) |
Instructions
Step 1: Match Search Config to Use Case
import Exa from "exa-js";
const exa = new Exa(process.env.EXA_API_KEY);
const SEARCH_PROFILES = {
"autocomplete": { type: "instant" as const, numResults: 3 },
"quick-lookup": { type: "fast" as const, : },
: {
: ,
: ,
: { : },
},
: {
: ,
: ,
: { : },
: { : },
},
};
() {
config = [profile];
( config || config) {
exa.(query, config);
}
exa.(query, config);
}