n8n-nodes-pollinations-ai 1.0.0 → 1.2.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 CHANGED
@@ -1,12 +1,8 @@
1
1
  # n8n-nodes-pollinations-ai
2
2
 
3
- [![GitHub release](https://img.shields.io/github/v/release/new-xmon-df/n8n-nodes-pollinations-ai)](https://github.com/new-xmon-df/n8n-nodes-pollinations-ai/releases)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
- [![n8n community node](https://img.shields.io/badge/n8n-community%20node-ff6d5a)](https://n8n.io)
3
+ This is an n8n community node that lets you generate images and text using [Pollinations AI](https://pollinations.ai) in your n8n workflows.
6
4
 
7
- This is an n8n community node that lets you generate images using [Pollinations AI](https://pollinations.ai) in your n8n workflows.
8
-
9
- [Pollinations](https://pollinations.ai) is an AI image generation platform that provides access to various models like Flux, Turbo, GPT Image, and more.
5
+ [Pollinations](https://pollinations.ai) is an AI platform that provides access to various image and text generation models.
10
6
 
11
7
  [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
12
8
 
@@ -20,15 +16,6 @@ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes
20
16
  2. Select **Install**
21
17
  3. Enter `n8n-nodes-pollinations-ai` and confirm
22
18
 
23
- ### Install from GitHub
24
-
25
- ```bash
26
- cd ~/.n8n/nodes
27
- npm install github:new-xmon-df/n8n-nodes-pollinations-ai
28
- ```
29
-
30
- Then restart n8n.
31
-
32
19
  ## Operations
33
20
 
34
21
  ### Generate Image
@@ -40,7 +27,7 @@ Generate an image from a text prompt using Pollinations AI.
40
27
  | Parameter | Required | Description |
41
28
  |-----------|----------|-------------|
42
29
  | Prompt | Yes | The text prompt to generate the image from |
43
- | Model | Yes | The model to use (Flux, Turbo, GPT Image, etc.) |
30
+ | Model | Yes | The model to use (loaded dynamically from API) |
44
31
 
45
32
  **Advanced Options:**
46
33
 
@@ -53,67 +40,91 @@ Generate an image from a text prompt using Pollinations AI.
53
40
  | Enhance Prompt | false | Automatically enhance the prompt |
54
41
  | Safe Mode | false | Enable content safety filter |
55
42
 
56
- ## Output
57
-
58
- The node returns both **binary data** (the image) and **JSON metadata** for debugging:
59
-
60
- ```json
61
- {
62
- "request": {
63
- "url": "https://image.pollinations.ai/prompt/your%20prompt?model=flux",
64
- "prompt": "your prompt",
65
- "model": "flux",
66
- "width": 1024,
67
- "height": 1024,
68
- "seed": null,
69
- "nologo": false,
70
- "enhance": false,
71
- "safe": false
72
- },
73
- "response": {
74
- "statusCode": 200,
75
- "contentType": "image/jpeg",
76
- "duration": "4523ms"
77
- },
78
- "timestamp": "2026-01-11T23:25:00.000Z"
79
- }
80
- ```
43
+ ### Generate Text
44
+
45
+ Generate text from a prompt using AI language models.
46
+
47
+ **Parameters:**
48
+
49
+ | Parameter | Required | Description |
50
+ |-----------|----------|-------------|
51
+ | Prompt | Yes | The text prompt or question for the AI model |
52
+ | Model | Yes | The AI model to use (loaded dynamically from API) |
53
+ | System Prompt | No | Instructions that define the AI behavior and context |
54
+ | Temperature | No | Controls creativity: 0.0 = strict, 2.0 = very creative (default: 0.7) |
55
+
56
+ **Advanced Options:**
57
+
58
+ | Option | Default | Description |
59
+ |--------|---------|-------------|
60
+ | JSON Response | false | Force the response in JSON format (not supported by all models) |
61
+ | Seed | -1 | Seed for reproducible results (-1 = random) |
81
62
 
82
63
  ## Credentials
83
64
 
84
- To use this node, you need a Pollinations API key:
65
+ To use this node, you need a Pollinations API key.
66
+
67
+ ### Creating an API Key
85
68
 
86
69
  1. Go to [enter.pollinations.ai](https://enter.pollinations.ai)
87
- 2. Create an account and generate an API key
88
- 3. In n8n, create a new **Pollinations API** credential
89
- 4. Paste your API key (either `pk_` or `sk_` type)
70
+ 2. Sign up or log in to your account
71
+ 3. Navigate to **API Keys** section
72
+ 4. Click **Create API Key**
73
+ 5. Configure your key:
74
+ - **Name**: Give your key a descriptive name (e.g., "n8n Integration")
75
+ - **Type**: Choose between Publishable (`pk_`) or Secret (`sk_`)
76
+ - **Model Access**: Select which models this key can use (see below)
77
+ 6. Copy the generated key
78
+
79
+ ### Configuring Model Access
90
80
 
91
- ### Key Types
81
+ When creating an API key, you can restrict which models the key has access to. This is useful for:
92
82
 
93
- - **Publishable Keys (`pk_`)**: Client-side safe, IP rate-limited
94
- - **Secret Keys (`sk_`)**: Server-side, no rate limits, can spend Pollen
83
+ - **Cost control**: Limit access to expensive models
84
+ - **Security**: Restrict capabilities of shared keys
85
+ - **Organization**: Create keys for specific use cases
86
+
87
+ The node automatically filters the model dropdown to show only the models your API key has permission to use. If you don't see a model you expect, check your key's model permissions at [enter.pollinations.ai](https://enter.pollinations.ai).
88
+
89
+ ### Setting up in n8n
90
+
91
+ 1. In n8n, go to **Credentials**
92
+ 2. Click **Add Credential**
93
+ 3. Search for **Pollinations API**
94
+ 4. Paste your API key
95
+ 5. Click **Save**
96
+
97
+ ### API Key Types
98
+
99
+ | Type | Prefix | Use Case | Rate Limits |
100
+ |------|--------|----------|-------------|
101
+ | **Publishable** | `pk_` | Client-side apps, testing | IP-based rate limiting |
102
+ | **Secret** | `sk_` | Server-side, production | No rate limits, can spend Pollen |
103
+
104
+ > **Important**: Secret keys (`sk_`) should never be exposed in client-side code. Use them only in server environments like n8n.
95
105
 
96
106
  ## Available Models
97
107
 
98
- | Model | Description |
99
- |-------|-------------|
100
- | Flux | High quality image generation (default) |
101
- | Turbo | Faster generation with good quality |
102
- | GPT Image | OpenAI DALL-E style generation |
103
- | Kontext | Context-aware image generation (strict content filter) |
104
- | Seedream | Dream-like artistic images |
105
- | Nanobanana | Lightweight fast model |
106
- | Nanobanana Pro | Enhanced nanobanana model |
108
+ Models are loaded dynamically from the Pollinations API, ensuring you always have access to the latest available models.
109
+
110
+ ### Image Models
111
+
112
+ Common models include Flux, Turbo, GPT Image, Kontext, Seedream, and more.
113
+
114
+ ### Text Models
115
+
116
+ Common models include OpenAI GPT-5, Claude, Gemini, DeepSeek, Mistral, and more.
107
117
 
108
118
  ## Example Usage
109
119
 
110
120
  ### Basic Image Generation
111
121
 
112
122
  1. Add a **Pollinations** node to your workflow
113
- 2. Select your Pollinations API credentials
114
- 3. Enter a prompt like "A beautiful sunset over mountains"
115
- 4. Select a model (e.g., Flux)
116
- 5. Execute the node
123
+ 2. Select **Generate Image** operation
124
+ 3. Select your Pollinations API credentials
125
+ 4. Enter a prompt like "A beautiful sunset over mountains"
126
+ 5. Select a model (e.g., Flux)
127
+ 6. Execute the node
117
128
 
118
129
  The output will be a binary image that you can:
119
130
  - Save to disk using the **Write Binary File** node
@@ -121,12 +132,17 @@ The output will be a binary image that you can:
121
132
  - Send via email or messaging platforms
122
133
  - Process with other image manipulation nodes
123
134
 
124
- ### Using with Seed for Reproducibility
135
+ ### Basic Text Generation
136
+
137
+ 1. Add a **Pollinations** node to your workflow
138
+ 2. Select **Generate Text** operation
139
+ 3. Select your Pollinations API credentials
140
+ 4. Enter a prompt like "Explain quantum computing in simple terms"
141
+ 5. Optionally add a system prompt to define AI behavior
142
+ 6. Select a model (e.g., OpenAI)
143
+ 7. Execute the node
125
144
 
126
- Set the same `seed` value to generate identical images with the same prompt and settings. This is useful for:
127
- - A/B testing different prompts
128
- - Creating variations with consistent style
129
- - Debugging and comparison
145
+ The output will be a JSON object with the generated text and metadata.
130
146
 
131
147
  ## Compatibility
132
148
 
@@ -139,14 +155,6 @@ Set the same `seed` value to generate identical images with the same prompt and
139
155
  - [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
140
156
  - [Report Issues](https://github.com/new-xmon-df/n8n-nodes-pollinations-ai/issues)
141
157
 
142
- ## Contributing
143
-
144
- Contributions are welcome! Please feel free to submit a Pull Request.
145
-
146
158
  ## License
147
159
 
148
160
  [MIT](LICENSE)
149
-
150
- ## Author
151
-
152
- **Juanjo Garcia** - [@new-xmon-df](https://github.com/new-xmon-df)
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  IAuthenticateGeneric,
3
+ ICredentialTestRequest,
3
4
  ICredentialType,
4
5
  INodeProperties,
5
6
  } from 'n8n-workflow';
@@ -7,7 +8,7 @@ import {
7
8
  export class PollinationsApi implements ICredentialType {
8
9
  name = 'pollinationsApi';
9
10
  displayName = 'Pollinations API';
10
- documentationUrl = 'https://enter.pollinations.ai/api/docs';
11
+ documentationUrl = 'https://github.com/new-xmon-df/n8n-nodes-pollinations-ai#credentials';
11
12
 
12
13
  properties: INodeProperties[] = [
13
14
  {
@@ -17,7 +18,8 @@ export class PollinationsApi implements ICredentialType {
17
18
  typeOptions: { password: true },
18
19
  default: '',
19
20
  required: true,
20
- description: 'Your Pollinations API Key (pk_ or sk_). Get it at https://enter.pollinations.ai',
21
+ description:
22
+ 'Your Pollinations API Key (pk_ or sk_). Get it at https://enter.pollinations.ai. The available models will be filtered based on your key permissions.',
21
23
  },
22
24
  ];
23
25
 
@@ -29,4 +31,11 @@ export class PollinationsApi implements ICredentialType {
29
31
  },
30
32
  },
31
33
  };
34
+
35
+ test: ICredentialTestRequest = {
36
+ request: {
37
+ baseURL: 'https://gen.pollinations.ai',
38
+ url: '/image/models',
39
+ },
40
+ };
32
41
  }
@@ -1,8 +1,9 @@
1
- import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
2
  export declare class PollinationsApi implements ICredentialType {
3
3
  name: string;
4
4
  displayName: string;
5
5
  documentationUrl: string;
6
6
  properties: INodeProperties[];
7
7
  authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
8
9
  }
@@ -5,7 +5,7 @@ class PollinationsApi {
5
5
  constructor() {
6
6
  this.name = 'pollinationsApi';
7
7
  this.displayName = 'Pollinations API';
8
- this.documentationUrl = 'https://enter.pollinations.ai/api/docs';
8
+ this.documentationUrl = 'https://github.com/new-xmon-df/n8n-nodes-pollinations-ai#credentials';
9
9
  this.properties = [
10
10
  {
11
11
  displayName: 'API Key',
@@ -14,7 +14,7 @@ class PollinationsApi {
14
14
  typeOptions: { password: true },
15
15
  default: '',
16
16
  required: true,
17
- description: 'Your Pollinations API Key (pk_ or sk_). Get it at https://enter.pollinations.ai',
17
+ description: 'Your Pollinations API Key (pk_ or sk_). Get it at https://enter.pollinations.ai. The available models will be filtered based on your key permissions.',
18
18
  },
19
19
  ];
20
20
  this.authenticate = {
@@ -25,6 +25,12 @@ class PollinationsApi {
25
25
  },
26
26
  },
27
27
  };
28
+ this.test = {
29
+ request: {
30
+ baseURL: 'https://gen.pollinations.ai',
31
+ url: '/image/models',
32
+ },
33
+ };
28
34
  }
29
35
  }
30
36
  exports.PollinationsApi = PollinationsApi;
@@ -1,5 +1,12 @@
1
- import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
1
+ import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
2
  export declare class Pollinations implements INodeType {
3
3
  description: INodeTypeDescription;
4
+ methods: {
5
+ loadOptions: {
6
+ getImageModels(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
+ getTextModels(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
8
+ getImageModelsWithReferenceSupport(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
9
+ };
10
+ };
4
11
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
12
  }