@mynthio/sdk 0.0.40 → 0.0.41

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.
Files changed (44) hide show
  1. package/README.md +3 -3
  2. package/dist/convex/index.d.ts +39 -100
  3. package/dist/convex/index.js +41 -2
  4. package/dist/handler.d.ts +28 -0
  5. package/dist/handler.js +121 -0
  6. package/dist/index.d.ts +674 -360
  7. package/dist/index.js +1469 -2
  8. package/dist/next/index.d.ts +14 -24
  9. package/dist/next/index.js +25 -2
  10. package/dist/tanstack-start/index.d.ts +18 -23
  11. package/dist/tanstack-start/index.js +11 -2
  12. package/dist/types.d.ts +610 -660
  13. package/package.json +16 -21
  14. package/dist/client.d.ts +0 -41
  15. package/dist/client.d.ts.map +0 -1
  16. package/dist/constants.d.ts +0 -95
  17. package/dist/constants.d.ts.map +0 -1
  18. package/dist/convex/index.d.ts.map +0 -1
  19. package/dist/convex/utils.d.ts +0 -2
  20. package/dist/convex/utils.d.ts.map +0 -1
  21. package/dist/image-alt-result.d.ts +0 -19
  22. package/dist/image-alt-result.d.ts.map +0 -1
  23. package/dist/image-generation-result.d.ts +0 -58
  24. package/dist/image-generation-result.d.ts.map +0 -1
  25. package/dist/image-rate-result.d.ts +0 -21
  26. package/dist/image-rate-result.d.ts.map +0 -1
  27. package/dist/image-remove-background-result.d.ts +0 -24
  28. package/dist/image-remove-background-result.d.ts.map +0 -1
  29. package/dist/image-review-result.d.ts +0 -28
  30. package/dist/image-review-result.d.ts.map +0 -1
  31. package/dist/index-apss16tr.js +0 -3
  32. package/dist/index-ty295921.js +0 -3
  33. package/dist/index.d.ts.map +0 -1
  34. package/dist/next/index.d.ts.map +0 -1
  35. package/dist/tanstack-start/index.d.ts.map +0 -1
  36. package/dist/task-async.d.ts +0 -95
  37. package/dist/task-async.d.ts.map +0 -1
  38. package/dist/types.d.ts.map +0 -1
  39. package/dist/uploads.d.ts +0 -31
  40. package/dist/uploads.d.ts.map +0 -1
  41. package/dist/video-generation-result.d.ts +0 -46
  42. package/dist/video-generation-result.d.ts.map +0 -1
  43. package/dist/webhooks/utils.d.ts +0 -5
  44. package/dist/webhooks/utils.d.ts.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,34 +1,350 @@
