Skip to content

feat: add Exa AI-powered search tracking header#22

Merged
willamhou merged 1 commit intoPrismer-AI:mainfrom
tgonzalezc5:feat/exa-integration-header
Apr 13, 2026
Merged

feat: add Exa AI-powered search tracking header#22
willamhou merged 1 commit intoPrismer-AI:mainfrom
tgonzalezc5:feat/exa-integration-header

Conversation

@tgonzalezc5
Copy link
Copy Markdown
Contributor

Summary

  • Adds x-exa-integration: prismercloud header to both Exa API clients (/api/search and /api/content)
  • This allows Exa to attribute API usage to the PrismerCloud integration for analytics and partnership tracking
  • Zero behavior change; only adds one header per client instantiation

Files changed

  • server/src/app/api/search/route.ts — added integration header after Exa client init
  • server/src/app/api/content/route.ts — added integration header after Exa client init

Code example

const searchClient = new Exa(SEARCH_API_KEY);
(searchClient as any).headers.set('x-exa-integration', 'prismercloud');

The as any cast is needed because headers is marked private in the exa-js type definitions, but is a standard Headers instance at runtime.

Test plan

  • Verify /api/search returns results as before
  • Verify /api/content returns content as before
  • Confirm x-exa-integration header is present in outgoing requests (visible in Exa dashboard or network logs)

Set x-exa-integration header on Exa API clients so usage can be
attributed to the PrismerCloud integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@willamhou willamhou merged commit a903238 into Prismer-AI:main Apr 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants