@howells/motif-sdk 0.12.0 → 1.1.0
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 +10 -5
- package/dist/image.js +31 -1
- package/dist/index.cjs +31 -4
- package/dist/index.d.cts +4 -8
- package/dist/index.d.ts +4 -8
- package/dist/index.js +31 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,10 +10,14 @@ npm install @howells/motif-sdk
|
|
|
10
10
|
|
|
11
11
|
## Generate Images
|
|
12
12
|
|
|
13
|
+
The primary image API is `createMotifImage` (`@howells/motif-sdk/image`) — provider-agnostic generate/edit across google, openai, replicate, and fal. See [Image Layer](#image-layer-howellsmotif-sdkimage) below.
|
|
14
|
+
|
|
15
|
+
The examples in this section use the low-level `FalClient`, the fal-native client for fal-specific capabilities (queue, upload, upscale, background removal, video, and utility tools).
|
|
16
|
+
|
|
13
17
|
```ts
|
|
14
|
-
import {
|
|
18
|
+
import { FalClient } from "@howells/motif-sdk";
|
|
15
19
|
|
|
16
|
-
const motif = new
|
|
20
|
+
const motif = new FalClient({
|
|
17
21
|
apiKey: process.env.FAL_KEY!,
|
|
18
22
|
retries: 3,
|
|
19
23
|
timeout: 120_000,
|
|
@@ -103,7 +107,8 @@ const videoJob = await motif.submitVideo({
|
|
|
103
107
|
|
|
104
108
|
## Main Exports
|
|
105
109
|
|
|
106
|
-
- `
|
|
110
|
+
- `createMotifImage` (`@howells/motif-sdk/image`) - the primary image API: provider-agnostic generate/edit/best-of-N across google, openai, replicate, and fal.
|
|
111
|
+
- `FalClient` - low-level fal-native client for generation, queue jobs, upload, utility tools, and payload deletion.
|
|
107
112
|
- `buildGenerateBody` - Pure fal request normalization for dry runs and tests.
|
|
108
113
|
- `MODELS`, `GENERATION_MODELS`, `UTILITY_MODELS`, `VIDEO_MODELS` - Motif model aliases, fal endpoints, capabilities, pricing, and benchmarks.
|
|
109
114
|
- `FAL_TOOLS`, `FAL_TOOL_IDS`, `buildFalToolRequest`, `isFalToolId` - Normalized fal utility endpoints such as SAM, depth, upscaling, moderation, and background removal.
|
|
@@ -119,13 +124,13 @@ The package exports public types for generation, processing, queue, metadata, an
|
|
|
119
124
|
|
|
120
125
|
- `GenerateOptions`, `MotifResponse`, `MotifImage`
|
|
121
126
|
- `UpscaleOptions`, `RemoveBackgroundOptions`, `VideoOptions`, `VideoResponse`
|
|
122
|
-
- `QueuedJob`, `JobStatus`, `
|
|
127
|
+
- `QueuedJob`, `JobStatus`, `FalClientConfig`
|
|
123
128
|
- `ModelConfig`, `AspectRatio`, `Resolution`, `ImageSize`, `ImageQuality`, `BackgroundMode`, `ThinkingLevel`
|
|
124
129
|
- `FalToolConfig`, `FalToolId`, `FalToolRequest`, `FalToolRunOptions`
|
|
125
130
|
|
|
126
131
|
## Image Layer (`@howells/motif-sdk/image`)
|
|
127
132
|
|
|
128
|
-
|
|
133
|
+
The primary, provider-agnostic image generation + editing layer — the recommended way to generate and edit images. The fal-specific `FalClient` surface above stays for fal-native extras. It is an ESM-only subpath export, built on the Vercel AI SDK image interface (`ai`'s `generateImage`).
|
|
129
134
|
|
|
130
135
|
```bash
|
|
131
136
|
npm install @howells/motif-sdk
|
package/dist/image.js
CHANGED
|
@@ -812,6 +812,35 @@ var MODELS = {
|
|
|
812
812
|
supportsSyncMode: true,
|
|
813
813
|
type: "generation"
|
|
814
814
|
},
|
|
815
|
+
qwen3: {
|
|
816
|
+
benchmark: {
|
|
817
|
+
tiers: { price: "budget", quality: "better", speed: "unknown" },
|
|
818
|
+
useCase: "Qwen Image 3 - successor to qwen; no leaderboard data yet"
|
|
819
|
+
},
|
|
820
|
+
endpoint: "fal-ai/qwen-image-3/text-to-image",
|
|
821
|
+
falPricing: {
|
|
822
|
+
checkedAt: "2026-08-05",
|
|
823
|
+
currency: "USD",
|
|
824
|
+
endpointId: "fal-ai/qwen-image-3/text-to-image",
|
|
825
|
+
estimatedCostPerImageUsd: 0.02,
|
|
826
|
+
source: "fal-pricing-api",
|
|
827
|
+
unit: "megapixels",
|
|
828
|
+
unitPrice: 0.02
|
|
829
|
+
},
|
|
830
|
+
name: "Qwen Image 3",
|
|
831
|
+
pricePerImageUsd: 0.02,
|
|
832
|
+
pricing: "$0.02/MP (assumed from qwen v1; fal pricing page bot-gated at check time)",
|
|
833
|
+
sizeMode: "image_size_enum",
|
|
834
|
+
supportsAspect: true,
|
|
835
|
+
supportsEdit: false,
|
|
836
|
+
supportsNegativePrompt: true,
|
|
837
|
+
supportsNumImages: true,
|
|
838
|
+
supportsOutputFormat: true,
|
|
839
|
+
supportsResolution: false,
|
|
840
|
+
supportsSafetyChecker: true,
|
|
841
|
+
supportsSeed: true,
|
|
842
|
+
type: "generation"
|
|
843
|
+
},
|
|
815
844
|
// ─── Video Models ─────────────────────────────────────────────
|
|
816
845
|
kling: {
|
|
817
846
|
endpoint: "fal-ai/kling-video/v3/pro/image-to-video",
|
|
@@ -889,7 +918,8 @@ var GENERATION_MODELS = [
|
|
|
889
918
|
"ideogram",
|
|
890
919
|
"ideogram4",
|
|
891
920
|
"grok-image",
|
|
892
|
-
"qwen"
|
|
921
|
+
"qwen",
|
|
922
|
+
"qwen3"
|
|
893
923
|
];
|
|
894
924
|
var EDIT_CAPABLE_MODELS = GENERATION_MODELS.filter(
|
|
895
925
|
(id) => MODELS[id]?.supportsEdit === true
|
package/dist/index.cjs
CHANGED
|
@@ -36,7 +36,6 @@ __export(src_exports, {
|
|
|
36
36
|
IMAGE_TEXT_TO_IMAGE_TOP_20: () => IMAGE_TEXT_TO_IMAGE_TOP_20,
|
|
37
37
|
MODELS: () => MODELS,
|
|
38
38
|
MotifError: () => MotifError,
|
|
39
|
-
MotifServer: () => MotifServer,
|
|
40
39
|
RECRAFT_STYLES: () => RECRAFT_STYLES,
|
|
41
40
|
RESOLUTIONS: () => RESOLUTIONS,
|
|
42
41
|
UTILITY_MODELS: () => UTILITY_MODELS,
|
|
@@ -965,6 +964,35 @@ var MODELS = {
|
|
|
965
964
|
supportsSyncMode: true,
|
|
966
965
|
type: "generation"
|
|
967
966
|
},
|
|
967
|
+
qwen3: {
|
|
968
|
+
benchmark: {
|
|
969
|
+
tiers: { price: "budget", quality: "better", speed: "unknown" },
|
|
970
|
+
useCase: "Qwen Image 3 - successor to qwen; no leaderboard data yet"
|
|
971
|
+
},
|
|
972
|
+
endpoint: "fal-ai/qwen-image-3/text-to-image",
|
|
973
|
+
falPricing: {
|
|
974
|
+
checkedAt: "2026-08-05",
|
|
975
|
+
currency: "USD",
|
|
976
|
+
endpointId: "fal-ai/qwen-image-3/text-to-image",
|
|
977
|
+
estimatedCostPerImageUsd: 0.02,
|
|
978
|
+
source: "fal-pricing-api",
|
|
979
|
+
unit: "megapixels",
|
|
980
|
+
unitPrice: 0.02
|
|
981
|
+
},
|
|
982
|
+
name: "Qwen Image 3",
|
|
983
|
+
pricePerImageUsd: 0.02,
|
|
984
|
+
pricing: "$0.02/MP (assumed from qwen v1; fal pricing page bot-gated at check time)",
|
|
985
|
+
sizeMode: "image_size_enum",
|
|
986
|
+
supportsAspect: true,
|
|
987
|
+
supportsEdit: false,
|
|
988
|
+
supportsNegativePrompt: true,
|
|
989
|
+
supportsNumImages: true,
|
|
990
|
+
supportsOutputFormat: true,
|
|
991
|
+
supportsResolution: false,
|
|
992
|
+
supportsSafetyChecker: true,
|
|
993
|
+
supportsSeed: true,
|
|
994
|
+
type: "generation"
|
|
995
|
+
},
|
|
968
996
|
// ─── Video Models ─────────────────────────────────────────────
|
|
969
997
|
kling: {
|
|
970
998
|
endpoint: "fal-ai/kling-video/v3/pro/image-to-video",
|
|
@@ -1042,7 +1070,8 @@ var GENERATION_MODELS = [
|
|
|
1042
1070
|
"ideogram",
|
|
1043
1071
|
"ideogram4",
|
|
1044
1072
|
"grok-image",
|
|
1045
|
-
"qwen"
|
|
1073
|
+
"qwen",
|
|
1074
|
+
"qwen3"
|
|
1046
1075
|
];
|
|
1047
1076
|
var EDIT_CAPABLE_MODELS = GENERATION_MODELS.filter(
|
|
1048
1077
|
(id) => MODELS[id]?.supportsEdit === true
|
|
@@ -3237,7 +3266,6 @@ var FalClient = class {
|
|
|
3237
3266
|
});
|
|
3238
3267
|
}
|
|
3239
3268
|
};
|
|
3240
|
-
var MotifServer = FalClient;
|
|
3241
3269
|
var MotifError = class extends Error {
|
|
3242
3270
|
status;
|
|
3243
3271
|
code;
|
|
@@ -3278,7 +3306,6 @@ function toMotifError(error) {
|
|
|
3278
3306
|
IMAGE_TEXT_TO_IMAGE_TOP_20,
|
|
3279
3307
|
MODELS,
|
|
3280
3308
|
MotifError,
|
|
3281
|
-
MotifServer,
|
|
3282
3309
|
RECRAFT_STYLES,
|
|
3283
3310
|
RESOLUTIONS,
|
|
3284
3311
|
UTILITY_MODELS,
|
package/dist/index.d.cts
CHANGED
|
@@ -395,8 +395,6 @@ interface FalClientConfig {
|
|
|
395
395
|
/** Request timeout in ms (default 120_000) */
|
|
396
396
|
timeout?: number;
|
|
397
397
|
}
|
|
398
|
-
/** @deprecated Renamed to {@link FalClientConfig}. */
|
|
399
|
-
type MotifServerConfig = FalClientConfig;
|
|
400
398
|
|
|
401
399
|
/** Ordered by popularity: square first, then common ratios */
|
|
402
400
|
declare const ASPECT_RATIOS: AspectRatio[];
|
|
@@ -465,9 +463,9 @@ declare const VIDEO_TEXT_TO_VIDEO_TOP_15: LeaderboardSnapshot;
|
|
|
465
463
|
declare const VIDEO_IMAGE_TO_VIDEO_TOP_15: LeaderboardSnapshot;
|
|
466
464
|
|
|
467
465
|
declare const MODELS: Record<string, ModelConfig>;
|
|
468
|
-
declare const GENERATION_MODELS: readonly ["gpt2", "gpt", "banana2", "banana", "gemini", "gemini3", "seedream4", "seedream45", "seedream5", "seedream5-lite", "flux2-max", "flux2-pro", "flux2-flex", "flux2-dev", "flux2-turbo", "flux", "flux-fast", "recraft", "recraft4", "ideogram", "ideogram4", "grok-image", "qwen"];
|
|
466
|
+
declare const GENERATION_MODELS: readonly ["gpt2", "gpt", "banana2", "banana", "gemini", "gemini3", "seedream4", "seedream45", "seedream5", "seedream5-lite", "flux2-max", "flux2-pro", "flux2-flex", "flux2-dev", "flux2-turbo", "flux", "flux-fast", "recraft", "recraft4", "ideogram", "ideogram4", "grok-image", "qwen", "qwen3"];
|
|
469
467
|
/** Models whose fal endpoints support image editing (vary/edit flows). */
|
|
470
|
-
declare const EDIT_CAPABLE_MODELS: ("gpt2" | "gpt" | "banana2" | "banana" | "gemini" | "gemini3" | "seedream4" | "seedream45" | "seedream5" | "seedream5-lite" | "flux2-max" | "flux2-pro" | "flux2-flex" | "flux2-dev" | "flux2-turbo" | "flux" | "flux-fast" | "recraft" | "recraft4" | "ideogram" | "ideogram4" | "grok-image" | "qwen")[];
|
|
468
|
+
declare const EDIT_CAPABLE_MODELS: ("gpt2" | "gpt" | "banana2" | "banana" | "gemini" | "gemini3" | "seedream4" | "seedream45" | "seedream5" | "seedream5-lite" | "flux2-max" | "flux2-pro" | "flux2-flex" | "flux2-dev" | "flux2-turbo" | "flux" | "flux-fast" | "recraft" | "recraft4" | "ideogram" | "ideogram4" | "grok-image" | "qwen" | "qwen3")[];
|
|
471
469
|
declare const UTILITY_MODELS: readonly ["clarity", "crystal", "rmbg", "bria"];
|
|
472
470
|
declare const VIDEO_MODELS: readonly ["kling"];
|
|
473
471
|
type GenerationModelName = (typeof GENERATION_MODELS)[number];
|
|
@@ -560,7 +558,7 @@ declare class FalClient {
|
|
|
560
558
|
/** Model registry. */
|
|
561
559
|
get models(): Record<string, ModelConfig>;
|
|
562
560
|
/** Generation model keys. */
|
|
563
|
-
get generationModels(): readonly ["gpt2", "gpt", "banana2", "banana", "gemini", "gemini3", "seedream4", "seedream45", "seedream5", "seedream5-lite", "flux2-max", "flux2-pro", "flux2-flex", "flux2-dev", "flux2-turbo", "flux", "flux-fast", "recraft", "recraft4", "ideogram", "ideogram4", "grok-image", "qwen"];
|
|
561
|
+
get generationModels(): readonly ["gpt2", "gpt", "banana2", "banana", "gemini", "gemini3", "seedream4", "seedream45", "seedream5", "seedream5-lite", "flux2-max", "flux2-pro", "flux2-flex", "flux2-dev", "flux2-turbo", "flux", "flux-fast", "recraft", "recraft4", "ideogram", "ideogram4", "grok-image", "qwen", "qwen3"];
|
|
564
562
|
/** Utility model keys. */
|
|
565
563
|
get utilityModels(): readonly ["clarity", "crystal", "rmbg", "bria"];
|
|
566
564
|
/** Registered fal utility/tool endpoints. */
|
|
@@ -930,8 +928,6 @@ declare class FalClient {
|
|
|
930
928
|
*/
|
|
931
929
|
private normalizeResponse;
|
|
932
930
|
}
|
|
933
|
-
/** @deprecated Renamed to {@link FalClient}. `MotifServer` is kept as an alias for backwards compatibility and will be removed in 1.0. */
|
|
934
|
-
declare const MotifServer: typeof FalClient;
|
|
935
931
|
declare class MotifError extends Error {
|
|
936
932
|
readonly status: number;
|
|
937
933
|
readonly code?: string;
|
|
@@ -1328,4 +1324,4 @@ type FalToolId = (typeof FAL_TOOL_IDS)[number];
|
|
|
1328
1324
|
declare function isFalToolId(tool: string): tool is FalToolId;
|
|
1329
1325
|
declare function buildFalToolRequest(options: FalToolRunOptions): FalToolRequest;
|
|
1330
1326
|
|
|
1331
|
-
export { ASPECT_RATIOS, type AspectRatio, type BackgroundMode, CREATIVE_FIELDS, CREATIVE_TAXONOMY, type CreativeDirection, type CreativeField, type CreativeOption, CreativeOptionError, type CreativeOptionErrorDetails, type CreativePromptResult, type CustomImageSize, EDIT_CAPABLE_MODELS, type EnrichPromptOptions, FAL_TOOLS, FAL_TOOLS_CHECKED_AT, FAL_TOOL_IDS, FORMAT_PRESETS, FalClient, type FalClientConfig, type FalImageSizePreset, type FalToolConfig, type FalToolId, type FalToolInputKind, type FalToolRequest, type FalToolRunOptions, GENERATION_MODELS, type GenerateOptions, type GenerationModelName, type GptImageSize, IDEOGRAM_STYLES, IMAGE_EDITING_TOP_20, IMAGE_TEXT_TO_IMAGE_TOP_20, type ImageOutputFormat, type ImageQuality, type ImageSize, type JobStatus, type LeaderboardEntry, type LeaderboardSnapshot, MODELS, type ModelConfig, type ModelType, type MotifEnv, MotifError, type MotifImage, type MotifResponse,
|
|
1327
|
+
export { ASPECT_RATIOS, type AspectRatio, type BackgroundMode, CREATIVE_FIELDS, CREATIVE_TAXONOMY, type CreativeDirection, type CreativeField, type CreativeOption, CreativeOptionError, type CreativeOptionErrorDetails, type CreativePromptResult, type CustomImageSize, EDIT_CAPABLE_MODELS, type EnrichPromptOptions, FAL_TOOLS, FAL_TOOLS_CHECKED_AT, FAL_TOOL_IDS, FORMAT_PRESETS, FalClient, type FalClientConfig, type FalImageSizePreset, type FalToolConfig, type FalToolId, type FalToolInputKind, type FalToolRequest, type FalToolRunOptions, GENERATION_MODELS, type GenerateOptions, type GenerationModelName, type GptImageSize, IDEOGRAM_STYLES, IMAGE_EDITING_TOP_20, IMAGE_TEXT_TO_IMAGE_TOP_20, type ImageOutputFormat, type ImageQuality, type ImageSize, type JobStatus, type LeaderboardEntry, type LeaderboardSnapshot, MODELS, type ModelConfig, type ModelType, type MotifEnv, MotifError, type MotifImage, type MotifResponse, type QueuedJob, RECRAFT_STYLES, RESOLUTIONS, type RemoveBackgroundOptions, type Resolution, type SizeMode, type ThinkingLevel, type ToolResponse, type ToolRunOptions, UTILITY_MODELS, type UpscaleOptions, VIDEO_IMAGE_TO_VIDEO_TOP_15, VIDEO_MODELS, VIDEO_TEXT_TO_VIDEO_TOP_15, type VideoOptions, type VideoResponse, aspectToFalImageSize, aspectToGptSize, buildFalToolRequest, buildGenerateBody, enrichPrompt, estimateCost, estimateVideoCost, getFalKeyFromEnv, isFalToolId, motifEnvSchema, parseMotifEnv, sanitizePrompt };
|
package/dist/index.d.ts
CHANGED
|
@@ -395,8 +395,6 @@ interface FalClientConfig {
|
|
|
395
395
|
/** Request timeout in ms (default 120_000) */
|
|
396
396
|
timeout?: number;
|
|
397
397
|
}
|
|
398
|
-
/** @deprecated Renamed to {@link FalClientConfig}. */
|
|
399
|
-
type MotifServerConfig = FalClientConfig;
|
|
400
398
|
|
|
401
399
|
/** Ordered by popularity: square first, then common ratios */
|
|
402
400
|
declare const ASPECT_RATIOS: AspectRatio[];
|
|
@@ -465,9 +463,9 @@ declare const VIDEO_TEXT_TO_VIDEO_TOP_15: LeaderboardSnapshot;
|
|
|
465
463
|
declare const VIDEO_IMAGE_TO_VIDEO_TOP_15: LeaderboardSnapshot;
|
|
466
464
|
|
|
467
465
|
declare const MODELS: Record<string, ModelConfig>;
|
|
468
|
-
declare const GENERATION_MODELS: readonly ["gpt2", "gpt", "banana2", "banana", "gemini", "gemini3", "seedream4", "seedream45", "seedream5", "seedream5-lite", "flux2-max", "flux2-pro", "flux2-flex", "flux2-dev", "flux2-turbo", "flux", "flux-fast", "recraft", "recraft4", "ideogram", "ideogram4", "grok-image", "qwen"];
|
|
466
|
+
declare const GENERATION_MODELS: readonly ["gpt2", "gpt", "banana2", "banana", "gemini", "gemini3", "seedream4", "seedream45", "seedream5", "seedream5-lite", "flux2-max", "flux2-pro", "flux2-flex", "flux2-dev", "flux2-turbo", "flux", "flux-fast", "recraft", "recraft4", "ideogram", "ideogram4", "grok-image", "qwen", "qwen3"];
|
|
469
467
|
/** Models whose fal endpoints support image editing (vary/edit flows). */
|
|
470
|
-
declare const EDIT_CAPABLE_MODELS: ("gpt2" | "gpt" | "banana2" | "banana" | "gemini" | "gemini3" | "seedream4" | "seedream45" | "seedream5" | "seedream5-lite" | "flux2-max" | "flux2-pro" | "flux2-flex" | "flux2-dev" | "flux2-turbo" | "flux" | "flux-fast" | "recraft" | "recraft4" | "ideogram" | "ideogram4" | "grok-image" | "qwen")[];
|
|
468
|
+
declare const EDIT_CAPABLE_MODELS: ("gpt2" | "gpt" | "banana2" | "banana" | "gemini" | "gemini3" | "seedream4" | "seedream45" | "seedream5" | "seedream5-lite" | "flux2-max" | "flux2-pro" | "flux2-flex" | "flux2-dev" | "flux2-turbo" | "flux" | "flux-fast" | "recraft" | "recraft4" | "ideogram" | "ideogram4" | "grok-image" | "qwen" | "qwen3")[];
|
|
471
469
|
declare const UTILITY_MODELS: readonly ["clarity", "crystal", "rmbg", "bria"];
|
|
472
470
|
declare const VIDEO_MODELS: readonly ["kling"];
|
|
473
471
|
type GenerationModelName = (typeof GENERATION_MODELS)[number];
|
|
@@ -560,7 +558,7 @@ declare class FalClient {
|
|
|
560
558
|
/** Model registry. */
|
|
561
559
|
get models(): Record<string, ModelConfig>;
|
|
562
560
|
/** Generation model keys. */
|
|
563
|
-
get generationModels(): readonly ["gpt2", "gpt", "banana2", "banana", "gemini", "gemini3", "seedream4", "seedream45", "seedream5", "seedream5-lite", "flux2-max", "flux2-pro", "flux2-flex", "flux2-dev", "flux2-turbo", "flux", "flux-fast", "recraft", "recraft4", "ideogram", "ideogram4", "grok-image", "qwen"];
|
|
561
|
+
get generationModels(): readonly ["gpt2", "gpt", "banana2", "banana", "gemini", "gemini3", "seedream4", "seedream45", "seedream5", "seedream5-lite", "flux2-max", "flux2-pro", "flux2-flex", "flux2-dev", "flux2-turbo", "flux", "flux-fast", "recraft", "recraft4", "ideogram", "ideogram4", "grok-image", "qwen", "qwen3"];
|
|
564
562
|
/** Utility model keys. */
|
|
565
563
|
get utilityModels(): readonly ["clarity", "crystal", "rmbg", "bria"];
|
|
566
564
|
/** Registered fal utility/tool endpoints. */
|
|
@@ -930,8 +928,6 @@ declare class FalClient {
|
|
|
930
928
|
*/
|
|
931
929
|
private normalizeResponse;
|
|
932
930
|
}
|
|
933
|
-
/** @deprecated Renamed to {@link FalClient}. `MotifServer` is kept as an alias for backwards compatibility and will be removed in 1.0. */
|
|
934
|
-
declare const MotifServer: typeof FalClient;
|
|
935
931
|
declare class MotifError extends Error {
|
|
936
932
|
readonly status: number;
|
|
937
933
|
readonly code?: string;
|
|
@@ -1328,4 +1324,4 @@ type FalToolId = (typeof FAL_TOOL_IDS)[number];
|
|
|
1328
1324
|
declare function isFalToolId(tool: string): tool is FalToolId;
|
|
1329
1325
|
declare function buildFalToolRequest(options: FalToolRunOptions): FalToolRequest;
|
|
1330
1326
|
|
|
1331
|
-
export { ASPECT_RATIOS, type AspectRatio, type BackgroundMode, CREATIVE_FIELDS, CREATIVE_TAXONOMY, type CreativeDirection, type CreativeField, type CreativeOption, CreativeOptionError, type CreativeOptionErrorDetails, type CreativePromptResult, type CustomImageSize, EDIT_CAPABLE_MODELS, type EnrichPromptOptions, FAL_TOOLS, FAL_TOOLS_CHECKED_AT, FAL_TOOL_IDS, FORMAT_PRESETS, FalClient, type FalClientConfig, type FalImageSizePreset, type FalToolConfig, type FalToolId, type FalToolInputKind, type FalToolRequest, type FalToolRunOptions, GENERATION_MODELS, type GenerateOptions, type GenerationModelName, type GptImageSize, IDEOGRAM_STYLES, IMAGE_EDITING_TOP_20, IMAGE_TEXT_TO_IMAGE_TOP_20, type ImageOutputFormat, type ImageQuality, type ImageSize, type JobStatus, type LeaderboardEntry, type LeaderboardSnapshot, MODELS, type ModelConfig, type ModelType, type MotifEnv, MotifError, type MotifImage, type MotifResponse,
|
|
1327
|
+
export { ASPECT_RATIOS, type AspectRatio, type BackgroundMode, CREATIVE_FIELDS, CREATIVE_TAXONOMY, type CreativeDirection, type CreativeField, type CreativeOption, CreativeOptionError, type CreativeOptionErrorDetails, type CreativePromptResult, type CustomImageSize, EDIT_CAPABLE_MODELS, type EnrichPromptOptions, FAL_TOOLS, FAL_TOOLS_CHECKED_AT, FAL_TOOL_IDS, FORMAT_PRESETS, FalClient, type FalClientConfig, type FalImageSizePreset, type FalToolConfig, type FalToolId, type FalToolInputKind, type FalToolRequest, type FalToolRunOptions, GENERATION_MODELS, type GenerateOptions, type GenerationModelName, type GptImageSize, IDEOGRAM_STYLES, IMAGE_EDITING_TOP_20, IMAGE_TEXT_TO_IMAGE_TOP_20, type ImageOutputFormat, type ImageQuality, type ImageSize, type JobStatus, type LeaderboardEntry, type LeaderboardSnapshot, MODELS, type ModelConfig, type ModelType, type MotifEnv, MotifError, type MotifImage, type MotifResponse, type QueuedJob, RECRAFT_STYLES, RESOLUTIONS, type RemoveBackgroundOptions, type Resolution, type SizeMode, type ThinkingLevel, type ToolResponse, type ToolRunOptions, UTILITY_MODELS, type UpscaleOptions, VIDEO_IMAGE_TO_VIDEO_TOP_15, VIDEO_MODELS, VIDEO_TEXT_TO_VIDEO_TOP_15, type VideoOptions, type VideoResponse, aspectToFalImageSize, aspectToGptSize, buildFalToolRequest, buildGenerateBody, enrichPrompt, estimateCost, estimateVideoCost, getFalKeyFromEnv, isFalToolId, motifEnvSchema, parseMotifEnv, sanitizePrompt };
|
package/dist/index.js
CHANGED
|
@@ -905,6 +905,35 @@ var MODELS = {
|
|
|
905
905
|
supportsSyncMode: true,
|
|
906
906
|
type: "generation"
|
|
907
907
|
},
|
|
908
|
+
qwen3: {
|
|
909
|
+
benchmark: {
|
|
910
|
+
tiers: { price: "budget", quality: "better", speed: "unknown" },
|
|
911
|
+
useCase: "Qwen Image 3 - successor to qwen; no leaderboard data yet"
|
|
912
|
+
},
|
|
913
|
+
endpoint: "fal-ai/qwen-image-3/text-to-image",
|
|
914
|
+
falPricing: {
|
|
915
|
+
checkedAt: "2026-08-05",
|
|
916
|
+
currency: "USD",
|
|
917
|
+
endpointId: "fal-ai/qwen-image-3/text-to-image",
|
|
918
|
+
estimatedCostPerImageUsd: 0.02,
|
|
919
|
+
source: "fal-pricing-api",
|
|
920
|
+
unit: "megapixels",
|
|
921
|
+
unitPrice: 0.02
|
|
922
|
+
},
|
|
923
|
+
name: "Qwen Image 3",
|
|
924
|
+
pricePerImageUsd: 0.02,
|
|
925
|
+
pricing: "$0.02/MP (assumed from qwen v1; fal pricing page bot-gated at check time)",
|
|
926
|
+
sizeMode: "image_size_enum",
|
|
927
|
+
supportsAspect: true,
|
|
928
|
+
supportsEdit: false,
|
|
929
|
+
supportsNegativePrompt: true,
|
|
930
|
+
supportsNumImages: true,
|
|
931
|
+
supportsOutputFormat: true,
|
|
932
|
+
supportsResolution: false,
|
|
933
|
+
supportsSafetyChecker: true,
|
|
934
|
+
supportsSeed: true,
|
|
935
|
+
type: "generation"
|
|
936
|
+
},
|
|
908
937
|
// ─── Video Models ─────────────────────────────────────────────
|
|
909
938
|
kling: {
|
|
910
939
|
endpoint: "fal-ai/kling-video/v3/pro/image-to-video",
|
|
@@ -982,7 +1011,8 @@ var GENERATION_MODELS = [
|
|
|
982
1011
|
"ideogram",
|
|
983
1012
|
"ideogram4",
|
|
984
1013
|
"grok-image",
|
|
985
|
-
"qwen"
|
|
1014
|
+
"qwen",
|
|
1015
|
+
"qwen3"
|
|
986
1016
|
];
|
|
987
1017
|
var EDIT_CAPABLE_MODELS = GENERATION_MODELS.filter(
|
|
988
1018
|
(id) => MODELS[id]?.supportsEdit === true
|
|
@@ -3177,7 +3207,6 @@ var FalClient = class {
|
|
|
3177
3207
|
});
|
|
3178
3208
|
}
|
|
3179
3209
|
};
|
|
3180
|
-
var MotifServer = FalClient;
|
|
3181
3210
|
var MotifError = class extends Error {
|
|
3182
3211
|
status;
|
|
3183
3212
|
code;
|
|
@@ -3217,7 +3246,6 @@ export {
|
|
|
3217
3246
|
IMAGE_TEXT_TO_IMAGE_TOP_20,
|
|
3218
3247
|
MODELS,
|
|
3219
3248
|
MotifError,
|
|
3220
|
-
MotifServer,
|
|
3221
3249
|
RECRAFT_STYLES,
|
|
3222
3250
|
RESOLUTIONS,
|
|
3223
3251
|
UTILITY_MODELS,
|