1
- import { MynthAPIError } from "./client";
2
- import type { AvailableModel, ModelCapability } from "./constants";
3
- import type { AvailableVideoModel, VideoInputRole, VideoResolutionTier } from "./constants";
4
- import { AVAILABLE_MODELS, AVAILABLE_VIDEO_MODELS } from "./constants";
5
- import { ImageAltResult } from "./image-alt-result";
6
- import { ImageGenerationResult } from "./image-generation-result";
7
- import { ImageRateResult } from "./image-rate-result";
8
- import { ImageRemoveBackgroundResult } from "./image-remove-background-result";
9
- import { ImageReviewResult } from "./image-review-result";
10
- import type { TaskAsyncAccess } from "./task-async";
11
- import { TaskAsync, TaskAsyncFetchError, TaskAsyncTaskFailedError, TaskAsyncTaskFetchError, TaskAsyncTimeoutError, TaskAsyncUnauthorizedError } from "./task-async";
12
- import type { MynthSDKTypes } from "./types";
13
- import { VideoGenerationResult } from "./video-generation-result";
1
+ import { a as AvailableVideoModel, c as VideoResolutionTier, i as AvailableModel, n as AVAILABLE_MODELS, o as ModelCapability, r as AVAILABLE_VIDEO_MODELS, s as VideoInputRole, t as MynthSDKTypes } from "./types.js";
2
+ //#region src/client.d.ts
3
+ /**
4
+ * Error thrown when an API request fails.
5
+ */
6
+ export declare class MynthAPIError extends Error {
7
+ /** HTTP status code of the failed request */
8
+ readonly status: number;
9
+ /** Error code from the API response, if available */
10
+ readonly code?: string | undefined;
11
+ constructor(message: string, status: number, code?: string);
12
+ }
13
+ type MynthClientRequestOptions = {
14
+ headers?: Record<string, string>;
15
+ accessToken?: string | undefined;
16
+ auth?: boolean | undefined;
17
+ };
18
+ /**
19
+ * Internal HTTP client for making API requests.
20
+ * @internal
21
+ */
22
+ declare class MynthClient {
23
+ private readonly apiKey;
24
+ private readonly baseUrl;
25
+ constructor(options: {
26
+ apiKey?: string | undefined;
27
+ baseUrl?: string | undefined;
28
+ });
29
+ getAuthHeaders(override?: Omit<MynthClientRequestOptions, "headers">): Record<string, string>;
30
+ getUrl(path: string): string;
31
+ post<DataType>(path: string, data: unknown): Promise<DataType>;
32
+ get<DataType>(path: string, { headers, accessToken, auth }?: MynthClientRequestOptions): Promise<{
33
+ data: DataType;
34
+ status: number;
35
+ ok: boolean;
36
+ }>;
37
+ getOrThrow<DataType>(path: string, options?: MynthClientRequestOptions): Promise<DataType>;
38
+ }
39
+ //#endregion
40
+ //#region src/image-alt-result.d.ts
41
+ /**
42
+ * Represents the result of a completed image alt text task.
43
+ */
44
+ export declare class ImageAltResult {
45
+ /** The task ID created for this alt text request */
46
+ readonly taskId: string;
47
+ /** Cost charged for the completed task */
48
+ readonly cost: string;
49
+ /** Generated alt text */
50
+ readonly alt: string;
51
+ constructor(data: {
52
+ taskId: string;
53
+ cost: string;
54
+ alt: string;
55
+ });
56
+ static fromTaskData(data: MynthSDKTypes.ImageAltTaskData): ImageAltResult;
57
+ }
58
+ //#endregion
59
+ //#region src/image-generation-result.d.ts
60
+ type TypedImageResultImageSuccess<RatingT> = Omit<MynthSDKTypes.ImageResultImageSuccess, "rating"> & {
61
+ rating?: RatingT;
62
+ };
63
+ type TypedImageResultImageFailure = MynthSDKTypes.ImageResultImageFailure;
64
+ type TypedImageResultImage<RatingT> = TypedImageResultImageSuccess<RatingT> | TypedImageResultImageFailure;
65
+ type TypedImageResult<RatingT> = Omit<MynthSDKTypes.ImageResult, "images"> & {
66
+ images: TypedImageResultImage<RatingT>[];
67
+ };
68
+ /**
69
+ * Represents a completed image generation task.
70
+ *
71
+ * @template MetadataT - Type of the metadata attached to the request
72
+ * @template RatingT - Type of the rating response
73
+ */
74
+ export declare class ImageGenerationResult<MetadataT = Record<string, unknown> | undefined, RatingT = MynthSDKTypes.ImageResultRating | undefined> {
75
+ /** Raw task data from the API */
76
+ readonly data: MynthSDKTypes.ImageGenerationTaskData;
77
+ constructor(data: MynthSDKTypes.ImageGenerationTaskData);
78
+ /** Unique identifier for this task */
79
+ get id(): string;
80
+ /** Current status of the task */
81
+ get status(): MynthSDKTypes.TaskStatus;
82
+ /**
83
+ * The generation result containing images, cost, and model info.
84
+ * Returns `null` if the task hasn't completed yet.
85
+ */
86
+ get result(): TypedImageResult<RatingT> | null;
87
+ /** Whether the task completed successfully */
88
+ get isCompleted(): boolean;
89
+ /** Whether the task failed */
90
+ get isFailed(): boolean;
91
+ /**
92
+ * Get all successfully generated image URLs.
93
+ * Convenience method that extracts just the URLs from successful images.
94
+ * Images delivered only to a user destination may have a `null` url and are omitted here;
95
+ * use `getImages()` and read `mynth_url` to access the CDN URL directly.
96
+ */
97
+ get urls(): string[];
98
+ /**
99
+ * Get generated images from the task result.
100
+ *
101
+ * @param options.includeFailed - If true, includes failed image results
102
+ * @returns Array of image results
103
+ */
104
+ getImages(options: {
105
+ includeFailed: true;
106
+ }): TypedImageResultImage<RatingT>[];
107
+ getImages(options?: {
108
+ includeFailed?: false;
109
+ }): TypedImageResultImageSuccess<RatingT>[];
110
+ /**
111
+ * Get the metadata that was attached to the generation request.
112
+ */
113
+ getMetadata(): MetadataT;
114
+ }
115
+ //#endregion
116
+ //#region src/image-rate-result.d.ts
117
+ /**
118
+ * Represents the result of a completed image content rating task.
119
+ *
120
+ * @template LevelT - Union of possible rating level strings (e.g. `"sfw" | "nsfw"`)
121
+ */
122
+ export declare class ImageRateResult<LevelT extends string = "sfw" | "nsfw"> {
123
+ /** The task ID created for this rating request */
124
+ readonly taskId: string;
125
+ /** Cost charged for the completed task */
126
+ readonly cost: string;
127
+ /** Assigned rating level */
128
+ readonly level: LevelT;
129
+ constructor(data: {
130
+ taskId: string;
131
+ cost: string;
132
+ level: LevelT;
133
+ });
134
+ static fromTaskData<LevelT extends string = "sfw" | "nsfw">(data: MynthSDKTypes.ImageRateTaskData): ImageRateResult<LevelT>;
135
+ }
136
+ //#endregion
137
+ //#region src/image-remove-background-result.d.ts
138
+ /**
139
+ * Represents the result of a completed image background removal task.
140
+ *
141
+ * @template MetadataT - Type of the metadata attached to the request
142
+ */
143
+ export declare class ImageRemoveBackgroundResult<MetadataT = Record<string, unknown> | undefined> {
144
+ /** The task ID created for this request */
145
+ readonly taskId: string;
146
+ /** Cost charged for the completed task */
147
+ readonly cost: string;
148
+ /** The image with its background removed */
149
+ readonly image: MynthSDKTypes.ImageRemoveBackgroundResultImage;
150
+ /** Metadata attached to the request */
151
+ readonly metadata: MetadataT;
152
+ constructor(data: {
153
+ taskId: string;
154
+ cost: string;
155
+ image: MynthSDKTypes.ImageRemoveBackgroundResultImage;
156
+ metadata: MetadataT;
157
+ });
158
+ static fromTaskData<MetadataT = Record<string, unknown> | undefined>(data: MynthSDKTypes.ImageRemoveBackgroundTaskData): ImageRemoveBackgroundResult<MetadataT>;
159
+ }
160
+ //#endregion
161
+ //#region src/image-review-result.d.ts
162
+ /**
163
+ * Represents the result of a completed image quality review task.
164
+ */
165
+ export declare class ImageReviewResult {
166
+ /** The task ID created for this review request */
167
+ readonly taskId: string;
168
+ /** Cost charged for the completed task */
169
+ readonly cost: string;
170
+ /** Median reviewer score from 1 to 4. Higher is better. */
171
+ readonly score: number;
172
+ /** Review summary */
173
+ readonly summary: string;
174
+ /** Defects found by the reviewer panel */
175
+ readonly findings: MynthSDKTypes.ImageReviewFinding[];
176
+ /** Strengths identified by the reviewer panel */
177
+ readonly strengths: MynthSDKTypes.ImageReviewStrength[];
178
+ constructor(data: {
179
+ taskId: string;
180
+ cost: string;
181
+ score: number;
182
+ summary: string;
183
+ findings: MynthSDKTypes.ImageReviewFinding[];
184
+ strengths: MynthSDKTypes.ImageReviewStrength[];
185
+ });
186
+ static fromTaskData(data: MynthSDKTypes.ImageReviewTaskData): ImageReviewResult;
187
+ }
188
+ //#endregion
189
+ //#region src/task-async.d.ts
190
+ /**
191
+ * Polling cadence overrides. Anything omitted keeps the image-task default.
192
+ */
193
+ type TaskAsyncPolling = {
194
+ /** Total wait budget before `TaskAsyncTimeoutError`. */
195
+ timeoutMs?: number;
196
+ /** How long the opening fast-polling phase lasts. `0` disables it. */
197
+ fastDurationMs?: number;
198
+ /** Interval used during the fast phase. */
199
+ fastIntervalMs?: number;
200
+ /** Interval used after the fast phase. */
201
+ intervalMs?: number;
202
+ };
203
+ /**
204
+ * Error thrown when task polling exceeds the maximum timeout duration.
205
+ */
206
+ export declare class TaskAsyncTimeoutError extends Error {
207
+ constructor(taskId: string, timeoutMs?: number);
208
+ }
209
+ /**
210
+ * Error thrown when access to a task is denied (invalid API key or PAT).
211
+ */
212
+ export declare class TaskAsyncUnauthorizedError extends Error {
213
+ constructor(taskId: string);
214
+ }
215
+ /**
216
+ * Error thrown when fetching task status fails after multiple retries.
217
+ */
218
+ export declare class TaskAsyncFetchError extends Error {
219
+ constructor(taskId: string, cause?: Error);
220
+ }
221
+ /**
222
+ * Error thrown when fetching full task data fails.
223
+ */
224
+ export declare class TaskAsyncTaskFetchError extends Error {
225
+ constructor(taskId: string, status?: number, cause?: Error);
226
+ }
227
+ /**
228
+ * Error thrown when a task fails before completion.
229
+ */
230
+ export declare class TaskAsyncTaskFailedError extends Error {
231
+ constructor(taskId: string);
232
+ }
233
+ /**
234
+ * Public access information for a task, used for client-side polling.
235
+ */
236
+ type TaskAsyncAccess = {
237
+ /** Public access token for client-side status polling */
238
+ publicAccessToken?: string | undefined;
239
+ };
240
+ /**
241
+ * Represents an async task that can be polled for completion.
242
+ * Use `wait()` to poll until completion and get the typed result.
243
+ *
244
+ * @template ResultT - The result type returned once the task completes
245
+ */
246
+ export declare class TaskAsync<ResultT> {
247
+ /** The unique identifier for this task */
248
+ readonly id: string;
249
+ private readonly client;
250
+ private readonly _access;
251
+ private readonly resultFactory;
252
+ private readonly polling;
253
+ private _completionPromise;
254
+ constructor(id: string, options: {
255
+ client: MynthClient;
256
+ pat?: string | undefined;
257
+ resultFactory: (data: MynthSDKTypes.TaskData) => ResultT;
258
+ polling?: TaskAsyncPolling;
259
+ });
260
+ /**
261
+ * Public access information for client-side polling.
262
+ * Contains the public access token if one was generated.
263
+ */
264
+ get access(): TaskAsyncAccess;
265
+ toString(): string;
266
+ /**
267
+ * Polls the task until completion and returns the typed result.
268
+ * Multiple calls to this method return the same promise.
269
+ *
270
+ * @throws {TaskAsyncTimeoutError} If polling exceeds the timeout
271
+ * @throws {TaskAsyncUnauthorizedError} If access is denied
272
+ * @throws {TaskAsyncFetchError} If fetching status fails repeatedly
273
+ * @throws {TaskAsyncTaskFetchError} If fetching the completed task fails
274
+ * @throws {TaskAsyncTaskFailedError} If the task fails before completion
275
+ */
276
+ wait(): Promise<ResultT>;
277
+ private pollUntilCompleted;
278
+ private fetchStatus;
279
+ private fetchTask;
280
+ private sleep;
281
+ }
282
+ //#endregion
283
+ //#region src/video-generation-result.d.ts
284
+ /**
285
+ * Represents a completed video generation task.
286
+ *
287
+ * @template MetadataT - Type of the metadata attached to the request
288
+ */
289
+ export declare class VideoGenerationResult<MetadataT = Record<string, unknown> | undefined> {
290
+ /** Raw task data from the API */
291
+ readonly data: MynthSDKTypes.VideoGenerationTaskData;
292
+ constructor(data: MynthSDKTypes.VideoGenerationTaskData);
293
+ /** Unique identifier for this task */
294
+ get id(): string;
295
+ /** Current status of the task */
296
+ get status(): MynthSDKTypes.TaskStatus;
297
+ /**
298
+ * The generation result containing videos and model info.
299
+ * Returns `null` if the task hasn't completed yet.
300
+ */
301
+ get result(): MynthSDKTypes.VideoResult | null;
302
+ /** Whether the task completed successfully */
303
+ get isCompleted(): boolean;
304
+ /** Whether the task failed */
305
+ get isFailed(): boolean;
306
+ /**
307
+ * Get all successfully generated video URLs.
308
+ * Convenience method that extracts just the URLs from successful videos.
309
+ */
310
+ get urls(): string[];
311
+ /**
312
+ * Get generated videos from the task result.
313
+ *
314
+ * @param options.includeFailed - If true, includes failed video results
315
+ * @returns Array of video results
316
+ */
317
+ getVideos(options: {
318
+ includeFailed: true;
319
+ }): MynthSDKTypes.VideoResultVideo[];
320
+ getVideos(options?: {
321
+ includeFailed?: false;
322
+ }): MynthSDKTypes.VideoResultVideoSuccess[];
323
+ /**
324
+ * Get the metadata that was attached to the generation request.
325
+ */
326
+ getMetadata(): MetadataT;
327
+ }
328
+ //#endregion
329
+ //#region src/index.d.ts
14
330
  /**
15
331
  * Configuration options for the Mynth client.
16
332
  */
