@innovastudio/contentbuilder 1.5.130 → 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,46 +135,34 @@ 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
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
or
|
143
|
+
https://fal.ai
|
144
|
+
|
145
|
+
2. Update the .env file with your API key.
|
153
146
|
|
154
|
-
|
147
|
+
FAL_API_KEY=YOUR_API_KEY
|
155
148
|
|
156
|
-
|
149
|
+
Alternatively, if you're using PHP, update the 'api/config.php' file with your API key:
|
157
150
|
|
158
|
-
|
151
|
+
$FAL_API_KEY = 'YOUR_API_KEY';
|
159
152
|
|
160
|
-
|
153
|
+
3. Obtain the API key from OpenAI
|
154
|
+
|
155
|
+
https://openai.com
|
161
156
|
|
162
|
-
|
157
|
+
4. Update the .env file with your API key.
|
163
158
|
|
164
|
-
|
159
|
+
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
|
165
160
|
|
166
|
-
|
161
|
+
Or if you're using PHP, update the api/config.php file with your API key:
|
167
162
|
|
168
|
-
|
169
|
-
// ...
|
170
|
-
|
171
|
-
textToImageUrl: '/texttoimage',
|
172
|
-
upscaleImageUrl: '/upscaleimage',
|
173
|
-
imageModel: 'flux-schnell',
|
174
|
-
imageAutoUpscale: false,
|
175
|
-
// viewFileUrl: '/viewfile', // If using S3
|
176
|
-
});
|
163
|
+
$OPENAI_API_KEY = 'YOUR_API_KEY';
|
177
164
|
|
178
|
-
|
165
|
+
5. Ensure that the following parameters are set:
|
179
166
|
|
180
167
|
const builder = new ContentBuilder({
|
181
168
|
// ...
|
@@ -186,43 +173,68 @@ NOTE:
|
|
186
173
|
getResultUrl_Fal: '/result-fal',
|
187
174
|
});
|
188
175
|
|
189
|
-
|
176
|
+
If you're using PHP:
|
190
177
|
|
191
|
-
|
192
|
-
|
178
|
+
const builder = new ContentBuilder({
|
179
|
+
// ...
|
193
180
|
|
194
|
-
|
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
|
+
});
|
195
186
|
|
196
|
-
or
|
197
187
|
|
198
|
-
|
188
|
+
- Legacy version:
|
199
189
|
|
200
|
-
|
190
|
+
1. Obtain the API key from Getimg:
|
191
|
+
|
192
|
+
https://getimg.ai/tools/api
|
201
193
|
|
202
|
-
|
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:
|
199
|
+
|
200
|
+
$GETIMG_API_KEY = 'YOUR_API_KEY';
|
203
201
|
|
204
|
-
|
202
|
+
3. Ensure that the following parameters are set:
|
205
203
|
|
206
204
|
const builder = new ContentBuilder({
|
207
205
|
// ...
|
208
206
|
|
209
|
-
textToImageUrl: '
|
210
|
-
upscaleImageUrl: '
|
207
|
+
textToImageUrl: '/texttoimage',
|
208
|
+
upscaleImageUrl: '/upscaleimage',
|
211
209
|
imageModel: 'flux-schnell',
|
212
210
|
imageAutoUpscale: false,
|
211
|
+
// viewFileUrl: '/viewfile', // If using S3
|
213
212
|
});
|
214
213
|
|
215
|
-
|
214
|
+
If you're using PHP:
|
216
215
|
|
217
216
|
const builder = new ContentBuilder({
|
218
217
|
// ...
|
218
|
+
|
219
|
+
textToImageUrl: 'api/texttoimage.php',
|
220
|
+
upscaleImageUrl: 'api/upscaleimage.php',
|
221
|
+
imageModel: 'flux-schnell',
|
222
|
+
imageAutoUpscale: false,
|
223
|
+
});
|
219
224
|
|
220
|
-
defaultImageGenerationProvider: 'fal',
|
221
|
-
generateMediaUrl_Fal: 'api/request-fal.php',
|
222
|
-
checkRequestStatusUrl_Fal: 'api/status-fal.php',
|
223
|
-
getResultUrl_Fal: 'api/result-fal.php',
|
224
|
-
});
|
225
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
|
+
|
226
238
|
- IMPORTANT:
|
227
239
|
|
228
240
|
Please add your own security to the API endpoints!
|