@layer_ai/sdk 1.0.35 → 1.0.37

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.
@@ -26,6 +26,11 @@ export interface AudioEditSection {
26
26
  end_seconds: number;
27
27
  anchor?: AudioAnchor;
28
28
  }
29
+ /** Outpaint: how much audio to add before/after the source clip. */
30
+ export interface AudioExtension {
31
+ before_seconds?: number;
32
+ after_seconds?: number;
33
+ }
29
34
  /**
30
35
  * Container for a delivered audio file.
31
36
  *
@@ -529,6 +534,28 @@ export interface EstimateInferencePriceV2Request {
529
534
  color_preservation?: boolean | null;
530
535
  /** Vectorize the output image. */
531
536
  vectorize?: boolean | null;
537
+ /** SVG path mode: `spline` (curves) or `polygon` (straight lines). Honored by the models whose capabilities report `vectorization_controls`. */
538
+ vectorization_mode?: VectorizationMode | null;
539
+ /** SVG color output: `color` or `binary` (black and white). Honored by the models whose capabilities report `vectorization_controls`. */
540
+ vectorization_color_mode?: VectorizationColorMode | null;
541
+ /** SVG shape layering in color output: `stacked` (shapes overlap) or `cutout` (no overlap). Honored by the models whose capabilities report `vectorization_controls`. */
542
+ vectorization_layering?: VectorizationLayering | null;
543
+ /** Drop specks smaller than this many pixels. Honored by the models whose capabilities report `vectorization_controls`. */
544
+ vectorization_filter_speckle?: number | null;
545
+ /** Color quantization level; lower merges more colors. Honored by the models whose capabilities report `vectorization_controls`. */
546
+ vectorization_color_precision?: number | null;
547
+ /** Color difference that splits gradient layers. Honored by the models whose capabilities report `vectorization_controls`. */
548
+ vectorization_layer_difference?: number | null;
549
+ /** Minimum angle, in degrees, kept as a sharp corner (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
550
+ vectorization_corner_threshold?: number | null;
551
+ /** Longest curve segment before it is subdivided (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
552
+ vectorization_length_threshold?: number | null;
553
+ /** Angle, in degrees, at which a curve is split (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
554
+ vectorization_splice_threshold?: number | null;
555
+ /** Curve-fitting passes. Honored by the models whose capabilities report `vectorization_controls`. */
556
+ vectorization_max_iterations?: number | null;
557
+ /** Decimal places kept in SVG path coordinates. Honored by the models whose capabilities report `vectorization_controls`. */
558
+ vectorization_path_precision?: number | null;
532
559
  /** Put the output on a transparent background. Also accepted as `remove_background`. */
533
560
  transparency?: boolean | null;
534
561
  /** Reframe/extend the image. */