17
333
  type MynthOptions = {
18
- /**
19
- * Your Mynth API key. If not provided, reads from MYNTH_API_KEY environment variable.
20
- */
21
- apiKey?: string;
22
- /**
23
- * Custom base URL for the API. Useful for proxies or testing.
24
- */
25
- baseUrl?: string;
26
- /**
27
- * Default destination name (slug) to deliver generated images to.
28
- * If not provided, reads from MYNTH_DESTINATION environment variable.
29
- * Can be overridden on a per-request basis via `request.destination`.
30
- */
31
- destination?: string;
334
+ /**
335
+ * Your Mynth API key. If not provided, reads from MYNTH_API_KEY environment variable.
336
+ */
337
+ apiKey?: string | undefined;
338
+ /**
339
+ * Custom base URL for the API. Useful for proxies or testing.
340
+ */
341
+ baseUrl?: string | undefined;
342
+ /**
343
+ * Default destination name (slug) to deliver generated images to.
344
+ * If not provided, reads from MYNTH_DESTINATION environment variable.
345
+ * Can be overridden on a per-request basis via `request.destination`.
346
+ */
347
+ destination?: string | undefined;
32
348
  };
33
349
  type MynthModel = MynthSDKTypes.Model;
34
350
  type MynthModelPricing = MynthSDKTypes.ModelPricing;
