@innovastudio/contentbox 1.6.137 → 1.6.138
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/package.json +2 -2
- package/public/contentbox/contentbox.esm.js +93 -59
- package/public/contentbox/contentbox.min.js +1 -1
- package/readme.txt +58 -47
package/readme.txt
CHANGED
@@ -133,46 +133,34 @@ NOTE:
|
|
133
133
|
Then enable the 'speechTranscribeUrl' parameter in the ContentBox initialization (src/index.js).
|
134
134
|
|
135
135
|
- To use the AI image generation:
|
136
|
-
1. Obtain the API key from Getimg or Fal.ai:
|
137
|
-
|
138
|
-
https://getimg.ai/tools/api
|
139
136
|
|
140
|
-
|
141
|
-
|
142
|
-
https://fal.ai
|
137
|
+
- New version:
|
143
138
|
|
139
|
+
1. Obtain the API key from Fal.ai:
|
144
140
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
or
|
141
|
+
https://fal.ai
|
142
|
+
|
143
|
+
2. Update the .env file with your API key.
|
150
144
|
|
151
|
-
|
145
|
+
FAL_API_KEY=YOUR_API_KEY
|
152
146
|
|
153
|
-
|
147
|
+
Alternatively, if you're using PHP, update the 'api/config.php' file with your API key:
|
154
148
|
|
155
|
-
|
149
|
+
$FAL_API_KEY = 'YOUR_API_KEY';
|
156
150
|
|
157
|
-
|
151
|
+
3. Obtain the API key from OpenAI
|
152
|
+
|
153
|
+
https://openai.com
|
158
154
|
|
159
|
-
|
155
|
+
4. Update the .env file with your API key.
|
160
156
|
|
161
|
-
|
157
|
+
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
|
162
158
|
|
163
|
-
|
159
|
+
Or if you're using PHP, update the api/config.php file with your API key:
|
164
160
|
|
165
|
-
|
166
|
-
// ...
|
167
|
-
|
168
|
-
textToImageUrl: '/texttoimage',
|
169
|
-
upscaleImageUrl: '/upscaleimage',
|
170
|
-
imageModel: 'flux-schnell',
|
171
|
-
imageAutoUpscale: false,
|
172
|
-
// viewFileUrl: '/viewfile', // If using S3
|
173
|
-
});
|
161
|
+
$OPENAI_API_KEY = 'YOUR_API_KEY';
|
174
162
|
|
175
|
-
|
163
|
+
5. Ensure that the following parameters are set:
|
176
164
|
|
177
165
|
const builder = new ContentBox({
|
178
166
|
// ...
|
@@ -183,48 +171,71 @@ NOTE:
|
|
183
171
|
getResultUrl_Fal: '/result-fal',
|
184
172
|
});
|
185
173
|
|
186
|
-
|
174
|
+
If you're using PHP:
|
187
175
|
|
188
|
-
|
189
|
-
|
176
|
+
const builder = new ContentBox({
|
177
|
+
// ...
|
178
|
+
|
179
|
+
defaultImageGenerationProvider: 'fal',
|
180
|
+
generateMediaUrl_Fal: 'api/request-fal.php',
|
181
|
+
checkRequestStatusUrl_Fal: 'api/status-fal.php',
|
182
|
+
getResultUrl_Fal: 'api/result-fal.php',
|
183
|
+
});
|
190
184
|
|
191
|
-
server.js
|
192
185
|
|
193
|
-
|
186
|
+
- Legacy version:
|
194
187
|
|
195
|
-
|
188
|
+
1. Obtain the API key from Getimg:
|
189
|
+
|
190
|
+
https://getimg.ai/tools/api
|
196
191
|
|
197
|
-
|
192
|
+
2. Update the .env file with your API key.
|
198
193
|
|
199
|
-
|
194
|
+
GETIMG_API_KEY=YOUR_API_KEY
|
195
|
+
|
196
|
+
Alternatively, if you're using PHP, update the 'api/config.php' file with your API key:
|
197
|
+
|
198
|
+
$GETIMG_API_KEY = 'YOUR_API_KEY';
|
200
199
|
|
201
|
-
|
200
|
+
3. Ensure that the following parameters are set:
|
202
201
|
|
203
202
|
const builder = new ContentBox({
|
204
203
|
// ...
|
205
204
|
|
206
|
-
textToImageUrl: '
|
207
|
-
upscaleImageUrl: '
|
205
|
+
textToImageUrl: '/texttoimage',
|
206
|
+
upscaleImageUrl: '/upscaleimage',
|
208
207
|
imageModel: 'flux-schnell',
|
209
208
|
imageAutoUpscale: false,
|
209
|
+
// viewFileUrl: '/viewfile', // If using S3
|
210
210
|
});
|
211
211
|
|
212
|
-
|
212
|
+
If you're using PHP:
|
213
213
|
|
214
214
|
const builder = new ContentBox({
|
215
215
|
// ...
|
216
|
+
|
217
|
+
textToImageUrl: 'api/texttoimage.php',
|
218
|
+
upscaleImageUrl: 'api/upscaleimage.php',
|
219
|
+
imageModel: 'flux-schnell',
|
220
|
+
imageAutoUpscale: false,
|
221
|
+
});
|
216
222
|
|
217
|
-
defaultImageGenerationProvider: 'fal',
|
218
|
-
generateMediaUrl_Fal: 'api/request-fal.php',
|
219
|
-
checkRequestStatusUrl_Fal: 'api/status-fal.php',
|
220
|
-
getResultUrl_Fal: 'api/result-fal.php',
|
221
|
-
});
|
222
223
|
|
223
|
-
|
224
|
+
Most examples in the package have this parameter configured, so you can run and test them.
|
224
225
|
|
225
|
-
|
226
|
+
The JavaScript project example in this package uses Node.js for the API endpoints.
|
227
|
+
Please refer to the Node.js file:
|
226
228
|
|
229
|
+
server.js
|
227
230
|
|
231
|
+
or
|
232
|
+
|
233
|
+
server-aws (for S3 storage)
|
234
|
+
|
235
|
+
|
236
|
+
- IMPORTANT:
|
237
|
+
|
238
|
+
Please add your own security to the API endpoints!
|
228
239
|
|
229
240
|
|
230
241
|
|