@@ -549,6 +576,8 @@ export interface EstimateInferencePriceV2Request {
549
576
  target_language?: string | null;
550
577
  /** Regenerate stretches of the init audio: each section is a window from `start_seconds` to `end_seconds`, measured from the clip's `anchor` (its start by default), that the prompt rewrites while the rest is kept. Honored by the audio models listed for the `inpainting` use case. */
551
578
  audio_sections?: Array<AudioEditSection>;
579
+ /** Extend the init audio: `after_seconds` of new audio past its end (and, where the model allows it, `before_seconds` ahead of its start). Honored by the audio models listed for the `extend_audio` use case. */
580
+ audio_extension?: AudioExtension | null;
552
581
  /** Replace a span of the init video with a generated scene: the source cuts at `start_seconds` and picks up again at `end_seconds`, both from the clip's start, while `duration_seconds` sets the new scene's length. Required by the video models listed for the `insert_video` use case. */
553
582
  video_section?: VideoSection | null;
554
583
  /** Reference images/files to guide generation. */
@@ -859,6 +888,28 @@ export interface ExecuteInferenceV2Request {
859
888
  color_preservation?: boolean | null;
860
889
  /** Vectorize the output image. */
861
890
  vectorize?: boolean | null;
891
+ /** SVG path mode: `spline` (curves) or `polygon` (straight lines). Honored by the models whose capabilities report `vectorization_controls`. */
892
+ vectorization_mode?: VectorizationMode | null;
893
+ /** SVG color output: `color` or `binary` (black and white). Honored by the models whose capabilities report `vectorization_controls`. */
894
+ vectorization_color_mode?: VectorizationColorMode | null;
895
+ /** SVG shape layering in color output: `stacked` (shapes overlap) or `cutout` (no overlap). Honored by the models whose capabilities report `vectorization_controls`. */
896
+ vectorization_layering?: VectorizationLayering | null;
897
+ /** Drop specks smaller than this many pixels. Honored by the models whose capabilities report `vectorization_controls`. */
898
+ vectorization_filter_speckle?: number | null;
899
+ /** Color quantization level; lower merges more colors. Honored by the models whose capabilities report `vectorization_controls`. */
900
+ vectorization_color_precision?: number | null;
901
+ /** Color difference that splits gradient layers. Honored by the models whose capabilities report `vectorization_controls`. */
902
+ vectorization_layer_difference?: number | null;
903
+ /** Minimum angle, in degrees, kept as a sharp corner (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
904
+ vectorization_corner_threshold?: number | null;
905
+ /** Longest curve segment before it is subdivided (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
906
+ vectorization_length_threshold?: number | null;
907
+ /** Angle, in degrees, at which a curve is split (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
908
+ vectorization_splice_threshold?: number | null;
909
+ /** Curve-fitting passes. Honored by the models whose capabilities report `vectorization_controls`. */
910
+ vectorization_max_iterations?: number | null;
911
+ /** Decimal places kept in SVG path coordinates. Honored by the models whose capabilities report `vectorization_controls`. */
912
+ vectorization_path_precision?: number | null;
862
913
  /** Put the output on a transparent background. Also accepted as `remove_background`. */
863
914
  transparency?: boolean | null;
864
915
  /** Reframe/extend the image. */
@@ -879,6 +930,8 @@ export interface ExecuteInferenceV2Request {
879
930
  target_language?: string | null;
880
931
  /** Regenerate stretches of the init audio: each section is a window from `start_seconds` to `end_seconds`, measured from the clip's `anchor` (its start by default), that the prompt rewrites while the rest is kept. Honored by the audio models listed for the `inpainting` use case. */
881
932
  audio_sections?: Array<AudioEditSection>;
933
+ /** Extend the init audio: `after_seconds` of new audio past its end (and, where the model allows it, `before_seconds` ahead of its start). Honored by the audio models listed for the `extend_audio` use case. */
934
+ audio_extension?: AudioExtension | null;
882
935
  /** Replace a span of the init video with a generated scene: the source cuts at `start_seconds` and picks up again at `end_seconds`, both from the clip's start, while `duration_seconds` sets the new scene's length. Required by the video models listed for the `insert_video` use case. */
883
936
  video_section?: VideoSection | null;
884
937
  /** Reference images/files to guide generation. */
@@ -1203,7 +1256,7 @@ export interface InferenceReferenceSetInput {
1203
1256
  weight?: number;
1204
1257
  }
1205
1258
  export type InferenceStatus = "in_progress" | "complete" | "failed" | "cancelled" | "deleted";
1206
- export type InferenceUseCase = "text_to_image" | "image_editing" | "multi_angle" | "inpainting" | "reframing" | "split_into_layers" | "text_to_video" | "image_to_video" | "video_editing" | "video_extend" | "insert_video" | "video_subtitle" | "video_lipsync" | "motion_transfer" | "video_object_swap" | "video_character_swap" | "relight_video" | "image_to_video_lipsync" | "text_to_3d" | "image_to_3d" | "text_to_world" | "image_to_world" | "remesh" | "retexture" | "uv_unwrap" | "animate" | "rig" | "segment" | "image_segment" | "text_to_speech" | "sound_effects" | "music" | "upscaling" | "video_interpolation" | "denoise_image" | "denoise_video" | "denoise_audio" | "audio_separation" | "deblur_video" | "restore_image" | "sdr_to_hdr_video" | "background_removal" | "vectorization" | "virtual_try_on" | "restyle" | "pixelate" | "colorize" | "change_expression" | "erase_object" | "edit_text" | "dub_video" | "generate_pbr_materials" | "complete_draft";
1259
+ export type InferenceUseCase = "text_to_image" | "image_editing" | "multi_angle" | "inpainting" | "reframing" | "split_into_layers" | "text_to_video" | "image_to_video" | "video_editing" | "video_extend" | "insert_video" | "video_subtitle" | "video_lipsync" | "motion_transfer" | "video_object_swap" | "video_character_swap" | "relight_video" | "image_to_video_lipsync" | "text_to_3d" | "image_to_3d" | "text_to_world" | "image_to_world" | "remesh" | "retexture" | "uv_unwrap" | "animate" | "rig" | "segment" | "image_segment" | "text_to_speech" | "sound_effects" | "music" | "upscaling" | "video_interpolation" | "denoise_image" | "denoise_video" | "denoise_audio" | "audio_separation" | "audio_isolation" | "deblur_video" | "restore_image" | "sdr_to_hdr_video" | "background_removal" | "vectorization" | "virtual_try_on" | "restyle" | "pixelate" | "colorize" | "change_expression" | "erase_object" | "edit_text" | "dub_video" | "extend_audio" | "generate_pbr_materials" | "complete_draft";
1207
1260
  /** Delivered when an inference run reaches a terminal state. */
1208
1261
  export interface InferenceWebhookEvent {
1209
1262
  /** Unique event id, repeated in the webhook-id header. */
@@ -1820,6 +1873,9 @@ export interface ValidationError {
1820
1873
  input?: unknown;
1821
1874
  ctx?: Record<string, unknown>;
1822
1875
  }
1876
+ export type VectorizationColorMode = "color" | "binary";
1877
+ export type VectorizationLayering = "stacked" | "cutout";
1878
+ export type VectorizationMode = "spline" | "polygon";
1823
1879
  export type VideoEffectType = "general" | "orbit_360" | "action_run" | "agent_reveal" | "arc" | "arc_left" | "baseball_kick" | "basketball_dunks" | "boxing" | "buckle_up" | "building_explosion" | "bullet_time" | "car_chasing" | "car_explosion" | "car_grip" | "catch" | "catwalk" | "crane_down" | "crane_over_the_head" | "crane_up" | "crash_zoom_in" | "crash_zoom_out" | "dirty_lens" | "disintegration" | "dolly_in" | "dolly_left" | "dolly_out" | "dolly_right" | "dolly_zoom_in" | "dolly_zoom_out" | "double_dolly" | "downhill_pov" | "dutch_angle" | "eyes_in" | "face_punch" | "fisheye" | "flying" | "focus_change" | "fpv_drone" | "glam" | "handheld" | "head_tracking" | "hyperlapse" | "invisible" | "jib_down" | "jib_up" | "kiss" | "lazy_susan" | "lens_crack" | "lens_flare" | "levitation" | "low_shutter" | "melting" | "moonwalk_left" | "moonwalk_right" | "mouth_in" | "object_pov" | "overhead" | "push_to_glass" | "rap_flex" | "robo_arm" | "set_on_fire" | "skateboard_glide" | "skateboarding" | "skateboard_kickflip" | "skateboard_ollie" | "skate_cruise" | "ski_carving" | "ski_powder" | "snorricam" | "snowboard_carving" | "snowboard_powder" | "soul_jump" | "static" | "super_dolly_in" | "super_dolly_out" | "tentacles" | "through_object_in" | "through_object_out" | "thunder_god" | "tilt_down" | "tilt_up" | "timelapse_human" | "timelapse_landscape" | "turning_metal" | "whip_pan" | "wiggle" | "wind_to_face" | "yoyo_zoom" | "zoom_in" | "zoom_out";
1824
1880
  /**
1825
1881
  * A time window of the source clip, in seconds from its start, that an edit replaces.
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.0.35";
1
+ export const VERSION = "1.0.37";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layer_ai/sdk",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "Official JavaScript and TypeScript SDK for Layer \u2014 AI asset creation for game studios.",
5
5
  "keywords": [
6
6
  "ai",