@@ -37,31 +353,31 @@ type ExtractVideoMetadata<T extends MynthSDKTypes.VideoGenerationClientRequest>
37
353
  type ExtractRemoveBackgroundMetadata<T extends MynthSDKTypes.ImageRemoveBackgroundClientRequest> = T["metadata"];
38
354
  type ExtractRatingConfig<T extends MynthSDKTypes.ImageGenerationClientRequest> = T["rating"];
39
355
  type ExtractRatingLevels<T extends MynthSDKTypes.ImageGenerationClientRequest> = ExtractRatingConfig<T> extends {
40
- levels: readonly (infer L)[];
356
+ levels: readonly (infer L)[];
41
357
  } ? L : ExtractRatingConfig<T> extends {
42
- levels: (infer L)[];
358
+ levels: (infer L)[];
43
359
  } ? L : never;
44
360
  type ExtractRatingLevelValues<T extends MynthSDKTypes.ImageGenerationClientRequest> = ExtractRatingLevels<T> extends {
45
- value: infer V;
361
+ value: infer V;
46
362
  } ? (V extends string ? V : never) : never;
47
363
  type IsRatingCustom<T extends MynthSDKTypes.ImageGenerationClientRequest> = ExtractRatingConfig<T> extends {
48
- mode: "custom";
49
- levels: readonly any[] | any[];
364
+ mode: "custom";
365
+ levels: readonly any[] | any[];
50
366
  } ? true : false;
51
367
  type ExtractRatingResponse<T extends MynthSDKTypes.ImageGenerationClientRequest> = IsRatingCustom<T> extends true ? {
52
- status: "success";
53
- level: ExtractRatingLevelValues<T>;
368
+ status: "success";
369
+ level: ExtractRatingLevelValues<T>;
54
370
  } | MynthSDKTypes.ImageResultRatingFailure : ExtractRatingConfig<T> extends true | {
55
- mode: "nsfw_sfw";
371
+ mode: "nsfw_sfw";
56
372
  } ? {
57
- status: "success";
58
- level: MynthSDKTypes.ImageResultRatingDefaultLevel;
373
+ status: "success";
374
+ level: MynthSDKTypes.ImageResultRatingDefaultLevel;
59
375
  } | MynthSDKTypes.ImageResultRatingFailure : MynthSDKTypes.ImageResultRating | undefined;
60
376
  type ExtractRateLevelValues<T extends MynthSDKTypes.ImageRateClientRequest> = T extends {
61
- mode: "custom";
62
- levels: readonly {
63
- value: infer V;
64
- }[];
377
+ mode: "custom";
378
+ levels: readonly {
379
+ value: infer V;
380
+ }[];
65
381
  } ? V extends string ? V : string : MynthSDKTypes.ImageResultRatingDefaultLevel;
66
382
  /**
67
383
  * Client for interacting with the Mynth image generation and analysis APIs.
@@ -84,196 +400,196 @@ type ExtractRateLevelValues<T extends MynthSDKTypes.ImageRateClientRequest> = T
84
400
  * ```
85
401
  */
