@innovastudio/contentbuilder 1.5.129 → 1.5.131
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
@@ -118,7 +118,6 @@ NOTE:
|
|
118
118
|
});
|
119
119
|
|
120
120
|
Most examples in the package have this parameter configured, so you can run and test them.
|
121
|
-
Examples in React/Next.js and Laravel are also provided.
|
122
121
|
|
123
122
|
The JavaScript project example in this package uses Node.js for the API endpoint /sendcommand.
|
124
123
|
Please refer to the Node.js file:
|
@@ -136,95 +135,111 @@ NOTE:
|
|
136
135
|
Then enable the 'speechTranscribeUrl' parameter in the ContentBuilder initialization (src/index.js).
|
137
136
|
|
138
137
|
- To use the AI image generation:
|
139
|
-
1. Obtain the API key from Getimg or Fal.ai:
|
140
|
-
|
141
|
-
https://getimg.ai/tools/api
|
142
|
-
|
143
|
-
or
|
144
138
|
|
145
|
-
|
139
|
+
- New version:
|
146
140
|
|
141
|
+
1. Obtain the API key from Fal.ai:
|
147
142
|
|
148
|
-
|
143
|
+
https://fal.ai
|
144
|
+
|
145
|
+
2. Update the .env file with your API key.
|
149
146
|
|
150
|
-
|
147
|
+
FAL_API_KEY=YOUR_API_KEY
|
151
148
|
|
152
|
-
|
149
|
+
Alternatively, if you're using PHP, update the 'api/config.php' file with your API key:
|
153
150
|
|
154
|
-
|
151
|
+
$FAL_API_KEY = 'YOUR_API_KEY';
|
155
152
|
|
156
|
-
|
153
|
+
3. Obtain the API key from OpenAI
|
154
|
+
|
155
|
+
https://openai.com
|
157
156
|
|
158
|
-
|
157
|
+
4. Update the .env file with your API key.
|
159
158
|
|
160
|
-
|
159
|
+
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
|
161
160
|
|
162
|
-
|
161
|
+
Or if you're using PHP, update the api/config.php file with your API key:
|
163
162
|
|
164
|
-
|
163
|
+
$OPENAI_API_KEY = 'YOUR_API_KEY';
|
165
164
|
|
166
|
-
|
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:
|
165
|
+
5. Ensure that the following parameters are set:
|
179
166
|
|
180
167
|
const builder = new ContentBuilder({
|
181
168
|
// ...
|
182
169
|
|
183
170
|
defaultImageGenerationProvider: 'fal',
|
184
|
-
imageModel: 'fal-ai/flux-1/schnell', // fal-ai/hidream-i1-fast, fal-ai/imagen4/preview/fast
|
185
171
|
generateMediaUrl_Fal: '/request-fal',
|
186
172
|
checkRequestStatusUrl_Fal: '/status-fal',
|
187
173
|
getResultUrl_Fal: '/result-fal',
|
188
174
|
});
|
189
175
|
|
190
|
-
|
176
|
+
If you're using PHP:
|
191
177
|
|
192
|
-
|
193
|
-
|
178
|
+
const builder = new ContentBuilder({
|
179
|
+
// ...
|
194
180
|
|
195
|
-
|
181
|
+
defaultImageGenerationProvider: 'fal',
|
182
|
+
generateMediaUrl_Fal: 'api/request-fal.php',
|
183
|
+
checkRequestStatusUrl_Fal: 'api/status-fal.php',
|
184
|
+
getResultUrl_Fal: 'api/result-fal.php',
|
185
|
+
});
|
196
186
|
|
197
|
-
or
|
198
187
|
|
199
|
-
|
188
|
+
- Legacy version:
|
200
189
|
|
201
|
-
|
190
|
+
1. Obtain the API key from Getimg:
|
191
|
+
|
192
|
+
https://getimg.ai/tools/api
|
202
193
|
|
203
|
-
|
194
|
+
2. Update the .env file with your API key.
|
195
|
+
|
196
|
+
GETIMG_API_KEY=YOUR_API_KEY
|
197
|
+
|
198
|
+
Alternatively, if you're using PHP, update the 'api/config.php' file with your API key:
|
204
199
|
|
205
|
-
|
200
|
+
$GETIMG_API_KEY = 'YOUR_API_KEY';
|
201
|
+
|
202
|
+
3. Ensure that the following parameters are set:
|
206
203
|
|
207
204
|
const builder = new ContentBuilder({
|
208
205
|
// ...
|
209
206
|
|
210
|
-
textToImageUrl: '
|
211
|
-
upscaleImageUrl: '
|
207
|
+
textToImageUrl: '/texttoimage',
|
208
|
+
upscaleImageUrl: '/upscaleimage',
|
212
209
|
imageModel: 'flux-schnell',
|
213
210
|
imageAutoUpscale: false,
|
211
|
+
// viewFileUrl: '/viewfile', // If using S3
|
214
212
|
});
|
215
213
|
|
216
|
-
|
214
|
+
If you're using PHP:
|
217
215
|
|
218
216
|
const builder = new ContentBuilder({
|
219
217
|
// ...
|
218
|
+
|
219
|
+
textToImageUrl: 'api/texttoimage.php',
|
220
|
+
upscaleImageUrl: 'api/upscaleimage.php',
|
221
|
+
imageModel: 'flux-schnell',
|
222
|
+
imageAutoUpscale: false,
|
223
|
+
});
|
220
224
|
|
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
|
-
});
|
227
225
|
|
226
|
+
Most examples in the package have this parameter configured, so you can run and test them.
|
227
|
+
|
228
|
+
The JavaScript project example in this package uses Node.js for the API endpoints.
|
229
|
+
Please refer to the Node.js file:
|
230
|
+
|
231
|
+
server.js
|
232
|
+
|
233
|
+
or
|
234
|
+
|
235
|
+
server-aws (for S3 storage)
|
236
|
+
|
237
|
+
|
238
|
+
- IMPORTANT:
|
239
|
+
|
240
|
+
Please add your own security to the API endpoints!
|
241
|
+
|
242
|
+
|
228
243
|
- New Canvas Mode
|
229
244
|
|
230
245
|
Canvas mode is a new option for seamless (gridless) block positioning. Simply activate with:
|
@@ -243,9 +258,6 @@ And include additional JavaScript and CSS:
|
|
243
258
|
You can try 'example-canvas.html' in the package.
|
244
259
|
|
245
260
|
|
246
|
-
- IMPORTANT:
|
247
|
-
|
248
|
-
Please add your own security to the API endpoints (public/api/)!
|
249
261
|
|
250
262
|
|
251
263
|
|