Skip to content

Commit 39c9286

Browse files
committed
feat(exa): add x-exa-integration header for usage attribution
Sets x-exa-integration: sim on all Exa API requests so Exa can attribute usage to this integration on their side.
1 parent ecbf5e5 commit 39c9286

5 files changed

Lines changed: 6 additions & 0 deletions

File tree

apps/sim/tools/exa/answer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const answerTool: ToolConfig<ExaAnswerParams, ExaAnswerResponse> = {
5353
headers: (params) => ({
5454
'Content-Type': 'application/json',
5555
'x-api-key': params.apiKey,
56+
'x-exa-integration': 'sim',
5657
}),
5758
body: (params) => {
5859
const body: Record<string, any> = {

apps/sim/tools/exa/find_similar_links.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export const findSimilarLinksTool: ToolConfig<
102102
headers: (params) => ({
103103
'Content-Type': 'application/json',
104104
'x-api-key': params.apiKey,
105+
'x-exa-integration': 'sim',
105106
}),
106107
body: (params) => {
107108
const body: Record<string, any> = {

apps/sim/tools/exa/get_contents.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const getContentsTool: ToolConfig<ExaGetContentsParams, ExaGetContentsRes
8787
headers: (params) => ({
8888
'Content-Type': 'application/json',
8989
'x-api-key': params.apiKey,
90+
'x-exa-integration': 'sim',
9091
}),
9192
body: (params) => {
9293
// Parse the comma-separated URLs into an array

apps/sim/tools/exa/research.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const researchTool: ToolConfig<ExaResearchParams, ExaResearchResponse> =
4242
headers: (params) => ({
4343
'Content-Type': 'application/json',
4444
'x-api-key': params.apiKey,
45+
'x-exa-integration': 'sim',
4546
}),
4647
body: (params) => {
4748
const body: any = {
@@ -85,6 +86,7 @@ export const researchTool: ToolConfig<ExaResearchParams, ExaResearchResponse> =
8586
headers: {
8687
'x-api-key': params.apiKey,
8788
'Content-Type': 'application/json',
89+
'x-exa-integration': 'sim',
8890
},
8991
})
9092

apps/sim/tools/exa/search.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export const searchTool: ToolConfig<ExaSearchParams, ExaSearchResponse> = {
112112
headers: (params) => ({
113113
'Content-Type': 'application/json',
114114
'x-api-key': params.apiKey,
115+
'x-exa-integration': 'sim',
115116
}),
116117
body: (params) => {
117118
const body: Record<string, any> = {

0 commit comments

Comments
 (0)