86
402
  declare class MynthImage {
87
- private readonly client;
88
- private readonly defaultDestination?;
89
- /**
90
- * Creates a new MynthImage client instance.
91
- *
92
- * @param options - Configuration options
93
- * @param options.apiKey - Your API key (defaults to MYNTH_API_KEY env var)
94
- * @param options.baseUrl - Custom API base URL
95
- * @param options.destination - Default destination name (defaults to MYNTH_DESTINATION env var)
96
- * @throws {Error} If no API key is provided and MYNTH_API_KEY is not set
97
- */
98
- constructor(options?: MynthOptions);
99
- /**
100
- * Generate images from a text prompt.
101
- *
102
- * @param request - Image generation request parameters
103
- * @returns A completed ImageGenerationResult with the generation results
104
- *
105
- * @example
106
- * ```typescript
107
- * const result = await image.generate({
108
- * prompt: "A serene lake at dawn",
109
- * model: "black-forest-labs/flux.1-dev",
110
- * });
111
- * console.log(result.urls);
112
- * ```
113
- */
114
- generate<const T extends MynthSDKTypes.ImageGenerationClientRequest>(request: T): Promise<ImageGenerationResult<ExtractMetadata<T>, ExtractRatingResponse<T>>>;
115
- /**
116
- * Upload one or more images to Mynth temporary input storage.
117
- *
118
- * Accepts File/Blob or an array of File/Blob inputs.
119
- *
120
- * @param input - Image input or inputs to upload
121
- * @returns Uploaded image URLs that can be passed to generation `inputs`
122
- *
123
- * @example
124
- * ```typescript
125
- * const { urls } = await image.upload(file);
126
- * await image.generate({ prompt: "Use this reference", inputs: urls });
127
- * ```
128
- */
129
- upload(input: MynthSDKTypes.ImageUploadInput | readonly MynthSDKTypes.ImageUploadInput[]): Promise<MynthSDKTypes.ImageUploadResponse>;
130
- /**
131
- * Start image generation without waiting for completion.
132
- *
133
- * @param request - Image generation request parameters
134
- * @returns A TaskAsync that can be polled for completion via `.wait()`
135
- *
136
- * @example
137
- * ```typescript
138
- * const taskAsync = await image.generateAsync({
139
- * prompt: "A futuristic cityscape",
140
- * });
141
- *
142
- * return { id: taskAsync.id, access: taskAsync.access };
143
- * ```
144
- */
145
- generateAsync<const T extends MynthSDKTypes.ImageGenerationClientRequest>(request: T): Promise<TaskAsync<ImageGenerationResult<ExtractMetadata<T>, ExtractRatingResponse<T>>>>;
146
- private createGenerationTask;
147
- /**
148
- * Rate the content of a single image.
149
- *
150
- * Uses AI classification to assign a rating level. Mode defaults to
151
- * `"nsfw_sfw"` (`"sfw"` / `"nsfw"`); pass custom `levels` to define your own scale.
152
- *
153
- * @param request - Image URL or local file, and optional rating mode
154
- * @returns An ImageRateResult with the assigned level
155
- *
156
- * @example
157
- * ```typescript
158
- * // Default sfw/nsfw (mode optional)
159
- * const result = await image.rate({ url: "https://..." });
160
- * console.log(result.level); // "sfw" | "nsfw"
161
- *
162
- * // Custom levels
163
- * const result = await image.rate({
164
- * url: "https://...",
165
- * mode: "custom",
166
- * levels: [
167
- * { value: "safe", description: "No explicit content" },
168
- * { value: "mature", description: "Adult themes, no nudity" },
169
- * { value: "explicit", description: "Contains nudity or graphic content" },
170
- * ] as const,
171
- * });
172
- * console.log(result.level); // "safe" | "mature" | "explicit"
173
- * ```
174
- */
175
- rate<const T extends MynthSDKTypes.ImageRateClientRequest>(request: T): Promise<ImageRateResult<ExtractRateLevelValues<T>>>;
176
- /**
177
- * Start image content rating without waiting for completion.
178
- *
179
- * @param request - Image URL or local file, and optional rating mode
180
- * @returns A TaskAsync that can be polled for completion via `.wait()`
181
- *
182
- * @example
183
- * ```typescript
184
- * const taskAsync = await image.rateAsync({ url: "https://..." });
185
- *
186
- * const result = await taskAsync.wait();
187
- * console.log(result.level);
188
- * ```
189
- */
190
- rateAsync<const T extends MynthSDKTypes.ImageRateClientRequest>(request: T): Promise<TaskAsync<ImageRateResult<ExtractRateLevelValues<T>>>>;
191
- private resolveUrlOrFile;
192
- private createRateTask;
193
- /**
194
- * Generate alt text for a single image.
195
- *
196
- * Uses AI image analysis to produce short alt text for the image.
197
- *
198
- * @param request - Image URL or local file
199
- * @returns An ImageAltResult with the generated alt text
200
- *
201
- * @example
202
- * ```typescript
203
- * const result = await image.alt({ url: "https://..." });
204
- * console.log(result.alt);
205
- * ```
206
- */
207
- alt(request: MynthSDKTypes.ImageAltClientRequest): Promise<ImageAltResult>;
208
- /**
209
- * Start image alt text generation without waiting for completion.
210
- *
211
- * @param request - Image URL or local file
212
- * @returns A TaskAsync that can be polled for completion via `.wait()`
213
- *
214
- * @example
215
- * ```typescript
216
- * const taskAsync = await image.altAsync({ url: "https://..." });
217
- *
218
- * const result = await taskAsync.wait();
219
- * console.log(result.alt);
220
- * ```
221
- */
222
- altAsync(request: MynthSDKTypes.ImageAltClientRequest): Promise<TaskAsync<ImageAltResult>>;
223
- private createAltTask;
224
- /**
225
- * Review a single image with a multi-model quality panel.
226
- *
227
- * @param request - Image URL or local file, and optional review effort
228
- * @returns An ImageReviewResult with the score, summary, findings, and strengths
229
- *
230
- * @example
231
- * ```typescript
232
- * const result = await image.review({ url: "https://..." });
233
- * console.log(result.score); // 1–4, higher is better
234
- * console.log(result.findings);
235
- * ```
236
- */
237
- review(request: MynthSDKTypes.ImageReviewClientRequest): Promise<ImageReviewResult>;
238
- /**
239
- * Start an image quality review without waiting for completion.
240
- *
241
- * @param request - Image URL or local file, and optional review effort
242
- * @returns A TaskAsync that can be polled for completion via `.wait()`
243
- */
244
- reviewAsync(request: MynthSDKTypes.ImageReviewClientRequest): Promise<TaskAsync<ImageReviewResult>>;
245
- private createReviewTask;
246
- /**
247
- * Remove the background from a single image.
248
- *
249
- * Mynth picks the model. The result keeps the provider's format unless
250
- * `output.format` asks for `png` or `webp`.
251
- *
252
- * @param request - Image URL or local file, plus optional output, destination, webhook, and metadata
253
- * @returns An ImageRemoveBackgroundResult with the transparent image
254
- *
255
- * @example
256
- * ```typescript
257
- * const result = await image.removeBackground({ url: "https://..." });
258
- * console.log(result.image.url);
259
- * ```
260
- */
261
- removeBackground<const T extends MynthSDKTypes.ImageRemoveBackgroundClientRequest>(request: T): Promise<ImageRemoveBackgroundResult<ExtractRemoveBackgroundMetadata<T>>>;
262
- /**
263
- * Start background removal without waiting for completion.
264
- *
265
- * @param request - Image URL or local file, plus optional output, destination, webhook, and metadata
266
- * @returns A TaskAsync that can be polled for completion via `.wait()`
267
- *
268
- * @example
269
- * ```typescript
270
- * const taskAsync = await image.removeBackgroundAsync({ url: "https://..." });
271
- *
272
- * return { id: taskAsync.id, access: taskAsync.access };
273
- * ```
274
- */
275
- removeBackgroundAsync<const T extends MynthSDKTypes.ImageRemoveBackgroundClientRequest>(request: T): Promise<TaskAsync<ImageRemoveBackgroundResult<ExtractRemoveBackgroundMetadata<T>>>>;
276
- private createRemoveBackgroundTask;
403
+ private readonly client;
404
+ private readonly defaultDestination;
405
+ /**
406
+ * Creates a new MynthImage client instance.
407
+ *
408
+ * @param options - Configuration options
409
+ * @param options.apiKey - Your API key (defaults to MYNTH_API_KEY env var)
410
+ * @param options.baseUrl - Custom API base URL
411
+ * @param options.destination - Default destination name (defaults to MYNTH_DESTINATION env var)
412
+ * @throws {Error} If no API key is provided and MYNTH_API_KEY is not set
413
+ */
414
+ constructor(options?: MynthOptions);
415
+ /**
416
+ * Generate images from a text prompt.
417
+ *
418
+ * @param request - Image generation request parameters
419
+ * @returns A completed ImageGenerationResult with the generation results
420
+ *
421
+ * @example
422
+ * ```typescript
423
+ * const result = await image.generate({
424
+ * prompt: "A serene lake at dawn",
425
+ * model: "black-forest-labs/flux.1-dev",
426
+ * });
427
+ * console.log(result.urls);
428
+ * ```
429
+ */
430
+ generate<const T extends MynthSDKTypes.ImageGenerationClientRequest>(request: T): Promise<ImageGenerationResult<ExtractMetadata<T>, ExtractRatingResponse<T>>>;
431
+ /**
432
+ * Upload one or more images to Mynth temporary input storage.
433
+ *
434
+ * Accepts File/Blob or an array of File/Blob inputs.
435
+ *
436
+ * @param input - Image input or inputs to upload
437
+ * @returns Uploaded image URLs that can be passed to generation `inputs`
438
+ *
439
+ * @example
440
+ * ```typescript
441
+ * const { urls } = await image.upload(file);
442
+ * await image.generate({ prompt: "Use this reference", inputs: urls });
443
+ * ```
444
+ */
445
+ upload(input: MynthSDKTypes.ImageUploadInput | readonly MynthSDKTypes.ImageUploadInput[]): Promise<MynthSDKTypes.ImageUploadResponse>;
446
+ /**
447
+ * Start image generation without waiting for completion.
448
+ *
449
+ * @param request - Image generation request parameters
450
+ * @returns A TaskAsync that can be polled for completion via `.wait()`
451
+ *
452
+ * @example
453
+ * ```typescript
454
+ * const taskAsync = await image.generateAsync({
455
+ * prompt: "A futuristic cityscape",
456
+ * });
457
+ *
458
+ * return { id: taskAsync.id, access: taskAsync.access };
459
+ * ```
460
+ */
461
+ generateAsync<const T extends MynthSDKTypes.ImageGenerationClientRequest>(request: T): Promise<TaskAsync<ImageGenerationResult<ExtractMetadata<T>, ExtractRatingResponse<T>>>>;
462
+ private createGenerationTask;
463
+ /**
464
+ * Rate the content of a single image.
465
+ *
466
+ * Uses AI classification to assign a rating level. Mode defaults to
467
+ * `"nsfw_sfw"` (`"sfw"` / `"nsfw"`); pass custom `levels` to define your own scale.
468
+ *
469
+ * @param request - Image URL or local file, and optional rating mode
470
+ * @returns An ImageRateResult with the assigned level
471
+ *
472
+ * @example
473
+ * ```typescript
474
+ * // Default sfw/nsfw (mode optional)
475
+ * const result = await image.rate({ url: "https://..." });
476
+ * console.log(result.level); // "sfw" | "nsfw"
477
+ *
478
+ * // Custom levels
479
+ * const result = await image.rate({
480
+ * url: "https://...",
481
+ * mode: "custom",
482
+ * levels: [
483
+ * { value: "safe", description: "No explicit content" },
484
+ * { value: "mature", description: "Adult themes, no nudity" },
485
+ * { value: "explicit", description: "Contains nudity or graphic content" },
486
+ * ] as const,
487
+ * });
488
+ * console.log(result.level); // "safe" | "mature" | "explicit"
489
+ * ```
490
+ */
491
+ rate<const T extends MynthSDKTypes.ImageRateClientRequest>(request: T): Promise<ImageRateResult<ExtractRateLevelValues<T>>>;
492
+ /**
493
+ * Start image content rating without waiting for completion.
494
+ *
495
+ * @param request - Image URL or local file, and optional rating mode
496
+ * @returns A TaskAsync that can be polled for completion via `.wait()`
497
+ *
498
+ * @example
499
+ * ```typescript
500
+ * const taskAsync = await image.rateAsync({ url: "https://..." });
501
+ *
502
+ * const result = await taskAsync.wait();
503
+ * console.log(result.level);
504
+ * ```
505
+ */
506
+ rateAsync<const T extends MynthSDKTypes.ImageRateClientRequest>(request: T): Promise<TaskAsync<ImageRateResult<ExtractRateLevelValues<T>>>>;
507
+ private resolveUrlOrFile;
508
+ private createRateTask;
509
+ /**
510
+ * Generate alt text for a single image.
511
+ *
512
+ * Uses AI image analysis to produce short alt text for the image.
513
+ *
514
+ * @param request - Image URL or local file
515
+ * @returns An ImageAltResult with the generated alt text
516
+ *
517
+ * @example
518
+ * ```typescript
519
+ * const result = await image.alt({ url: "https://..." });
520
+ * console.log(result.alt);
521
+ * ```
522
+ */
523
+ alt(request: MynthSDKTypes.ImageAltClientRequest): Promise<ImageAltResult>;
524
+ /**
525
+ * Start image alt text generation without waiting for completion.
526
+ *
527
+ * @param request - Image URL or local file
528
+ * @returns A TaskAsync that can be polled for completion via `.wait()`
529
+ *
530
+ * @example
531
+ * ```typescript
532
+ * const taskAsync = await image.altAsync({ url: "https://..." });
533
+ *
534
+ * const result = await taskAsync.wait();
535
+ * console.log(result.alt);
536
+ * ```
537
+ */
538
+ altAsync(request: MynthSDKTypes.ImageAltClientRequest): Promise<TaskAsync<ImageAltResult>>;
539
+ private createAltTask;
540
+ /**
541
+ * Review a single image with a multi-model quality panel.
542
+ *
543
+ * @param request - Image URL or local file, and optional review effort
544
+ * @returns An ImageReviewResult with the score, summary, findings, and strengths
545
+ *
546
+ * @example
547
+ * ```typescript
548
+ * const result = await image.review({ url: "https://..." });
549
+ * console.log(result.score); // 1–4, higher is better
550
+ * console.log(result.findings);
551
+ * ```
552
+ */
553
+ review(request: MynthSDKTypes.ImageReviewClientRequest): Promise<ImageReviewResult>;
554
+ /**
555
+ * Start an image quality review without waiting for completion.
556
+ *
557
+ * @param request - Image URL or local file, and optional review effort
558
+ * @returns A TaskAsync that can be polled for completion via `.wait()`
559
+ */
560
+ reviewAsync(request: MynthSDKTypes.ImageReviewClientRequest): Promise<TaskAsync<ImageReviewResult>>;
561
+ private createReviewTask;
562
+ /**
563
+ * Remove the background from a single image.
564
+ *
565
+ * Mynth picks the model. The result keeps the provider's format unless
566
+ * `output.format` asks for `png` or `webp`.
567
+ *
568
+ * @param request - Image URL or local file, plus optional output, destination, webhook, and metadata
569
+ * @returns An ImageRemoveBackgroundResult with the transparent image
570
+ *
571
+ * @example
572
+ * ```typescript
573
+ * const result = await image.removeBackground({ url: "https://..." });
574
+ * console.log(result.image.url);
575
+ * ```
576
+ */
577
+ removeBackground<const T extends MynthSDKTypes.ImageRemoveBackgroundClientRequest>(request: T): Promise<ImageRemoveBackgroundResult<ExtractRemoveBackgroundMetadata<T>>>;
578
+ /**
579
+ * Start background removal without waiting for completion.
580
+ *
581
+ * @param request - Image URL or local file, plus optional output, destination, webhook, and metadata
582
+ * @returns A TaskAsync that can be polled for completion via `.wait()`
583
+ *
584
+ * @example
585
+ * ```typescript
586
+ * const taskAsync = await image.removeBackgroundAsync({ url: "https://..." });
587
+ *
588
+ * return { id: taskAsync.id, access: taskAsync.access };
589
+ * ```
590
+ */
591
+ removeBackgroundAsync<const T extends MynthSDKTypes.ImageRemoveBackgroundClientRequest>(request: T): Promise<TaskAsync<ImageRemoveBackgroundResult<ExtractRemoveBackgroundMetadata<T>>>>;
592
+ private createRemoveBackgroundTask;
277
593
  }
