@apicity/fal 0.16.2 → 0.17.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/src/zod.js CHANGED
@@ -2213,6 +2213,46 @@ export const FalFlux3KeyframesToVideoRequestSchema = Flux3VideoRequestBaseSchema
2213
2213
  export const FalFlux3ExtendVideoRequestSchema = Flux3VideoRequestBaseSchema.extend({
2214
2214
  video_url: z.string(),
2215
2215
  });
2216
+ // ---------------------------------------------------------------------------
2217
+ // FLUX 3 Max (Black Forest Labs, post-trained by fal)
2218
+ // Pinned to the live queue OpenAPI read on 2026-10-21. Duration is an
2219
+ // integer second from 5 to 20 (default 5); "auto" is not accepted.
2220
+ // reasoning_level and seed are Max-only. safety_tolerance is absent.
2221
+ // ---------------------------------------------------------------------------
2222
+ const Flux3MaxAspectRatioSchema = z.enum([
2223
+ "auto",
2224
+ "21:9",
2225
+ "2:1",
2226
+ "16:9",
2227
+ "4:3",
2228
+ "1:1",
2229
+ "3:4",
2230
+ "9:16",
2231
+ ]);
2232
+ const Flux3MaxResolutionSchema = z.enum(["720p", "1080p"]);
2233
+ const Flux3MaxDurationSchema = z.number().int().min(5).max(20);
2234
+ const Flux3MaxReasoningLevelSchema = z.enum(["low", "high"]);
2235
+ const Flux3MaxVideoRequestBaseSchema = z.object({
2236
+ prompt: z.string().min(1),
2237
+ aspect_ratio: Flux3MaxAspectRatioSchema.optional(),
2238
+ duration: Flux3MaxDurationSchema.optional(),
2239
+ generate_audio: z.boolean().optional(),
2240
+ resolution: Flux3MaxResolutionSchema.optional(),
2241
+ reasoning_level: Flux3MaxReasoningLevelSchema.optional(),
2242
+ seed: z.number().int().nullable().optional(),
2243
+ });
2244
+ export const FalFlux3MaxTextToVideoRequestSchema = Flux3MaxVideoRequestBaseSchema;
2245
+ export const FalFlux3MaxImageToVideoRequestSchema = Flux3MaxVideoRequestBaseSchema.extend({
2246
+ image_url: z.string(),
2247
+ end_image_url: z.string().nullable().optional(),
2248
+ });
2249
+ export const FalFlux3MaxKeyframeSchema = z.object({
2250
+ image_url: z.string(),
2251
+ frame_index: z.number().int().min(0),
2252
+ });
2253
+ export const FalFlux3MaxKeyframesToVideoRequestSchema = Flux3MaxVideoRequestBaseSchema.extend({
2254
+ keyframes: z.array(FalFlux3MaxKeyframeSchema).min(1).max(10),
2255
+ });
2216
2256
  export const FalFluxVideoUpscaleRequestSchema = z.object({
2217
2257
  video_url: z.string(),
2218
2258
  upscale_factor: z.number().min(1.5).max(3).optional(),
@@ -7161,6 +7201,32 @@ export const FalViduQ4ReferenceToVideoRequestSchema = z.object({
7161
7201
  .default(true)
7162
7202
  .describe("Authorized callers may set false to request relaxed screening."),
7163
7203
  });
7204
+ // Pinned to the live queue OpenAPI read on 2026-10-21.
7205
+ // sha256 c3742d25a3e1a809a3a3c5348ce4f6db1dffa64d4d5e0e853f57409ec3162e24
7206
+ // additionalProperties is false; field order follows x-fal-order-properties.
7207
+ // Docs: https://fal.ai/models/minimax/h3-max/reframe-video/api
7208
+ export const FalMinimaxH3MaxReframeVideoRequestSchema = z
7209
+ .object({
7210
+ prompt: z
7211
+ .string()
7212
+ .max(50000)
7213
+ .default("")
7214
+ .describe("Optional guidance for the new surroundings. Expansion captions the source automatically."),
7215
+ video_url: z
7216
+ .string()
7217
+ .describe("Source video, 0.25 to 300 seconds; fitted onto the target canvas with its timeline and audio preserved."),
7218
+ aspect_ratio: z
7219
+ .enum(["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "9:21"])
7220
+ .default("16:9")
7221
+ .describe("Target canvas aspect ratio; the source is contain-fitted and the rest is outpainted."),
7222
+ resolution: z
7223
+ .enum(["480p", "768p", "1080p"])
7224
+ .default("768p")
7225
+ .describe("Target canvas resolution profile. 1080p uses learned latent upscaling from a native 768p reframe."),
7226
+ seed: z.number().int().min(0).max(4294967295).nullable().optional(),
7227
+ enable_safety_checker: z.boolean().default(true),
7228
+ })
7229
+ .strict();
7164
7230
  // Pinned to the live queue OpenAPI read on 2026-10-15
7165
7231
  // (sha256 64357740e7d598378b8e14a81afc273e34c1456f9a2da4974a758e9460eeff2e, the same JSON as the planning archive). Field order follows x-fal-order-properties.
7166
7232
  // additionalProperties is false, and a free 422 probe the same day refused an
@@ -8884,6 +8950,349 @@ export const FalMeshyV6LiteRetextureRequestSchema = z
8884
8950
  message: "Either text_style_prompt or image_style_url is required",
8885
8951
  path: ["text_style_prompt"],
8886
8952
  });
8953
+ // Pinned to queue OpenAPI on 2026-10-21, SHA256 d2e92b45121a0a4a962289efa74efff19eb6736e4f0a13560d522e5de79b6dde.
8954
+ // Docs: https://fal.ai/models/bria/fibo-2/generate/api
8955
+ const FalBriaFibo2PromptObjectSchema = z.object({
8956
+ description: z
8957
+ .union([z.string(), z.null()])
8958
+ .optional()
8959
+ .describe("A description of the object to be generated."),
8960
+ location: z
8961
+ .union([z.string(), z.null()])
8962
+ .optional()
8963
+ .describe("The location of the object in the image."),
8964
+ relationship: z
8965
+ .string()
8966
+ .describe("The relationship of the object to other objects in the image."),
8967
+ relative_size: z
8968
+ .union([z.string(), z.null()])
8969
+ .optional()
8970
+ .describe("The relative size of the object in the image."),
8971
+ shape_and_color: z
8972
+ .union([z.string(), z.null()])
8973
+ .optional()
8974
+ .describe("The shape and color of the object."),
8975
+ texture: z
8976
+ .union([z.string(), z.null()])
8977
+ .optional()
8978
+ .describe("The texture of the object."),
8979
+ appearance_details: z
8980
+ .union([z.string(), z.null()])
8981
+ .optional()
8982
+ .describe("The appearance details of the object."),
8983
+ number_of_objects: z
8984
+ .union([z.number().int(), z.null()])
8985
+ .optional()
8986
+ .describe("The number of objects in the image."),
8987
+ pose: z
8988
+ .union([z.string(), z.null()])
8989
+ .optional()
8990
+ .describe("The pose of the object in the image."),
8991
+ expression: z
8992
+ .union([z.string(), z.null()])
8993
+ .optional()
8994
+ .describe("The expression of the object in the image."),
8995
+ clothing: z
8996
+ .union([z.string(), z.null()])
8997
+ .optional()
8998
+ .describe("The clothing of the object in the image."),
8999
+ action: z
9000
+ .union([z.string(), z.null()])
9001
+ .optional()
9002
+ .describe("The action of the object in the image."),
9003
+ gender: z
9004
+ .union([z.string(), z.null()])
9005
+ .optional()
9006
+ .describe("The gender of the object in the image."),
9007
+ skin_tone_and_texture: z
9008
+ .union([z.string(), z.null()])
9009
+ .optional()
9010
+ .describe("The skin tone and texture of the object in the image."),
9011
+ orientation: z
9012
+ .union([z.string(), z.null()])
9013
+ .optional()
9014
+ .describe("The orientation of the object in the image."),
9015
+ });
9016
+ const FalBriaFibo2LightingSchema = z.object({
9017
+ conditions: z
9018
+ .union([z.string(), z.null()])
9019
+ .optional()
9020
+ .describe("The conditions of the lighting in the image to be generated."),
9021
+ direction: z
9022
+ .union([z.string(), z.null()])
9023
+ .optional()
9024
+ .describe("The direction of the lighting in the image to be generated."),
9025
+ shadows: z
9026
+ .union([z.string(), z.null()])
9027
+ .optional()
9028
+ .describe("The shadows in the image to be generated."),
9029
+ });
9030
+ const FalBriaFibo2AestheticsSchema = z.object({
9031
+ composition: z
9032
+ .union([z.string(), z.null()])
9033
+ .optional()
9034
+ .describe("The composition of the image to be generated."),
9035
+ color_scheme: z
9036
+ .union([z.string(), z.null()])
9037
+ .optional()
9038
+ .describe("The color scheme of the image to be generated."),
9039
+ mood_atmosphere: z
9040
+ .union([z.string(), z.null()])
9041
+ .optional()
9042
+ .describe("The mood and atmosphere of the image to be generated."),
9043
+ });
9044
+ const FalBriaFibo2PhotographicCharacteristicsSchema = z.object({
9045
+ depth_of_field: z
9046
+ .union([z.string(), z.null()])
9047
+ .optional()
9048
+ .describe("The depth of field in the image to be generated."),
9049
+ focus: z
9050
+ .union([z.string(), z.null()])
9051
+ .optional()
9052
+ .describe("The focus in the image to be generated."),
9053
+ camera_angle: z
9054
+ .union([z.string(), z.null()])
9055
+ .optional()
9056
+ .describe("The angle of the camera in the image to be generated."),
9057
+ lens_focal_length: z
9058
+ .union([z.string(), z.null()])
9059
+ .optional()
9060
+ .describe("The focal length of the lens in the image to be generated."),
9061
+ });
9062
+ const FalBriaFibo2TextRenderSchema = z.object({
9063
+ text: z
9064
+ .string()
9065
+ .describe("The text to render. fibo-2 is also shown an image of it, so it renders as written."),
9066
+ location: z
9067
+ .union([z.string(), z.null()])
9068
+ .optional()
9069
+ .describe("Where the text sits in the image."),
9070
+ size: z
9071
+ .union([z.string(), z.null()])
9072
+ .optional()
9073
+ .describe("The size of the text in the image."),
9074
+ color: z
9075
+ .union([z.string(), z.null()])
9076
+ .optional()
9077
+ .describe("The color of the text."),
9078
+ font: z
9079
+ .union([z.string(), z.null()])
9080
+ .optional()
9081
+ .describe("The style of the font."),
9082
+ appearance_details: z
9083
+ .union([z.string(), z.null()])
9084
+ .optional()
9085
+ .describe("Any other notable visual details of the text."),
9086
+ });
9087
+ const FalBriaFibo2VglSchema = z.object({
9088
+ short_description: z
9089
+ .union([z.string(), z.null()])
9090
+ .optional()
9091
+ .describe("A short description of the image to be generated."),
9092
+ objects: z
9093
+ .union([z.array(FalBriaFibo2PromptObjectSchema), z.null()])
9094
+ .default([])
9095
+ .describe("A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image."),
9096
+ background_setting: z
9097
+ .union([z.string(), z.null()])
9098
+ .optional()
9099
+ .describe("The background setting of the image to be generated."),
9100
+ lighting: z
9101
+ .union([FalBriaFibo2LightingSchema, z.null()])
9102
+ .optional()
9103
+ .describe("The lighting of the image to be generated."),
9104
+ aesthetics: z
9105
+ .union([FalBriaFibo2AestheticsSchema, z.null()])
9106
+ .optional()
9107
+ .describe("The aesthetics of the image to be generated."),
9108
+ photographic_characteristics: z
9109
+ .union([FalBriaFibo2PhotographicCharacteristicsSchema, z.null()])
9110
+ .optional()
9111
+ .describe("The photographic characteristics of the image to be generated."),
9112
+ style_medium: z
9113
+ .union([z.string(), z.null()])
9114
+ .optional()
9115
+ .describe("The style medium of the image to be generated."),
9116
+ text_render: z
9117
+ .union([z.array(FalBriaFibo2TextRenderSchema), z.null()])
9118
+ .default([])
9119
+ .describe("A list of text to be rendered in the image."),
9120
+ context: z
9121
+ .union([z.string(), z.null()])
9122
+ .optional()
9123
+ .describe("The context of the image to be generated."),
9124
+ artistic_style: z
9125
+ .union([z.string(), z.null()])
9126
+ .optional()
9127
+ .describe("The artistic style of the image to be generated."),
9128
+ });
9129
+ export const FalBriaFibo2GenerateRequestSchema = z.object({
9130
+ prompt: z
9131
+ .union([z.string(), z.null()])
9132
+ .optional()
9133
+ .describe("What to generate, in free-form text. It is expanded into a VGL, which is returned. With 'vgl', the change to make to it."),
9134
+ style: z
9135
+ .union([
9136
+ z.enum(["Kodak Film", "Hard Flash", "Hazy Dreamy", "Rough Realism"]),
9137
+ z.null(),
9138
+ ])
9139
+ .optional()
9140
+ .describe("A style for the generated image. Requires 'prompt'; not with 'image_url', 'vgl' or 'negative_prompt'."),
9141
+ image_url: z
9142
+ .union([z.string(), z.null()])
9143
+ .optional()
9144
+ .describe("A reference image (inspire mode). With 'prompt', VGL uses it as a visual reference for the prompt's scene and generates a new image of that scene, not the image. Alone, the VGL describes the image itself, so the result is a close variation of it. Not with 'vgl'."),
9145
+ vgl: z
9146
+ .union([FalBriaFibo2VglSchema, z.null()])
9147
+ .optional()
9148
+ .describe("A VGL (Visual Generation Language) document: the structured JSON description of the scene. Alone, the model renders it as-is. With 'prompt', VGL changes it by the prompt (refine) and the result is rendered. Accepts what a previous request returned. Not with 'image_url' or 'style'."),
9149
+ seed: z
9150
+ .number()
9151
+ .int()
9152
+ .min(0)
9153
+ .max(2147483647)
9154
+ .default(5555)
9155
+ .describe("Random seed for reproducibility, 0 to 2147483647."),
9156
+ aspect_ratio: z
9157
+ .enum([
9158
+ "1:1",
9159
+ "1:2",
9160
+ "1:3",
9161
+ "1:4",
9162
+ "1:5",
9163
+ "2:1",
9164
+ "2:3",
9165
+ "3:1",
9166
+ "3:2",
9167
+ "3:4",
9168
+ "4:1",
9169
+ "4:3",
9170
+ "4:5",
9171
+ "5:1",
9172
+ "5:4",
9173
+ "9:16",
9174
+ "9:21",
9175
+ "10:16",
9176
+ "16:9",
9177
+ "16:10",
9178
+ "21:9",
9179
+ ])
9180
+ .default("1:1")
9181
+ .describe("Aspect ratio of the image, at about one megapixel. Options: 1:1, 1:2, 1:3, 1:4, 1:5, 2:1, 2:3, 3:1, 3:2, 3:4, 4:1, 4:3, 4:5, 5:1, 5:4, 9:16, 9:21, 10:16, 16:9, 16:10, 21:9"),
9182
+ sync_mode: z
9183
+ .boolean()
9184
+ .default(false)
9185
+ .describe("If true, returns the image directly in the response (increases latency)."),
9186
+ });
9187
+ // Pinned to queue OpenAPI on 2026-10-21, SHA256 6640b80bea925979b34b6b489b09b88269e535edffb14b8a92c84493f9e7e9be.
9188
+ // Docs: https://fal.ai/models/bria/fibo-2/edit/api
9189
+ const FalBriaFibo2VglEditSchema = z
9190
+ .object({
9191
+ short_description: z
9192
+ .union([z.string(), z.null()])
9193
+ .optional()
9194
+ .describe("A short description of the image to be generated."),
9195
+ objects: z
9196
+ .union([z.array(FalBriaFibo2PromptObjectSchema), z.null()])
9197
+ .default([])
9198
+ .describe("A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image."),
9199
+ background_setting: z
9200
+ .union([z.string(), z.null()])
9201
+ .optional()
9202
+ .describe("The background setting of the image to be generated."),
9203
+ lighting: z
9204
+ .union([FalBriaFibo2LightingSchema, z.null()])
9205
+ .optional()
9206
+ .describe("The lighting of the image to be generated."),
9207
+ aesthetics: z
9208
+ .union([FalBriaFibo2AestheticsSchema, z.null()])
9209
+ .optional()
9210
+ .describe("The aesthetics of the image to be generated."),
9211
+ photographic_characteristics: z
9212
+ .union([FalBriaFibo2PhotographicCharacteristicsSchema, z.null()])
9213
+ .optional()
9214
+ .describe("The photographic characteristics of the image to be generated."),
9215
+ style_medium: z
9216
+ .union([z.string(), z.null()])
9217
+ .optional()
9218
+ .describe("The style medium of the image to be generated."),
9219
+ text_render: z
9220
+ .union([z.array(FalBriaFibo2TextRenderSchema), z.null()])
9221
+ .default([])
9222
+ .describe("A list of text to be rendered in the image."),
9223
+ context: z
9224
+ .union([z.string(), z.null()])
9225
+ .optional()
9226
+ .describe("The context of the image to be generated."),
9227
+ artistic_style: z
9228
+ .union([z.string(), z.null()])
9229
+ .optional()
9230
+ .describe("The artistic style of the image to be generated."),
9231
+ edit_instruction: z
9232
+ .union([z.string(), z.null()])
9233
+ .optional()
9234
+ .describe("The edit instruction for the image."),
9235
+ })
9236
+ .passthrough();
9237
+ export const FalBriaFibo2EditRequestSchema = z.object({
9238
+ image_urls: z
9239
+ .array(z.string())
9240
+ .min(1)
9241
+ .max(4)
9242
+ .describe("1-4 images to edit (files or URLs). The instruction refers to them as <image_1>, <image_2> and so on, in the order they are sent."),
9243
+ instruction: z
9244
+ .union([z.string(), z.null()])
9245
+ .optional()
9246
+ .describe("The edit, in free-form text. It is expanded into a VGL, which is returned. With 'vgl', the change to make to it."),
9247
+ aspect_ratio: z
9248
+ .union([
9249
+ z.enum([
9250
+ "1:1",
9251
+ "1:2",
9252
+ "1:3",
9253
+ "1:4",
9254
+ "1:5",
9255
+ "2:1",
9256
+ "2:3",
9257
+ "3:1",
9258
+ "3:2",
9259
+ "3:4",
9260
+ "4:1",
9261
+ "4:3",
9262
+ "4:5",
9263
+ "5:1",
9264
+ "5:4",
9265
+ "9:16",
9266
+ "9:21",
9267
+ "10:16",
9268
+ "16:9",
9269
+ "16:10",
9270
+ "21:9",
9271
+ ]),
9272
+ z.null(),
9273
+ ])
9274
+ .optional()
9275
+ .describe("Output aspect ratio, at about one megapixel. Left unset, the output keeps the ratio of the first image. A single image always keeps its own ratio."),
9276
+ seed: z
9277
+ .number()
9278
+ .int()
9279
+ .min(0)
9280
+ .max(2147483647)
9281
+ .default(5555)
9282
+ .describe("Random seed for reproducibility, 0 to 2147483647."),
9283
+ mask_url: z
9284
+ .union([z.string(), z.null()])
9285
+ .optional()
9286
+ .describe("Mask (file or URL) marking the region to regenerate: white where the model should edit, black elsewhere. Single-image requests only, at that image's size. A masked edit comes back at the image's own size, with its own pixels outside the mask."),
9287
+ sync_mode: z
9288
+ .boolean()
9289
+ .default(false)
9290
+ .describe("If true, returns the image directly in the response (increases latency)."),
9291
+ vgl: z
9292
+ .union([FalBriaFibo2VglEditSchema, z.null()])
9293
+ .optional()
9294
+ .describe("A VGL (Visual Generation Language) document. Alone, it is the edit as-is and must carry its 'edit_instruction'. With 'instruction', it is the first image's VGL, the baseline the edit is written from. Accepts what a previous request returned."),
9295
+ });
8887
9296
  export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
8888
9297
  "meshy/v6-lite/retexture": FalMeshyV6LiteRetextureRequestSchema,
8889
9298
  "bytedance/seedance-2.5/draft/complete": FalBytedanceSeedance2p5DraftCompleteRequestSchema,
@@ -8913,6 +9322,7 @@ export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
8913
9322
  "fal-ai/kandinsky6-lite/text-to-video": FalKandinsky6LiteTextToVideoRequestSchema,
8914
9323
  "fal-ai/kandinsky6-vsr/lite": FalKandinsky6VsrLiteRequestSchema,
8915
9324
  "fal-ai/kandinsky6-vsr": FalKandinsky6VsrRequestSchema,
9325
+ "minimax/h3-max/reframe-video": FalMinimaxH3MaxReframeVideoRequestSchema,
8916
9326
  "minimax/h3-max/relight": FalMinimaxH3MaxRelightRequestSchema,
8917
9327
  "fal-ai/vidu/q4/reference-to-video": FalViduQ4ReferenceToVideoRequestSchema,
8918
9328
  "fal-ai/vidu/q4/image-to-video": FalViduQ4ImageToVideoRequestSchema,
@@ -8944,6 +9354,8 @@ export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
8944
9354
  "meta/muse-image/text-to-image": FalMetaMuseImageTextToImageRequestSchema,
8945
9355
  "elevenlabs/music/v2.5": FalElevenlabsMusicV2p5RequestSchema,
8946
9356
  "bria/fibo-gen-1.5/text-to-image": FalBriaFiboGen1p5TextToImageRequestSchema,
9357
+ "bria/fibo-2/edit": FalBriaFibo2EditRequestSchema,
9358
+ "bria/fibo-2/generate": FalBriaFibo2GenerateRequestSchema,
8947
9359
  "bria/fibo-edit-1.5/edit": FalBriaFiboEdit1p5EditRequestSchema,
8948
9360
  "blackforestlabs/flux-3/edit-video": FalBlackforestlabsFlux3EditVideoRequestSchema,
8949
9361
  "alibaba/happy-horse/v1.1/text-to-video": FalAlibabaHappyHorseV1p1TextToVideoRequestSchema,
@@ -9004,6 +9416,9 @@ export const FAL_ENDPOINT_REQUEST_SCHEMAS = {
9004
9416
  "blackforestlabs/flux-3/image-to-video": FalFlux3ImageToVideoRequestSchema,
9005
9417
  "blackforestlabs/flux-3/keyframes-to-video": FalFlux3KeyframesToVideoRequestSchema,
9006
9418
  "blackforestlabs/flux-3/text-to-video": FalFlux3TextToVideoRequestSchema,
9419
+ "blackforestlabs/flux-3-max/image-to-video": FalFlux3MaxImageToVideoRequestSchema,
9420
+ "blackforestlabs/flux-3-max/keyframes-to-video": FalFlux3MaxKeyframesToVideoRequestSchema,
9421
+ "blackforestlabs/flux-3-max/text-to-video": FalFlux3MaxTextToVideoRequestSchema,
9007
9422
  "blackforestlabs/flux-video-upscale": FalFluxVideoUpscaleRequestSchema,
9008
9423
  "bytedance/seedance-2.0/image-to-video": FalSeedance2p0ImageToVideoRequestSchema,
9009
9424
  "bytedance/seedance-2.0/text-to-video": FalSeedance2p0TextToVideoRequestSchema,