@mynthio/sdk 0.0.6 → 0.0.8
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.md +36 -10
- package/dist/constants.d.ts +4 -8
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +21 -16
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -157,11 +157,10 @@ const task = await mynth.generate({
|
|
|
157
157
|
negative: "blurry, low detail",
|
|
158
158
|
enhance: "prefer_magic",
|
|
159
159
|
},
|
|
160
|
-
model: "
|
|
160
|
+
model: "google/gemini-3-pro-image-preview",
|
|
161
161
|
size: {
|
|
162
162
|
type: "aspect_ratio",
|
|
163
163
|
aspectRatio: "4:5",
|
|
164
|
-
scale: "2k",
|
|
165
164
|
},
|
|
166
165
|
count: 2,
|
|
167
166
|
output: {
|
|
@@ -172,6 +171,11 @@ const task = await mynth.generate({
|
|
|
172
171
|
enabled: true,
|
|
173
172
|
custom: [{ url: "https://your-app.com/api/mynth-webhook" }],
|
|
174
173
|
},
|
|
174
|
+
access: {
|
|
175
|
+
pat: {
|
|
176
|
+
enabled: true,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
175
179
|
content_rating: {
|
|
176
180
|
enabled: true,
|
|
177
181
|
levels: [
|
|
@@ -197,6 +201,8 @@ const task = await mynth.generate({
|
|
|
197
201
|
});
|
|
198
202
|
```
|
|
199
203
|
|
|
204
|
+
`access.pat.enabled` controls whether the create-task response includes a short-lived Public Access Token for browser-side polling. It defaults to `true`.
|
|
205
|
+
|
|
200
206
|
## Prompt Options
|
|
201
207
|
|
|
202
208
|
`prompt` can be:
|
|
@@ -222,18 +228,35 @@ prompt: {
|
|
|
222
228
|
|
|
223
229
|
`size` supports:
|
|
224
230
|
|
|
225
|
-
- presets
|
|
226
|
-
- compact resolution strings like `"1536x1024"`
|
|
231
|
+
- presets such as `"square"`, `"portrait"`, `"landscape"`, `"portrait_tall"`, `"landscape_wide"`, and the explicit aspect-ratio preset IDs
|
|
227
232
|
- `"auto"`
|
|
228
|
-
- structured objects
|
|
233
|
+
- structured auto objects
|
|
234
|
+
- structured aspect-ratio objects with an optional `scale: "4k"`
|
|
235
|
+
|
|
236
|
+
Supported aspect ratios:
|
|
237
|
+
|
|
238
|
+
- `"1:1"`
|
|
239
|
+
- `"2:3"`
|
|
240
|
+
- `"3:2"`
|
|
241
|
+
- `"3:4"`
|
|
242
|
+
- `"4:3"`
|
|
243
|
+
- `"4:5"`
|
|
244
|
+
- `"5:4"`
|
|
245
|
+
- `"9:16"`
|
|
246
|
+
- `"16:9"`
|
|
247
|
+
- `"21:9"`
|
|
248
|
+
- `"2:1"`
|
|
249
|
+
- `"1:2"`
|
|
250
|
+
|
|
251
|
+
Use `scale: "4k"` when you want the higher tier and the model supports it.
|
|
229
252
|
|
|
230
253
|
Examples:
|
|
231
254
|
|
|
232
255
|
```ts
|
|
233
256
|
size: "landscape";
|
|
234
|
-
size: "
|
|
235
|
-
size: { type: "
|
|
236
|
-
size: { type: "aspect_ratio", aspectRatio: "
|
|
257
|
+
size: "auto";
|
|
258
|
+
size: { type: "aspect_ratio", aspectRatio: "16:9" };
|
|
259
|
+
size: { type: "aspect_ratio", aspectRatio: "4:5", scale: "4k" };
|
|
237
260
|
size: { type: "auto", prefer: "native" };
|
|
238
261
|
```
|
|
239
262
|
|
|
@@ -292,7 +315,7 @@ console.log(model);
|
|
|
292
315
|
// {
|
|
293
316
|
// id: "google/gemini-3.1-flash-image",
|
|
294
317
|
// label: "Nano Banana 2",
|
|
295
|
-
// capabilities: ["inputs", "
|
|
318
|
+
// capabilities: ["inputs", "4k", "native_enhance_prompt", "native_auto_size"]
|
|
296
319
|
// }
|
|
297
320
|
```
|
|
298
321
|
|
|
@@ -308,8 +331,11 @@ Current model IDs include:
|
|
|
308
331
|
- `black-forest-labs/flux.2-klein-4b`
|
|
309
332
|
- `google/gemini-3.1-flash-image`
|
|
310
333
|
- `google/gemini-3-pro-image-preview`
|
|
311
|
-
- `tongyi-mai/z-image-turbo`
|
|
312
334
|
- `john6666/bismuth-illustrious-mix`
|
|
335
|
+
- `purplesmartai/pony-diffusion-v6-xl`
|
|
336
|
+
- `recraft/recraft-v4`
|
|
337
|
+
- `recraft/recraft-v4-pro`
|
|
338
|
+
- `tongyi-mai/z-image-turbo`
|
|
313
339
|
- `wan/wan2.6-image`
|
|
314
340
|
- `xai/grok-imagine-image`
|
|
315
341
|
|
package/dist/constants.d.ts
CHANGED
|
@@ -9,16 +9,12 @@ export declare const TASK_STATUS_PATH: (id: string) => string;
|
|
|
9
9
|
/**
|
|
10
10
|
* Model capabilities that affect available generation options.
|
|
11
11
|
* - `mynth_magic_prompt`: Supports Mynth-side prompt enhancement
|
|
12
|
-
* - `enhance_prompt`: Supports provider-native prompt enhancement
|
|
13
12
|
* - `inputs`: Supports reference/input images
|
|
14
|
-
* - `
|
|
15
|
-
* - `
|
|
16
|
-
* - `
|
|
17
|
-
* - `scheduler`: Supports custom scheduler selection
|
|
18
|
-
* - `auto_size`: Supports provider-driven auto sizing
|
|
19
|
-
* - `steps`: Supports custom inference step count
|
|
13
|
+
* - `4k`: Supports 4k resolution output
|
|
14
|
+
* - `native_enhance_prompt`: Supports provider-native prompt enhancement
|
|
15
|
+
* - `native_auto_size`: Supports provider-driven auto sizing
|
|
20
16
|
*/
|
|
21
|
-
export type ModelCapability = "
|
|
17
|
+
export type ModelCapability = "inputs" | "mynth_magic_prompt" | "4k" | "native_enhance_prompt" | "native_auto_size";
|
|
22
18
|
/**
|
|
23
19
|
* Information about an available image generation model.
|
|
24
20
|
*/
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,eAAO,MAAM,OAAO,yBAAyB,CAAC;AAE9C,gDAAgD;AAChD,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,SAAS,WAAW,CAAC;AAClC,eAAO,MAAM,iBAAiB,GAAI,IAAI,MAAM,WAAyB,CAAC;AACtE,eAAO,MAAM,gBAAgB,GAAI,IAAI,MAAM,WAAgC,CAAC;AAE5E
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,eAAO,MAAM,OAAO,yBAAyB,CAAC;AAE9C,gDAAgD;AAChD,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,SAAS,WAAW,CAAC;AAClC,eAAO,MAAM,iBAAiB,GAAI,IAAI,MAAM,WAAyB,CAAC;AACtE,eAAO,MAAM,gBAAgB,GAAI,IAAI,MAAM,WAAgC,CAAC;AAE5E;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GACvB,QAAQ,GACR,oBAAoB,GACpB,IAAI,GACJ,uBAAuB,GACvB,kBAAkB,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,YAAY,EAAE,SAAS,eAAe,EAAE,CAAC;CAC1C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAsFrD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var V="https://api.mynth.io",X="MYNTH_API_KEY",b="/image/generate";var v=(J)=>`/tasks/${J}`,G=(J)=>`/tasks/${J}/status`,P=[{id:"auto",label:"Auto",capabilities:[]},{id:"alibaba/qwen-image-2.0",label:"Qwen Image 2.0",capabilities:["inputs","
|
|
2
|
+
var V="https://api.mynth.io",X="MYNTH_API_KEY",b="/image/generate";var v=(J)=>`/tasks/${J}`,G=(J)=>`/tasks/${J}/status`,P=[{id:"auto",label:"Auto",capabilities:[]},{id:"alibaba/qwen-image-2.0",label:"Qwen Image 2.0",capabilities:["inputs","native_enhance_prompt"]},{id:"alibaba/qwen-image-2.0-pro",label:"Qwen Image 2.0 Pro",capabilities:["inputs","native_enhance_prompt"]},{id:"bytedance/seedream-5.0-lite",label:"Seedream 5.0 Lite",capabilities:["inputs"]},{id:"black-forest-labs/flux.1-dev",label:"FLUX.1 Dev",capabilities:["mynth_magic_prompt"]},{id:"black-forest-labs/flux-1-schnell",label:"FLUX.1 Schnell",capabilities:["mynth_magic_prompt"]},{id:"tongyi-mai/z-image-turbo",label:"Z Image Turbo",capabilities:["mynth_magic_prompt"]},{id:"black-forest-labs/flux.2-dev",label:"FLUX.2 Dev",capabilities:["mynth_magic_prompt"]},{id:"black-forest-labs/flux.2-klein-4b",label:"FLUX.2 Klein 4B",capabilities:["inputs"]},{id:"john6666/bismuth-illustrious-mix",label:"Bismuth Illustrious Mix",capabilities:["mynth_magic_prompt"]},{id:"purplesmartai/pony-diffusion-v6-xl",label:"Pony Diffusion V6 XL",capabilities:[]},{id:"recraft/recraft-v4",label:"Recraft V4",capabilities:[]},{id:"recraft/recraft-v4-pro",label:"Recraft V4 Pro",capabilities:[]},{id:"google/gemini-3.1-flash-image",label:"Nano Banana 2",capabilities:["inputs","4k","native_enhance_prompt","native_auto_size"]},{id:"google/gemini-3-pro-image-preview",label:"Nano Banana Pro",capabilities:["4k","native_enhance_prompt"]},{id:"wan/wan2.6-image",label:"Wan 2.6 Image",capabilities:[]},{id:"xai/grok-imagine-image",label:"Grok Imagine Image",capabilities:["native_auto_size"]}];class Y extends Error{status;code;constructor(J,Q,Z){super(J);this.name="MynthAPIError",this.status=Q,this.code=Z}}class H{apiKey;baseUrl;constructor(J){this.apiKey=J.apiKey,this.baseUrl=J.baseUrl?J.baseUrl.endsWith("/")?J.baseUrl.slice(0,-1):J.baseUrl:V}getAuthHeaders(J){return{Authorization:`Bearer ${J?.accessToken??this.apiKey}`}}getUrl(J){return`${this.baseUrl}${J}`}async post(J,Q){let Z=await fetch(this.getUrl(J),{method:"POST",headers:{"Content-Type":"application/json",...this.getAuthHeaders()},body:JSON.stringify(Q)}),$=await Z.json();if(!Z.ok){let x=$,B=x.error||x.message||`Request failed with status ${Z.status}`;throw new Y(B,Z.status,x.code)}return $}async get(J,{headers:Q,accessToken:Z}={}){let $=await fetch(this.getUrl(J),{headers:{...this.getAuthHeaders({accessToken:Z}),...Q}});return{data:await $.json(),status:$.status,ok:$.ok}}}class j{data;constructor(J){this.data=J}get id(){return this.data.id}get status(){return this.data.status}get result(){return this.data.result}get isCompleted(){return this.data.status==="completed"}get isFailed(){return this.data.status==="failed"}get urls(){return this.data.result?.images.filter((J)=>J.status==="succeeded").map((J)=>J.url)??[]}getImages(J={}){if(J.includeFailed)return this.data.result?.images??[];return this.data.result?.images.filter((Q)=>Q.status==="succeeded")??[]}getMetadata(){return this.data.request?.metadata}}var D=300000,g=12000,L=2500,M=5000,_=7;class f extends Error{constructor(J){super(`Task ${J} polling timed out after ${D}ms`);this.name="TaskAsyncTimeoutError"}}class W extends Error{constructor(J){super(`Unauthorized access to task ${J}`);this.name="TaskAsyncUnauthorizedError"}}class q extends Error{constructor(J,Q){super(`Failed to fetch status for task ${J} after multiple retries`);this.name="TaskAsyncFetchError",this.cause=Q}}class w extends Error{constructor(J,Q){let Z=Q?` (status ${Q})`:"";super(`Failed to fetch task ${J}${Z}`);this.name="TaskAsyncTaskFetchError"}}class z extends Error{constructor(J){super(`Task ${J} failed during generation`);this.name="TaskAsyncTaskFailedError"}}class C{id;client;_access;_completionPromise=null;constructor(J,Q){this.id=J,this.client=Q.client,this._access={publicAccessToken:Q.pat}}get access(){return this._access}toString(){return this.id}async toTask(){if(!this._completionPromise)this._completionPromise=this.pollUntilCompleted();return this._completionPromise}async pollUntilCompleted(){let J=Date.now(),Q=0,Z=!1,$;while(!0){let x=Date.now()-J;if(x>=D)throw new f(this.id);let B=await this.fetchStatus(Z);if(B.ok){if(Q=0,B.status==="completed"){let U=await this.fetchTask();return new j(U)}if(B.status==="failed")throw new z(this.id)}else{if(B.unauthorized){if(this._access.publicAccessToken&&!Z){Z=!0;continue}throw new W(this.id)}if(B.retryable){if(Q++,$=B.error,Q>=_)throw new q(this.id,$)}}let R=x<g?L:M,N=Math.random()*500,O=R+N,F=D-x,S=Math.min(O,F);await this.sleep(S)}}async fetchStatus(J){let Q=J||!this._access.publicAccessToken?void 0:this._access.publicAccessToken;try{let Z=await this.client.get(G(this.id),{accessToken:Q});if(Z.ok)return{ok:!0,status:Z.data.status};if(Z.status===401||Z.status===403)return{ok:!1,unauthorized:!0,retryable:!1};if(Z.status===404)return{ok:!1,unauthorized:!0,retryable:!1};if(Z.status>=500)return{ok:!1,unauthorized:!1,retryable:!0};return{ok:!1,unauthorized:!1,retryable:!1}}catch(Z){return{ok:!1,unauthorized:!1,retryable:!0,error:Z instanceof Error?Z:Error(String(Z))}}}async fetchTask(){let J=await this.client.get(v(this.id));if(J.ok)return J.data;if(J.status===401||J.status===403)throw new W(this.id);if(J.status===404)throw new W(this.id);throw new w(this.id,J.status)}sleep(J){return new Promise((Q)=>setTimeout(Q,J))}}function m(){if(typeof process<"u"&&process.env)return process.env[X];return}class K{client;constructor(J={}){let Q=J.apiKey??m();if(!Q)throw Error(`Mynth API key is required. Either pass it as an option or set the ${X} environment variable.`);this.client=new H({apiKey:Q,baseUrl:J.baseUrl})}async generate(J,Q={}){let Z=Q.mode??"sync",$=await this.client.post(b,J),x=new C($.taskId,{client:this.client,pat:$.access?.publicAccessToken});if(Z==="async")return x;return x.toTask()}}var i=K;export{i as default,W as TaskAsyncUnauthorizedError,f as TaskAsyncTimeoutError,w as TaskAsyncTaskFetchError,z as TaskAsyncTaskFailedError,q as TaskAsyncFetchError,Y as MynthAPIError,K as Mynth,P as AVAILABLE_MODELS};
|
package/dist/types.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare namespace MynthSDKTypes {
|
|
|
31
31
|
updatedAt: string;
|
|
32
32
|
};
|
|
33
33
|
/** Available model identifiers */
|
|
34
|
-
type ImageGenerationModelId = "alibaba/qwen-image-2.0" | "alibaba/qwen-image-2.0-pro" | "bytedance/seedream-5.0-lite" | "black-forest-labs/flux.1-dev" | "black-forest-labs/flux-1-schnell" | "black-forest-labs/flux.2-dev" | "black-forest-labs/flux.2-klein-4b" | "google/gemini-3.1-flash-image" | "google/gemini-3-pro-image-preview" | "tongyi-mai/z-image-turbo" | "john6666/bismuth-illustrious-mix" | "recraft/recraft-v4" | "recraft/recraft-v4-pro" | "wan/wan2.6-image" | "xai/grok-imagine-image";
|
|
34
|
+
type ImageGenerationModelId = "alibaba/qwen-image-2.0" | "alibaba/qwen-image-2.0-pro" | "bytedance/seedream-5.0-lite" | "black-forest-labs/flux.1-dev" | "black-forest-labs/flux-1-schnell" | "black-forest-labs/flux.2-dev" | "black-forest-labs/flux.2-klein-4b" | "google/gemini-3.1-flash-image" | "google/gemini-3-pro-image-preview" | "tongyi-mai/z-image-turbo" | "john6666/bismuth-illustrious-mix" | "purplesmartai/pony-diffusion-v6-xl" | "recraft/recraft-v4" | "recraft/recraft-v4-pro" | "wan/wan2.6-image" | "xai/grok-imagine-image";
|
|
35
35
|
/** Model to use for generation ("auto" lets the system choose) */
|
|
36
36
|
type ImageGenerationModel = ImageGenerationModelId | "auto";
|
|
37
37
|
/** Prompt enhancement mode for structured prompts */
|
|
@@ -70,6 +70,16 @@ export declare namespace MynthSDKTypes {
|
|
|
70
70
|
/** URL to receive webhook notifications */
|
|
71
71
|
url: string;
|
|
72
72
|
};
|
|
73
|
+
/** Public Access Token configuration */
|
|
74
|
+
type ImageGenerationRequestAccessPat = {
|
|
75
|
+
/** Include a short-lived Public Access Token in the create-task response */
|
|
76
|
+
enabled?: boolean;
|
|
77
|
+
};
|
|
78
|
+
/** Access-token configuration returned from the create-task response */
|
|
79
|
+
type ImageGenerationRequestAccess = {
|
|
80
|
+
/** Controls whether the response includes a task-scoped Public Access Token */
|
|
81
|
+
pat: ImageGenerationRequestAccessPat;
|
|
82
|
+
};
|
|
73
83
|
/** Webhook configuration */
|
|
74
84
|
type ImageGenerationRequestWebhook = {
|
|
75
85
|
/** Enable/disable webhooks (disabling overrides dashboard settings) */
|
|
@@ -92,23 +102,16 @@ export declare namespace MynthSDKTypes {
|
|
|
92
102
|
levels?: readonly ImageGenerationRequestContentRatingLevel[];
|
|
93
103
|
};
|
|
94
104
|
/** Available shorthand size presets */
|
|
95
|
-
type ImageGenerationRequestSizePreset = "
|
|
96
|
-
/**
|
|
97
|
-
type ImageGenerationRequestSizeScale = "
|
|
98
|
-
/**
|
|
99
|
-
type ImageGenerationRequestAspectRatio =
|
|
100
|
-
/** Structured resolution size configuration */
|
|
101
|
-
type ImageGenerationRequestSizeResolution = {
|
|
102
|
-
type: "resolution";
|
|
103
|
-
width: number;
|
|
104
|
-
height: number;
|
|
105
|
-
mode?: "strict" | "preset" | "aligned";
|
|
106
|
-
};
|
|
105
|
+
type ImageGenerationRequestSizePreset = "square" | "portrait" | "landscape" | "portrait_tall" | "landscape_wide" | "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | "2:1" | "1:2" | "1:1_4k" | "2:3_4k" | "3:2_4k" | "3:4_4k" | "4:3_4k" | "4:5_4k" | "5:4_4k" | "9:16_4k" | "16:9_4k" | "21:9_4k" | "2:1_4k" | "1:2_4k";
|
|
106
|
+
/** Optional 4k scale for aspect ratio size mode */
|
|
107
|
+
type ImageGenerationRequestSizeScale = "4k";
|
|
108
|
+
/** Supported aspect ratio strings */
|
|
109
|
+
type ImageGenerationRequestAspectRatio = "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | "2:1" | "1:2";
|
|
107
110
|
/** Structured aspect ratio size configuration */
|
|
108
111
|
type ImageGenerationRequestSizeAspectRatio = {
|
|
109
112
|
type: "aspect_ratio";
|
|
110
113
|
aspectRatio: ImageGenerationRequestAspectRatio;
|
|
111
|
-
scale
|
|
114
|
+
scale?: ImageGenerationRequestSizeScale;
|
|
112
115
|
};
|
|
113
116
|
/** Structured auto size configuration */
|
|
114
117
|
type ImageGenerationRequestSizeAuto = {
|
|
@@ -130,9 +133,9 @@ export declare namespace MynthSDKTypes {
|
|
|
130
133
|
};
|
|
131
134
|
/**
|
|
132
135
|
* Image size specification.
|
|
133
|
-
* Can be a preset name,
|
|
136
|
+
* Can be a preset name, auto, or structured aspect-ratio size object with optional 4k scale.
|
|
134
137
|
*/
|
|
135
|
-
type ImageGenerationRequestSize = ImageGenerationRequestSizePreset |
|
|
138
|
+
type ImageGenerationRequestSize = ImageGenerationRequestSizePreset | ImageGenerationRequestSizeAspectRatio | ImageGenerationRequestSizeAuto | "auto";
|
|
136
139
|
/**
|
|
137
140
|
* Image generation request parameters.
|
|
138
141
|
*/
|
|
@@ -151,6 +154,8 @@ export declare namespace MynthSDKTypes {
|
|
|
151
154
|
webhook?: ImageGenerationRequestWebhook;
|
|
152
155
|
/** Content rating classification settings */
|
|
153
156
|
content_rating?: ImageGenerationRequestContentRating;
|
|
157
|
+
/** Public Access Token response configuration */
|
|
158
|
+
access?: ImageGenerationRequestAccess;
|
|
154
159
|
/** Optional input images as URL shortcuts or structured objects */
|
|
155
160
|
inputs?: (string | ImageGenerationRequestInput)[];
|
|
156
161
|
/** Custom metadata to attach (returned in results and webhooks). Max 2KB. */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAC7B,kCAAkC;IAClC,KAAY,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAE5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AEG;IACH,KAAY,gCAAgC,GAAG;QAC7C,IAAI,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;QACrB,KAAK,EAAE,sBAAsB,CAAC;QAC9B,MAAM,EAAE,WAAW,CAAC;QACpB,OAAO,EAAE,sBAAsB,CAAC;KACjC,CAAC;IAEF;;OAEG;IACH,KAAY,6BAA6B,GAAG;QAC1C,IAAI,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;QACrB,KAAK,EAAE,mBAAmB,CAAC;QAC3B,OAAO,EAAE,sBAAsB,CAAC;KACjC,CAAC;IAEF;;OAEG;IACH,KAAY,cAAc,GAAG,gCAAgC,GAAG,6BAA6B,CAAC;CAC/F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mynthio/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Official Mynth SDK for image generation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -47,8 +47,9 @@
|
|
|
47
47
|
"typecheck": "tsc --noEmit"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
+
"@types/node": "^25.5.0",
|
|
50
51
|
"convex": "^1.32.0",
|
|
51
|
-
"typescript": "
|
|
52
|
+
"typescript": "6.0.2",
|
|
52
53
|
"vitest": "^4.0.18"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|