278
594
  /**
279
595
  * Client for interacting with the Mynth video generation API.
@@ -297,119 +613,119 @@ declare class MynthImage {
297
613
  * ```
298
614
  */
299
615
  declare class MynthVideo {
300
- private readonly client;
301
- /**
302
- * Creates a new MynthVideo client instance.
303
- *
304
- * @param options - Configuration options
305
- * @param options.apiKey - Your API key (defaults to MYNTH_API_KEY env var)
306
- * @param options.baseUrl - Custom API base URL
307
- * @throws {Error} If no API key is provided and MYNTH_API_KEY is not set
308
- */
309
- constructor(options?: Omit<MynthOptions, "destination">);
310
- /**
311
- * Generate a video from a text prompt, optionally guided by input images.
312
- *
313
- * Waits for the task to complete. Video generation is slow: this poll can
314
- * legitimately run for many minutes. Use `generateAsync()` (or a webhook)
315
- * when you cannot hold a request open that long.
316
- *
317
- * @param request - Video generation request parameters
318
- * @returns A completed VideoGenerationResult
319
- *
320
- * @example
321
- * ```typescript
322
- * const result = await video.generate({
323
- * model: "bytedance/seedance-2.0-mini",
324
- * prompt: "A drone shot over a misty forest at dawn",
325
- * });
326
- * console.log(result.urls);
327
- * ```
328
- */
329
- generate<const T extends MynthSDKTypes.VideoGenerationClientRequest>(request: T): Promise<VideoGenerationResult<ExtractVideoMetadata<T>>>;
330
- /**
331
- * Start video generation without waiting for completion.
332
- *
333
- * The preferred entry point for server code: hand `taskAsync.id` and
334
- * `taskAsync.access.publicAccessToken` to the browser, or register a webhook,
335
- * instead of holding a connection open for the length of a render.
336
- *
337
- * @param request - Video generation request parameters
338
- * @returns A TaskAsync that can be polled for completion via `.wait()`
339
- *
340
- * @example
341
- * ```typescript
342
- * const taskAsync = await video.generateAsync({
343
- * model: "prunaai/p-video",
344
- * prompt: "A neon city street in the rain",
345
- * });
346
- *
347
- * return { id: taskAsync.id, access: taskAsync.access };
348
- * ```
349
- */
350
- generateAsync<const T extends MynthSDKTypes.VideoGenerationClientRequest>(request: T): Promise<TaskAsync<VideoGenerationResult<ExtractVideoMetadata<T>>>>;
351
- /**
352
- * Upload one or more images to Mynth temporary input storage.
353
- *
354
- * Video inputs are images, so this is the same storage `image.upload()` uses.
355
- * Passing files straight to `generate()` uploads them for you; call this
356
- * directly only when you want to reuse the URLs across several requests.
357
- *
358
- * @param input - Image input or inputs to upload
359
- * @returns Uploaded image URLs that can be passed to generation `inputs`
360
- */
361
- upload(input: MynthSDKTypes.ImageUploadInput | readonly MynthSDKTypes.ImageUploadInput[]): Promise<MynthSDKTypes.ImageUploadResponse>;
362
- /**
363
- * Price a video generation request without generating anything.
364
- *
365
- * The request is validated exactly as `generate()` would validate it, so an
366
- * unsupported duration, resolution or input combination throws here too —
367
- * making this a cheap pre-flight check as well as a cost lookup. Because
368
- * video pins a concrete model, the returned estimate is exact.
369
- *
370
- * @param request - The same request you would pass to `generate()`
371
- * @returns The estimated cost in USD
372
- *
373
- * @example
374
- * ```typescript
375
- * const { estimatedCost } = await video.estimate({
376
- * model: "google/gemini-omni-flash-1.1",
377
- * prompt: "A timelapse of clouds over a canyon",
378
- * duration: 10,
379
- * resolution: "4k",
380
- * });
381
- * ```
382
- */
383
- estimate(request: MynthSDKTypes.VideoGenerationClientRequest): Promise<MynthSDKTypes.VideoGenerationEstimate>;
384
- private toRequestBody;
385
- private createGenerationTask;
616
+ private readonly client;
617
+ /**
618
+ * Creates a new MynthVideo client instance.
619
+ *
620
+ * @param options - Configuration options
621
+ * @param options.apiKey - Your API key (defaults to MYNTH_API_KEY env var)
622
+ * @param options.baseUrl - Custom API base URL
623
+ * @throws {Error} If no API key is provided and MYNTH_API_KEY is not set
624
+ */
625
+ constructor(options?: Omit<MynthOptions, "destination">);
626
+ /**
627
+ * Generate a video from a text prompt, optionally guided by input images.
628
+ *
629
+ * Waits for the task to complete. Video generation is slow: this poll can
630
+ * legitimately run for many minutes. Use `generateAsync()` (or a webhook)
631
+ * when you cannot hold a request open that long.
632
+ *
633
+ * @param request - Video generation request parameters
634
+ * @returns A completed VideoGenerationResult
635
+ *
636
+ * @example
637
+ * ```typescript
638
+ * const result = await video.generate({
639
+ * model: "bytedance/seedance-2.0-mini",
640
+ * prompt: "A drone shot over a misty forest at dawn",
641
+ * });
642
+ * console.log(result.urls);
643
+ * ```
644
+ */
645
+ generate<const T extends MynthSDKTypes.VideoGenerationClientRequest>(request: T): Promise<VideoGenerationResult<ExtractVideoMetadata<T>>>;
646
+ /**
647
+ * Start video generation without waiting for completion.
648
+ *
649
+ * The preferred entry point for server code: hand `taskAsync.id` and
650
+ * `taskAsync.access.publicAccessToken` to the browser, or register a webhook,
651
+ * instead of holding a connection open for the length of a render.
652
+ *
653
+ * @param request - Video generation request parameters
654
+ * @returns A TaskAsync that can be polled for completion via `.wait()`
655
+ *
656
+ * @example
657
+ * ```typescript
658
+ * const taskAsync = await video.generateAsync({
659
+ * model: "prunaai/p-video",
660
+ * prompt: "A neon city street in the rain",
661
+ * });
662
+ *
663
+ * return { id: taskAsync.id, access: taskAsync.access };
664
+ * ```
665
+ */
666
+ generateAsync<const T extends MynthSDKTypes.VideoGenerationClientRequest>(request: T): Promise<TaskAsync<VideoGenerationResult<ExtractVideoMetadata<T>>>>;
667
+ /**
668
+ * Upload one or more images to Mynth temporary input storage.
669
+ *
670
+ * Video inputs are images, so this is the same storage `image.upload()` uses.
671
+ * Passing files straight to `generate()` uploads them for you; call this
672
+ * directly only when you want to reuse the URLs across several requests.
673
+ *
674
+ * @param input - Image input or inputs to upload
675
+ * @returns Uploaded image URLs that can be passed to generation `inputs`
676
+ */
677
+ upload(input: MynthSDKTypes.ImageUploadInput | readonly MynthSDKTypes.ImageUploadInput[]): Promise<MynthSDKTypes.ImageUploadResponse>;
678
+ /**
679
+ * Price a video generation request without generating anything.
680
+ *
681
+ * The request is validated exactly as `generate()` would validate it, so an
682
+ * unsupported duration, resolution or input combination throws here too —
683
+ * making this a cheap pre-flight check as well as a cost lookup. Because
684
+ * video pins a concrete model, the returned estimate is exact.
685
+ *
686
+ * @param request - The same request you would pass to `generate()`
687
+ * @returns The estimated cost in USD
688
+ *
689
+ * @example
690
+ * ```typescript
691
+ * const { estimatedCost } = await video.estimate({
692
+ * model: "google/gemini-omni-flash-1.1",
693
+ * prompt: "A timelapse of clouds over a canyon",
694
+ * duration: 10,
695
+ * resolution: "4k",
696
+ * });
697
+ * ```
698
+ */
699
+ estimate(request: MynthSDKTypes.VideoGenerationClientRequest): Promise<MynthSDKTypes.VideoGenerationEstimate>;
700
+ private toRequestBody;
701
+ private createGenerationTask;
386
702
  }
