wavespeed 0.0.7 → 0.0.9
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/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -74,7 +74,7 @@ class WaveSpeed {
|
|
|
74
74
|
* @param options Additional client options
|
|
75
75
|
*/
|
|
76
76
|
constructor(apiKey, options = {}) {
|
|
77
|
-
this.baseUrl = 'https://api.wavespeed.ai/api/
|
|
77
|
+
this.baseUrl = 'https://api.wavespeed.ai/api/v3/';
|
|
78
78
|
// Browser-friendly environment variable handling
|
|
79
79
|
const getEnvVar = (name) => {
|
|
80
80
|
// Try to get from process.env for Node.js environments
|
|
@@ -102,7 +102,7 @@ class WaveSpeed {
|
|
|
102
102
|
async fetchWithTimeout(path, options = {}) {
|
|
103
103
|
const { timeout = this.timeout * 1000, ...fetchOptions } = options;
|
|
104
104
|
// Ensure headers exist
|
|
105
|
-
if (
|
|
105
|
+
if (options.isUpload) {
|
|
106
106
|
fetchOptions.headers = {
|
|
107
107
|
'Authorization': `Bearer ${this.apiKey}`,
|
|
108
108
|
...(fetchOptions.headers || {}),
|