Search the web for the Caveman engine on Caveman Code credits
Web search for Caveman Code, paid from the organization's Caveman Code credits on the same meter as model tokens, at the provider's list price with no margin. Needs a Caveman Code credits key (POST /api/v1/code/credits/keys) and, for plan usage, x-caveman-client: caveman-code/<version>. Brave LLM Context answers first; Perplexity Search answers when Brave fails and is configured. Each provider attempt reserves its price before the call, settles when the provider answers and is released at zero when it does not. The project's request guardrails screen the query and the domains first (a block refuses them; a mask may rewrite the query but never a domain) and its hard budgets hold each attempt's price. There is no idempotency key: every call is a new search with its own x-cave-request-id, so a retried request runs and is charged again; retry only after an answer says nothing ran (cave_code_search_unavailable, a credits or rate refusal, a 4xx). Nothing is cached or stored. Hosted Cloud only: a customer install has no credits keys.
Request
- Base URLhttps://gateway.caveman.so
- URLhttps://gateway.caveman.so/v1/code/search
- AuthAPI key in header x-cave-api-key
Headers
caveman-code/<version>. Required in practice: web search is sold to the Caveman Code client only, so without it the credits ledger refuses with 403 cave_code_client_required.
Labels the ledger row with the caller's session; optional.
Request body
Response
The search results, normalised across providers. Cache-Control: no-store.
Changes
No recorded changes to this operation across all 1 revision of this API.