mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(Jina AI Node): Add Jina AI node (#15094)
This commit is contained in:
43
packages/nodes-base/credentials/JinaAiApi.credentials.ts
Normal file
43
packages/nodes-base/credentials/JinaAiApi.credentials.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class JinaAiApi implements ICredentialType {
|
||||
name = 'jinaAiApi';
|
||||
|
||||
displayName = 'Jina AI API';
|
||||
|
||||
documentationUrl = 'jinaAi';
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'API Key',
|
||||
name: 'apiKey',
|
||||
type: 'string',
|
||||
typeOptions: { password: true },
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
Authorization: '=Bearer {{ $credentials?.apiKey }}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
method: 'GET',
|
||||
url: 'https://embeddings-dashboard-api.jina.ai/api/v1/api_key/fe_user',
|
||||
qs: {
|
||||
api_key: '={{$credentials.apiKey}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user