n8n-nodes-aipass 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # n8n-nodes-aipass
2
+
3
+ This is an n8n community node package for [AIPass](https://aipass.one) - a secure LLM API proxy with budget management.
4
+
5
+ ## Features
6
+
7
+ - **AIPass API Credentials**: Test your AIPass API key connection
8
+ - **Pre-configured Base URL**: `https://aipass.one/apikey/v1`
9
+ - **Full AI Agent Compatibility**: Works with n8n's AI Agent and all LangChain nodes
10
+
11
+ ## Installation
12
+
13
+ ### Community Nodes (Recommended)
14
+
15
+ 1. Go to **Settings** > **Community Nodes**
16
+ 2. Select **Install**
17
+ 3. Enter `n8n-nodes-aipass` and click **Install**
18
+
19
+ ### Manual Installation
20
+
21
+ ```bash
22
+ npm install n8n-nodes-aipass
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ### Using with OpenAI Chat Model (Recommended)
28
+
29
+ The AIPass API is OpenAI-compatible. To use it with n8n's AI Agent:
30
+
31
+ 1. **Create OpenAI Credentials**:
32
+ - Go to **Settings** > **Credentials** > **New**
33
+ - Select **OpenAI API**
34
+ - Enter your AIPass API key (starts with `sk-aikey-`)
35
+ - Set **Base URL** to: `https://aipass.one/apikey/v1`
36
+
37
+ 2. **Add OpenAI Chat Model Node**:
38
+ - In your workflow, add an **OpenAI Chat Model** node
39
+ - Select the OpenAI credentials you created
40
+ - Choose your desired model
41
+
42
+ 3. **Connect to AI Agent**:
43
+ - Connect the OpenAI Chat Model to an AI Agent node
44
+ - Your workflow is ready!
45
+
46
+ ### Testing Your API Key
47
+
48
+ You can also create **AIPass API** credentials to test your API key:
49
+
50
+ 1. Go to **Settings** > **Credentials** > **New**
51
+ 2. Select **AIPass API**
52
+ 3. Enter your API key
53
+ 4. Click **Test** to verify the connection
54
+
55
+ ## Supported Models
56
+
57
+ AIPass supports various LLM models. Check the `/models` endpoint or your AIPass dashboard for available models:
58
+
59
+ ```bash
60
+ curl https://aipass.one/apikey/v1/models \
61
+ -H "Authorization: Bearer sk-aikey-YOUR_API_KEY"
62
+ ```
63
+
64
+ ## Resources
65
+
66
+ - [AIPass Website](https://aipass.one)
67
+ - [AIPass Documentation](https://aipass.one/docs)
68
+ - [n8n Community Nodes](https://docs.n8n.io/integrations/community-nodes/)
69
+
70
+ ## License
71
+
72
+ MIT
@@ -0,0 +1,9 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class AiPassApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AiPassApi = void 0;
4
+ class AiPassApi {
5
+ constructor() {
6
+ this.name = 'aiPassApi';
7
+ this.displayName = 'AIPass API';
8
+ this.documentationUrl = 'https://aipass.one/docs';
9
+ this.properties = [
10
+ {
11
+ displayName: 'API Key',
12
+ name: 'apiKey',
13
+ type: 'string',
14
+ typeOptions: { password: true },
15
+ required: true,
16
+ default: '',
17
+ description: 'Your AIPass API key (starts with sk-aikey-)',
18
+ },
19
+ ];
20
+ this.authenticate = {
21
+ type: 'generic',
22
+ properties: {
23
+ headers: {
24
+ Authorization: '=Bearer {{$credentials.apiKey}}',
25
+ },
26
+ },
27
+ };
28
+ this.test = {
29
+ request: {
30
+ baseURL: 'https://aipass.one/apikey/v1',
31
+ url: '/models',
32
+ },
33
+ };
34
+ }
35
+ }
36
+ exports.AiPassApi = AiPassApi;
@@ -0,0 +1,4 @@
1
+ import type { INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class AiPass implements INodeType {
3
+ description: INodeTypeDescription;
4
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AiPass = void 0;
4
+ class AiPass {
5
+ constructor() {
6
+ this.description = {
7
+ displayName: 'AIPass',
8
+ name: 'aiPass',
9
+ icon: 'file:aipass.svg',
10
+ group: ['transform'],
11
+ version: 1,
12
+ subtitle: 'LLM API Proxy',
13
+ description: 'AIPass - Secure LLM API proxy with budget management',
14
+ defaults: {
15
+ name: 'AIPass',
16
+ },
17
+ inputs: [],
18
+ outputs: [],
19
+ credentials: [
20
+ {
21
+ name: 'aiPassApi',
22
+ required: false,
23
+ displayOptions: {
24
+ show: {},
25
+ },
26
+ },
27
+ ],
28
+ properties: [
29
+ {
30
+ displayName: 'How to Use AIPass with n8n',
31
+ name: 'notice',
32
+ type: 'notice',
33
+ default: '',
34
+ description: 'To use AIPass with AI Agent or LLM nodes:\n\n1. Create an **OpenAI** credential\n2. Set your AIPass API key as the API Key\n3. Set Base URL to: https://aipass.one/apikey/v1\n4. Use the OpenAI Chat Model node with these credentials\n\nThe AIPass API credentials above can be used to test your API key connection.',
35
+ },
36
+ {
37
+ displayName: 'Base URL',
38
+ name: 'baseUrl',
39
+ type: 'string',
40
+ default: 'https://aipass.one/apikey/v1',
41
+ description: 'The AIPass API base URL (use this in your OpenAI credentials)',
42
+ noDataExpression: true,
43
+ },
44
+ {
45
+ displayName: 'Documentation',
46
+ name: 'documentation',
47
+ type: 'notice',
48
+ default: '',
49
+ description: 'For more information, visit <a href="https://aipass.one/docs" target="_blank">AIPass Documentation</a>',
50
+ },
51
+ ],
52
+ };
53
+ }
54
+ }
55
+ exports.AiPass = AiPass;
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="60" height="60">
2
+ <defs>
3
+ <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
4
+ <stop offset="0%" style="stop-color:#667eea;stop-opacity:1" />
5
+ <stop offset="100%" style="stop-color:#764ba2;stop-opacity:1" />
6
+ </linearGradient>
7
+ </defs>
8
+ <rect width="100" height="100" rx="20" ry="20" fill="url(#grad1)"/>
9
+ <text x="50" y="65" font-family="Arial, sans-serif" font-size="40" font-weight="bold" fill="white" text-anchor="middle">AI</text>
10
+ <circle cx="75" cy="30" r="8" fill="#4ade80"/>
11
+ </svg>
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "n8n-nodes-aipass",
3
+ "version": "0.1.0",
4
+ "description": "n8n nodes and credentials for AIPass LLM API proxy",
5
+ "keywords": [
6
+ "n8n-community-node-package"
7
+ ],
8
+ "license": "MIT",
9
+ "homepage": "https://aipass.one",
10
+ "author": {
11
+ "name": "AIPass",
12
+ "email": "support@aipass.one"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/aipass/n8n-nodes-aipass.git"
17
+ },
18
+ "main": "index.js",
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "scripts": {
23
+ "build": "tsc && gulp build:icons",
24
+ "dev": "n8n-node dev",
25
+ "lint": "eslint nodes credentials --ext .ts",
26
+ "lintfix": "eslint nodes credentials --ext .ts --fix",
27
+ "prepublishOnly": "npm run build"
28
+ },
29
+ "n8n": {
30
+ "n8nNodesApiVersion": 1,
31
+ "credentials": [
32
+ "dist/credentials/AiPassApi.credentials.js"
33
+ ],
34
+ "nodes": [
35
+ "dist/nodes/AiPass/AiPass.node.js"
36
+ ]
37
+ },
38
+ "devDependencies": {
39
+ "@typescript-eslint/parser": "^7.0.0",
40
+ "eslint": "^8.56.0",
41
+ "gulp": "^4.0.2",
42
+ "n8n-workflow": "*",
43
+ "typescript": "^5.7.0"
44
+ },
45
+ "peerDependencies": {
46
+ "n8n-workflow": "*"
47
+ }
48
+ }