@howells/motif-sdk 5.4.0 → 7.0.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/dist/index.d.cts CHANGED
@@ -117,7 +117,7 @@ export declare const CREATIVE_TAXONOMY: {
117
117
  readonly description: "Natural, unposed documentary portraits of people. Pair with a mood for the light.";
118
118
  readonly id: "portrait";
119
119
  readonly label: "Documentary portrait";
120
- readonly model: "seedream45";
120
+ readonly model: "seedream5";
121
121
  }, {
122
122
  readonly acceptsMood: false;
123
123
  readonly aspect: "1:1";
@@ -150,7 +150,7 @@ export declare const CREATIVE_TAXONOMY: {
150
150
  readonly experimental: true;
151
151
  readonly id: "illustration";
152
152
  readonly label: "Editorial illustration";
153
- readonly model: "gpt2";
153
+ readonly model: "flare";
154
154
  }];
155
155
  readonly mood: readonly [{
156
156
  readonly clause: "soft natural daylight from a window out of frame, gentle falloff into the corners, low contrast, even diffused light with soft, held highlights";
@@ -533,7 +533,7 @@ export declare const TASKS: {
533
533
  readonly summary: "Remove an object, person, text or clutter from an image and fill the gap.";
534
534
  };
535
535
  readonly generate: {
536
- readonly basis: "Order follows Arena text-to-image (https://arena.ai/leaderboard/image/text-to-image), read 2026-10-29 (MOT-72). Sunburst and Flare lead quality at the benchmarked max setting. Balanced starts with Nano Banana 2.1 on preliminary Arena evidence, then Grok Image 2 and Muse Image. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Fast keeps Nano Banana 2 Lite, budget Grok and Seedream 5 Lite, and FLUX.2 Turbo. Design, transparency and tuned Look routes are capability exceptions. Generation with References uses the separate editing ranking. Older routes are explicit/pin/Look-only.";
536
+ readonly basis: "Order follows Arena text-to-image (https://arena.ai/leaderboard/image/text-to-image), read 2026-10-29. Sunburst and Flare lead quality at the benchmarked max setting. Balanced starts with Nano Banana 2.1 on preliminary Arena evidence, then Grok Image 2 and Muse Image. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Fast keeps Nano Banana 2 Lite, budget Grok and Seedream 5 Lite, and FLUX.2 Turbo. Design, transparency and tuned Look routes are capability exceptions. Generation with References uses the separate editing ranking. Older routes are explicit/pin/Look-only.";
537
537
  readonly models: readonly RankedModel[];
538
538
  readonly notFor: "Variations of an image you already have (vary), or a consistent set of images (series run).";
539
539
  readonly rankedAt: "2026-10-29";
@@ -946,7 +946,7 @@ export declare const TASKS: {
946
946
  readonly summary: "Trace a raster image to a clean SVG.";
947
947
  };
948
948
  readonly vary: {
949
- readonly basis: "Order follows Arena image edit, single image (https://arena.ai/leaderboard/image/image-edit/single-image), read 2026-10-29 (MOT-72). Editing order differs from generation: Grok Image 2 leads balanced, ahead of Nano Banana 2.1, and Seedream 5 Pro outranks GPT Image 1.5. Arena scores Krea 3 only at its Ultra setting, which costs $0.27 to $0.35 an edit and ignores the requested size, so krea3, which runs fal's default setting, is ranked as unscored. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Sunburst and Flare use max quality. vary reuses a previously chosen Model when explicitly supplied, including retained legacy routes.";
949
+ readonly basis: "Order follows Arena image edit, single image (https://arena.ai/leaderboard/image/image-edit/single-image), read 2026-10-29. Editing order differs from generation: Grok Image 2 leads balanced, ahead of Nano Banana 2.1, and Seedream 5 Pro outranks GPT Image 1.5. Arena scores Krea 3 only at its Ultra setting, which costs $0.27 to $0.35 an edit and ignores the requested size, so krea3, which runs fal's default setting, is ranked as unscored. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Sunburst and Flare use max quality. vary reuses a previously chosen Model when explicitly supplied, including retained legacy routes.";
950
950
  readonly models: readonly RankedModel[];
951
951
  readonly notFor: "A specific change to an image described in words (generate with a reference), or a set of different scenes in one style (series run).";
952
952
  readonly rankedAt: "2026-10-29";
@@ -1030,8 +1030,6 @@ interface TaskUnresolved {
1030
1030
  type TaskResolution = TaskResolved | TaskUnresolved;
1031
1031
  interface ModelProfile {
1032
1032
  readonly capabilities: ReadonlySet<Capability>;
1033
- /** Capabilities reachable only when this key variable is set. */
1034
- readonly keyedCapabilities: ReadonlyMap<Capability, string>;
1035
1033
  /** Key variables the Model needs for any request. */
1036
1034
  readonly keys: readonly string[];
1037
1035
  readonly maxReferences: number;
@@ -1140,8 +1138,6 @@ export declare function sumCosts(costs: readonly (number | null)[]): {
1140
1138
  interface MotifClientConfig {
1141
1139
  /** Falls back to FAL_KEY. */
1142
1140
  falKey?: string;
1143
- /** Falls back to OPENAI_API_KEY. Used only by Models routed through OpenAI. */
1144
- openAiKey?: string;
1145
1141
  /** Models pinned per Task, as `resolveTask` takes them. */
1146
1142
  pins?: TaskEnvironment["pins"];
1147
1143
  /** The one network seam. Defaults to global fetch. Retries and timeouts still apply. */
@@ -1259,8 +1255,8 @@ interface TaskPlan {
1259
1255
  queued: boolean;
1260
1256
  /** Projected: before the call. */
1261
1257
  cost: ResolvedCost;
1262
- /** The provider carrying the request. "openai" only for a transparency route. */
1263
- provider: "fal" | "openai";
1258
+ /** The provider carrying the request. */
1259
+ provider: "fal";
1264
1260
  }
1265
1261
  interface TaskOutput extends Omit<TaskPlan, "body" | "cost" | "queued"> {
1266
1262
  files: TaskFile[];
@@ -1311,7 +1307,7 @@ interface MotifClient {
1311
1307
  */
1312
1308
  resume: (task: TaskId, input: TaskInput, requestId: string) => Promise<Result$1<TaskOutput, MotifError>>;
1313
1309
  }
1314
- /** Create the Task client. Keys fall back to FAL_KEY and OPENAI_API_KEY. */
1310
+ /** Create the Task client. The key falls back to FAL_KEY. */
1315
1311
  export declare function createMotif(config?: MotifClientConfig): MotifClient;
1316
1312
  //#endregion
1317
1313
  //#region src/task-plan-shared.d.ts
@@ -1357,13 +1353,10 @@ export declare function promptWarnings(prompt: string, context?: {
1357
1353
  export declare const motifEnvSchema: import("@howells/envy").EnvSchema<{
1358
1354
  readonly optional: {
1359
1355
  FAL_KEY: z.ZodString;
1360
- OPENAI_API_KEY: z.ZodString;
1361
1356
  };
1362
1357
  }>;
1363
1358
  type MotifEnv = ReturnType<typeof motifEnvSchema.parse>;
1364
1359
  export declare function parseMotifEnv(input?: Record<string, unknown>): MotifEnv;
1365
1360
  export declare function getFalKeyFromEnv(input?: Record<string, unknown>): string | undefined;
1366
- /** The OpenAI key, used by direct OpenAI routes such as gpt2 transparency. */
1367
- export declare function getOpenAiKeyFromEnv(input?: Record<string, unknown>): string | undefined;
1368
1361
  //#endregion
1369
1362
  export { type AspectRatio, type Blocker, type Capability, type ChosenBy, type CreativeDirection, type CreativeField, type CreativeOption, type CreativeOptionErrorDetails, type CreativePromptResult, type CustomImageSize, type EnrichPromptOptions, type FalFetch, type ImageSizeBounds, type LookId, type LookOption, type ModelProfile, type MoodId, type MotifClient, type MotifClientConfig, type MotifEnv, type OutputDimensions, type PlanOptions, type PromptWarning, type PromptWarningRule, type RankedFrom, type RankedModel, type Resolution, type ResolvedCost, type Result, type ResultAsync, type TaskDefinition, type TaskEnvironment, type TaskFile, type TaskFunction, type TaskId, type TaskInput, type TaskMode, type TaskOutput, type TaskPlan, type TaskRequest, type TaskResolution, type TaskResolved, type TaskStream, type TaskStreamEvent, type TaskStreamOptions, type TaskUnresolved, type Tier, type Unblocker, err, ok };
package/dist/index.d.ts CHANGED
@@ -117,7 +117,7 @@ export declare const CREATIVE_TAXONOMY: {
117
117
  readonly description: "Natural, unposed documentary portraits of people. Pair with a mood for the light.";
118
118
  readonly id: "portrait";
119
119
  readonly label: "Documentary portrait";
120
- readonly model: "seedream45";
120
+ readonly model: "seedream5";
121
121
  }, {
122
122
  readonly acceptsMood: false;
123
123
  readonly aspect: "1:1";
@@ -150,7 +150,7 @@ export declare const CREATIVE_TAXONOMY: {
150
150
  readonly experimental: true;
151
151
  readonly id: "illustration";
152
152
  readonly label: "Editorial illustration";
153
- readonly model: "gpt2";
153
+ readonly model: "flare";
154
154
  }];
155
155
  readonly mood: readonly [{
156
156
  readonly clause: "soft natural daylight from a window out of frame, gentle falloff into the corners, low contrast, even diffused light with soft, held highlights";
@@ -533,7 +533,7 @@ export declare const TASKS: {
533
533
  readonly summary: "Remove an object, person, text or clutter from an image and fill the gap.";
534
534
  };
535
535
  readonly generate: {
536
- readonly basis: "Order follows Arena text-to-image (https://arena.ai/leaderboard/image/text-to-image), read 2026-10-29 (MOT-72). Sunburst and Flare lead quality at the benchmarked max setting. Balanced starts with Nano Banana 2.1 on preliminary Arena evidence, then Grok Image 2 and Muse Image. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Fast keeps Nano Banana 2 Lite, budget Grok and Seedream 5 Lite, and FLUX.2 Turbo. Design, transparency and tuned Look routes are capability exceptions. Generation with References uses the separate editing ranking. Older routes are explicit/pin/Look-only.";
536
+ readonly basis: "Order follows Arena text-to-image (https://arena.ai/leaderboard/image/text-to-image), read 2026-10-29. Sunburst and Flare lead quality at the benchmarked max setting. Balanced starts with Nano Banana 2.1 on preliminary Arena evidence, then Grok Image 2 and Muse Image. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Fast keeps Nano Banana 2 Lite, budget Grok and Seedream 5 Lite, and FLUX.2 Turbo. Design, transparency and tuned Look routes are capability exceptions. Generation with References uses the separate editing ranking. Older routes are explicit/pin/Look-only.";
537
537
  readonly models: readonly RankedModel[];
538
538
  readonly notFor: "Variations of an image you already have (vary), or a consistent set of images (series run).";
539
539
  readonly rankedAt: "2026-10-29";
@@ -946,7 +946,7 @@ export declare const TASKS: {
946
946
  readonly summary: "Trace a raster image to a clean SVG.";
947
947
  };
948
948
  readonly vary: {
949
- readonly basis: "Order follows Arena image edit, single image (https://arena.ai/leaderboard/image/image-edit/single-image), read 2026-10-29 (MOT-72). Editing order differs from generation: Grok Image 2 leads balanced, ahead of Nano Banana 2.1, and Seedream 5 Pro outranks GPT Image 1.5. Arena scores Krea 3 only at its Ultra setting, which costs $0.27 to $0.35 an edit and ignores the requested size, so krea3, which runs fal's default setting, is ranked as unscored. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Sunburst and Flare use max quality. vary reuses a previously chosen Model when explicitly supplied, including retained legacy routes.";
949
+ readonly basis: "Order follows Arena image edit, single image (https://arena.ai/leaderboard/image/image-edit/single-image), read 2026-10-29. Editing order differs from generation: Grok Image 2 leads balanced, ahead of Nano Banana 2.1, and Seedream 5 Pro outranks GPT Image 1.5. Arena scores Krea 3 only at its Ultra setting, which costs $0.27 to $0.35 an edit and ignores the requested size, so krea3, which runs fal's default setting, is ranked as unscored. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Sunburst and Flare use max quality. vary reuses a previously chosen Model when explicitly supplied, including retained legacy routes.";
950
950
  readonly models: readonly RankedModel[];
951
951
  readonly notFor: "A specific change to an image described in words (generate with a reference), or a set of different scenes in one style (series run).";
952
952
  readonly rankedAt: "2026-10-29";
@@ -1030,8 +1030,6 @@ interface TaskUnresolved {
1030
1030
  type TaskResolution = TaskResolved | TaskUnresolved;
1031
1031
  interface ModelProfile {
1032
1032
  readonly capabilities: ReadonlySet<Capability>;
1033
- /** Capabilities reachable only when this key variable is set. */
1034
- readonly keyedCapabilities: ReadonlyMap<Capability, string>;
1035
1033
  /** Key variables the Model needs for any request. */
1036
1034
  readonly keys: readonly string[];
1037
1035
  readonly maxReferences: number;
@@ -1140,8 +1138,6 @@ export declare function sumCosts(costs: readonly (number | null)[]): {
1140
1138
  interface MotifClientConfig {
1141
1139
  /** Falls back to FAL_KEY. */
1142
1140
  falKey?: string;
1143
- /** Falls back to OPENAI_API_KEY. Used only by Models routed through OpenAI. */
1144
- openAiKey?: string;
1145
1141
  /** Models pinned per Task, as `resolveTask` takes them. */
1146
1142
  pins?: TaskEnvironment["pins"];
1147
1143
  /** The one network seam. Defaults to global fetch. Retries and timeouts still apply. */
@@ -1259,8 +1255,8 @@ interface TaskPlan {
1259
1255
  queued: boolean;
1260
1256
  /** Projected: before the call. */
1261
1257
  cost: ResolvedCost;
1262
- /** The provider carrying the request. "openai" only for a transparency route. */
1263
- provider: "fal" | "openai";
1258
+ /** The provider carrying the request. */
1259
+ provider: "fal";
1264
1260
  }
1265
1261
  interface TaskOutput extends Omit<TaskPlan, "body" | "cost" | "queued"> {
1266
1262
  files: TaskFile[];
@@ -1311,7 +1307,7 @@ interface MotifClient {
1311
1307
  */
1312
1308
  resume: (task: TaskId, input: TaskInput, requestId: string) => Promise<Result$1<TaskOutput, MotifError>>;
1313
1309
  }
1314
- /** Create the Task client. Keys fall back to FAL_KEY and OPENAI_API_KEY. */
1310
+ /** Create the Task client. The key falls back to FAL_KEY. */
1315
1311
  export declare function createMotif(config?: MotifClientConfig): MotifClient;
1316
1312
  //#endregion
1317
1313
  //#region src/task-plan-shared.d.ts
@@ -1357,13 +1353,10 @@ export declare function promptWarnings(prompt: string, context?: {
1357
1353
  export declare const motifEnvSchema: import("@howells/envy").EnvSchema<{
1358
1354
  readonly optional: {
1359
1355
  FAL_KEY: z.ZodString;
1360
- OPENAI_API_KEY: z.ZodString;
1361
1356
  };
1362
1357
  }>;
1363
1358
  type MotifEnv = ReturnType<typeof motifEnvSchema.parse>;
1364
1359
  export declare function parseMotifEnv(input?: Record<string, unknown>): MotifEnv;
1365
1360
  export declare function getFalKeyFromEnv(input?: Record<string, unknown>): string | undefined;
1366
- /** The OpenAI key, used by direct OpenAI routes such as gpt2 transparency. */
1367
- export declare function getOpenAiKeyFromEnv(input?: Record<string, unknown>): string | undefined;
1368
1361
  //#endregion
1369
1362
  export { type AspectRatio, type Blocker, type Capability, type ChosenBy, type CreativeDirection, type CreativeField, type CreativeOption, type CreativeOptionErrorDetails, type CreativePromptResult, type CustomImageSize, type EnrichPromptOptions, type FalFetch, type ImageSizeBounds, type LookId, type LookOption, type ModelProfile, type MoodId, type MotifClient, type MotifClientConfig, type MotifEnv, type OutputDimensions, type PlanOptions, type PromptWarning, type PromptWarningRule, type RankedFrom, type RankedModel, type Resolution, type ResolvedCost, type Result, type ResultAsync, type TaskDefinition, type TaskEnvironment, type TaskFile, type TaskFunction, type TaskId, type TaskInput, type TaskMode, type TaskOutput, type TaskPlan, type TaskRequest, type TaskResolution, type TaskResolved, type TaskStream, type TaskStreamEvent, type TaskStreamOptions, type TaskUnresolved, type Tier, type Unblocker, err, ok };