@innovastudio/contentbuilder 1.5.125 → 1.5.127

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.txt CHANGED
@@ -124,6 +124,10 @@ NOTE:
124
124
  Please refer to the Node.js file:
125
125
 
126
126
  server.js
127
+
128
+ or
129
+
130
+ server-aws (for S3 storage)
127
131
 
128
132
  - For speech recognition (if dictation is enabled), the browser's built-in
129
133
  speech recognition is used. However, certain browsers may not support this feature.
@@ -132,14 +136,94 @@ NOTE:
132
136
  Then enable the 'speechTranscribeUrl' parameter in the ContentBuilder initialization (src/index.js).
133
137
 
134
138
  - To use the AI image generation:
135
- 1. Obtain the API key from https://getimg.ai/tools/api.
139
+ 1. Obtain the API key from Getimg or Fal.ai:
140
+
141
+ https://getimg.ai/tools/api
142
+
143
+ or
144
+
145
+ https://fal.ai
146
+
147
+
136
148
  2. Update the .env file with your API key.
137
149
 
138
- GETIMG_API_KEY=YOUR_API_KEY
150
+ GETIMG_API_KEY=YOUR_API_KEY
151
+
152
+ or
153
+
154
+ FAL_API_KEY=YOUR_API_KEY
139
155
 
140
156
  Alternatively, if you're using PHP, update the 'api/config.php' file with your API key:
141
157
 
142
- $GETIMG_API_KEY = 'YOUR_API_KEY';
158
+ $GETIMG_API_KEY = 'YOUR_API_KEY';
159
+
160
+ or
161
+
162
+ $FAL_API_KEY = 'YOUR_API_KEY';
163
+
164
+ 3. Ensure that the textToImageUrl or generateMediaUrl_Fal parameter is set with the API endpoint:
165
+
166
+ Using Getimg.ai for image generation:
167
+
168
+ const builder = new ContentBuilder({
169
+ // ...
170
+
171
+ textToImageUrl: '/texttoimage',
172
+ upscaleImageUrl: '/upscaleimage',
173
+ imageModel: 'flux-schnell',
174
+ imageAutoUpscale: false,
175
+ // viewFileUrl: '/viewfile', // If using S3
176
+ });
177
+
178
+ Using Fal.ai for image generation:
179
+
180
+ const builder = new ContentBuilder({
181
+ // ...
182
+
183
+ defaultImageGenerationProvider: 'fal',
184
+ imageModel: 'fal-ai/flux-1/schnell', // fal-ai/hidream-i1-fast, fal-ai/imagen4/preview/fast
185
+ generateMediaUrl_Fal: '/request-fal',
186
+ checkRequestStatusUrl_Fal: '/status-fal',
187
+ getResultUrl_Fal: '/result-fal',
188
+ });
189
+
190
+ Most examples in the package have this parameter configured, so you can run and test them.
191
+
192
+ The JavaScript project example in this package uses Node.js for the API endpoint /sendcommand.
193
+ Please refer to the Node.js file:
194
+
195
+ server.js
196
+
197
+ or
198
+
199
+ server-aws (for S3 storage)
200
+
201
+ _______________________
202
+
203
+ If you're using PHP:
204
+
205
+ Using Getimg.ai for image generation:
206
+
207
+ const builder = new ContentBuilder({
208
+ // ...
209
+
210
+ textToImageUrl: 'api/texttoimage.php',
211
+ upscaleImageUrl: 'api/upscaleimage.php',
212
+ imageModel: 'flux-schnell',
213
+ imageAutoUpscale: false,
214
+ });
215
+
216
+ Using Fal.ai for image generation:
217
+
218
+ const builder = new ContentBuilder({
219
+ // ...
220
+
221
+ defaultImageGenerationProvider: 'fal',
222
+ imageModel: 'fal-ai/flux-1/schnell', // fal-ai/hidream-i1-fast, fal-ai/imagen4/preview/fast
223
+ generateMediaUrl_Fal: 'api/request-fal.php',
224
+ checkRequestStatusUrl_Fal: 'api/status-fal.php',
225
+ getResultUrl_Fal: 'api/result-fal.php',
226
+ });
143
227
 
144
228
  - New Canvas Mode
145
229