387
703
  /**
388
704
  * Client for interacting with the public Mynth model catalog.
389
705
  */
390
706
  declare class MynthModels {
391
- private readonly client;
392
- /**
393
- * Creates a new MynthModels client instance.
394
- *
395
- * @param options - Configuration options
396
- * @param options.baseUrl - Custom API base URL
397
- */
398
- constructor(options?: Pick<MynthOptions, "baseUrl">);
399
- /**
400
- * List available image generation models.
401
- *
402
- * This endpoint is public and does not require a Mynth API key.
403
- *
404
- * @returns Available image and video models with display names, served modes, and pricing
405
- *
406
- * @example
407
- * ```typescript
408
- * const models = await mynth.models.list();
409
- * console.log(models[0]?.id);
410
- * ```
411
- */
412
- list(): Promise<MynthSDKTypes.Model[]>;
707
+ private readonly client;
708
+ /**
709
+ * Creates a new MynthModels client instance.
710
+ *
711
+ * @param options - Configuration options
712
+ * @param options.baseUrl - Custom API base URL
713
+ */
714
+ constructor(options?: Pick<MynthOptions, "baseUrl">);
715
+ /**
716
+ * List available image generation models.
717
+ *
718
+ * This endpoint is public and does not require a Mynth API key.
719
+ *
720
+ * @returns Available image and video models with display names, served modes, and pricing
721
+ *
722
+ * @example
723
+ * ```typescript
724
+ * const models = await mynth.models.list();
725
+ * console.log(models[0]?.id);
726
+ * ```
727
+ */
728
+ list(): Promise<MynthSDKTypes.Model[]>;
413
729
  }
414
730
  /**
415
731
  * Bundled Mynth client providing access to all media type clients.
@@ -425,25 +741,23 @@ declare class MynthModels {
425
741
  * ```
426
742
  */
427
743
  declare class Mynth {
428
- /** Public model catalog client */
429
- readonly models: MynthModels;
430
- private readonly options;
431
- private imageClient?;
432
- private videoClient?;
433
- /**
434
- * Creates a new Mynth client instance.
435
- *
436
- * @param options - Configuration options
437
- * @param options.apiKey - Your API key (defaults to MYNTH_API_KEY env var)
438
- * @param options.baseUrl - Custom API base URL
439
- */
440
- constructor(options?: MynthOptions);
441
- /** Image generation and analysis client */
442
- get image(): MynthImage;
443
- /** Video generation client */
444
- get video(): MynthVideo;
744
+ /** Public model catalog client */
745
+ readonly models: MynthModels;
746
+ private readonly options;
747
+ private imageClient?;
748
+ private videoClient?;
749
+ /**
750
+ * Creates a new Mynth client instance.
751
+ *
752
+ * @param options - Configuration options
753
+ * @param options.apiKey - Your API key (defaults to MYNTH_API_KEY env var)
754
+ * @param options.baseUrl - Custom API base URL
755
+ */
756
+ constructor(options?: MynthOptions);
757
+ /** Image generation and analysis client */
758
+ get image(): MynthImage;
759
+ /** Video generation client */
760
+ get video(): MynthVideo;
445
761
  }
446
- export { AVAILABLE_MODELS, AVAILABLE_VIDEO_MODELS, ImageAltResult, ImageGenerationResult, ImageRateResult, ImageRemoveBackgroundResult, ImageReviewResult, Mynth, MynthImage, MynthModels, MynthVideo, TaskAsync, VideoGenerationResult, MynthAPIError, TaskAsyncFetchError, TaskAsyncTaskFailedError, TaskAsyncTaskFetchError, TaskAsyncTimeoutError, TaskAsyncUnauthorizedError, };
447
- export type { AvailableModel, AvailableVideoModel, ModelCapability, MynthModel, MynthModelPricing, MynthOptions, MynthSDKTypes, TaskAsyncAccess, VideoInputRole, VideoResolutionTier, };
448
- export default Mynth;
449
- //# sourceMappingURL=index.d.ts.map
762
+ //#endregion
763
+ export { AVAILABLE_MODELS, AVAILABLE_VIDEO_MODELS, type AvailableModel, type AvailableVideoModel, type ModelCapability, Mynth, Mynth as default, MynthImage, type MynthModel, type MynthModelPricing, MynthModels, type MynthOptions, type MynthSDKTypes, MynthVideo, type TaskAsyncAccess, type VideoInputRole, type VideoResolutionTier };