@layer_ai/sdk 1.0.35 → 1.0.40

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
  *
@@ -41,6 +46,8 @@ export interface BaseModelCapabilitiesREST {
41
46
  session_modes?: Array<string>;
42
47
  text_prompt?: boolean;
43
48
  text_prompt_required?: boolean;
49
+ /** Longest prompt, in characters, the model accepts; null when unbounded. */
50
+ max_prompt_chars?: number | null;
44
51
  negative_prompt?: boolean;
45
52
  seed?: boolean;
46
53
  inpainting?: boolean;
@@ -165,6 +172,24 @@ export interface BaseModelSummary {
165
172
  }
166
173
  /** Enum representing the status of a blueprint run. */
167
174
  export type BlueprintRunStatus = "pending" | "running" | "success" | "failure" | "cancelled";
175
+ export interface Body_exchangeToken {
176
+ /** Must be `client_credentials`. */
177
+ grant_type: string;
178
+ /** The service account's id. */
179
+ client_id?: string | null;
180
+ /** One of the service account's keys. */
181
+ client_secret?: string | null;
182
+ /** Space-delimited scopes to narrow the token to. */
183
+ scope?: string | null;
184
+ }
185
+ export interface Body_revokeToken {
186
+ /** The service account key to revoke. */
187
+ token: string;
188
+ /** The service account's id. */
189
+ client_id?: string | null;
190
+ /** One of the service account's keys. */
191
+ client_secret?: string | null;
192
+ }
168
193
  export interface CameraRotationDelta {
169
194
  pitch_delta?: number | null;
170
195
  yaw_delta?: number | null;
@@ -384,6 +409,10 @@ export interface EstimateInferencePriceRequest {
384
409
  reframe?: boolean | null;
385
410
  /** Outpaint/refill transparent areas. */
386
411
  refill?: boolean | null;
412
+ /** The guidance files the execute call will pass. An upscale or a per-megapixel background removal is priced by its source file's size, and on some models an input image bills the edit rate. */
413
+ guidance_files?: Array<ForgeGuidanceFileInput>;
414
+ /** The mask the execute call will pass. Some models bill a masked edit at a different rate. */
415
+ mask?: ForgeMaskInput | null;
387
416
  }
388
417
  export interface EstimateInferencePriceV2Output {
389
418
  /** Total estimated Creative Units price for this run. */
@@ -529,6 +558,28 @@ export interface EstimateInferencePriceV2Request {
529
558
  color_preservation?: boolean | null;
530
559
  /** Vectorize the output image. */
531
560
  vectorize?: boolean | null;
561
+ /** SVG path mode: `spline` (curves) or `polygon` (straight lines). Honored by the models whose capabilities report `vectorization_controls`. */
562
+ vectorization_mode?: VectorizationMode | null;
563
+ /** SVG color output: `color` or `binary` (black and white). Honored by the models whose capabilities report `vectorization_controls`. */
564
+ vectorization_color_mode?: VectorizationColorMode | null;
565
+ /** SVG shape layering in color output: `stacked` (shapes overlap) or `cutout` (no overlap). Honored by the models whose capabilities report `vectorization_controls`. */
566
+ vectorization_layering?: VectorizationLayering | null;
567
+ /** Drop specks smaller than this many pixels. Honored by the models whose capabilities report `vectorization_controls`. */
568
+ vectorization_filter_speckle?: number | null;
569
+ /** Color quantization level; lower merges more colors. Honored by the models whose capabilities report `vectorization_controls`. */
570
+ vectorization_color_precision?: number | null;
571
+ /** Color difference that splits gradient layers. Honored by the models whose capabilities report `vectorization_controls`. */
572
+ vectorization_layer_difference?: number | null;
573
+ /** Minimum angle, in degrees, kept as a sharp corner (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
574
+ vectorization_corner_threshold?: number | null;
575
+ /** Longest curve segment before it is subdivided (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
576
+ vectorization_length_threshold?: number | null;
577
+ /** Angle, in degrees, at which a curve is split (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
578
+ vectorization_splice_threshold?: number | null;
579
+ /** Curve-fitting passes. Honored by the models whose capabilities report `vectorization_controls`. */
580
+ vectorization_max_iterations?: number | null;
581
+ /** Decimal places kept in SVG path coordinates. Honored by the models whose capabilities report `vectorization_controls`. */
582
+ vectorization_path_precision?: number | null;
532
583
  /** Put the output on a transparent background. Also accepted as `remove_background`. */
533
584
  transparency?: boolean | null;
534
585
  /** Reframe/extend the image. */
@@ -549,10 +600,14 @@ export interface EstimateInferencePriceV2Request {
549
600
  target_language?: string | null;
550
601
  /** 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
602
  audio_sections?: Array<AudioEditSection>;
603
+ /** 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. */
604
+ audio_extension?: AudioExtension | null;
552
605
  /** 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
606
  video_section?: VideoSection | null;
554
607
  /** Reference images/files to guide generation. */
555
608
  guidance_files?: Array<ForgeGuidanceFileInput>;
609
+ /** The mask the execute call will pass. Some models bill a masked edit at a different rate. */
610
+ mask?: ForgeMaskInput | null;
556
611
  }
557
612
  export interface EstimateTrainingPriceRequest {
558
613
  /** The reference set to price training for. */
@@ -859,6 +914,28 @@ export interface ExecuteInferenceV2Request {
859
914
  color_preservation?: boolean | null;
860
915
  /** Vectorize the output image. */
861
916
  vectorize?: boolean | null;
917
+ /** SVG path mode: `spline` (curves) or `polygon` (straight lines). Honored by the models whose capabilities report `vectorization_controls`. */
918
+ vectorization_mode?: VectorizationMode | null;
919
+ /** SVG color output: `color` or `binary` (black and white). Honored by the models whose capabilities report `vectorization_controls`. */
920
+ vectorization_color_mode?: VectorizationColorMode | null;
921
+ /** SVG shape layering in color output: `stacked` (shapes overlap) or `cutout` (no overlap). Honored by the models whose capabilities report `vectorization_controls`. */
922
+ vectorization_layering?: VectorizationLayering | null;
923
+ /** Drop specks smaller than this many pixels. Honored by the models whose capabilities report `vectorization_controls`. */
924
+ vectorization_filter_speckle?: number | null;
925
+ /** Color quantization level; lower merges more colors. Honored by the models whose capabilities report `vectorization_controls`. */
926
+ vectorization_color_precision?: number | null;
927
+ /** Color difference that splits gradient layers. Honored by the models whose capabilities report `vectorization_controls`. */
928
+ vectorization_layer_difference?: number | null;
929
+ /** Minimum angle, in degrees, kept as a sharp corner (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
930
+ vectorization_corner_threshold?: number | null;
931
+ /** Longest curve segment before it is subdivided (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
932
+ vectorization_length_threshold?: number | null;
933
+ /** Angle, in degrees, at which a curve is split (spline mode). Honored by the models whose capabilities report `vectorization_controls`. */
934
+ vectorization_splice_threshold?: number | null;
935
+ /** Curve-fitting passes. Honored by the models whose capabilities report `vectorization_controls`. */
936
+ vectorization_max_iterations?: number | null;
937
+ /** Decimal places kept in SVG path coordinates. Honored by the models whose capabilities report `vectorization_controls`. */
938
+ vectorization_path_precision?: number | null;
862
939
  /** Put the output on a transparent background. Also accepted as `remove_background`. */
863
940
  transparency?: boolean | null;
864
941
  /** Reframe/extend the image. */
@@ -879,6 +956,8 @@ export interface ExecuteInferenceV2Request {
879
956
  target_language?: string | null;
880
957
  /** 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
958
  audio_sections?: Array<AudioEditSection>;
959
+ /** 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. */
960
+ audio_extension?: AudioExtension | null;
882
961
  /** 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
962
  video_section?: VideoSection | null;
884
963
  /** Reference images/files to guide generation. */
@@ -1203,7 +1282,7 @@ export interface InferenceReferenceSetInput {
1203
1282
  weight?: number;
1204
1283
  }
1205
1284
  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";
1285
+ 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
1286
  /** Delivered when an inference run reaches a terminal state. */
1208
1287
  export interface InferenceWebhookEvent {
1209
1288
  /** Unique event id, repeated in the webhook-id header. */
@@ -1298,6 +1377,8 @@ export interface ModelCapabilitiesREST {
1298
1377
  session_modes?: Array<string>;
1299
1378
  text_prompt?: boolean;
1300
1379
  text_prompt_required?: boolean;
1380
+ /** Longest prompt, in characters, the model accepts; null when unbounded. */
1381
+ max_prompt_chars?: number | null;
1301
1382
  negative_prompt?: boolean;
1302
1383
  seed?: boolean;
1303
1384
  inpainting?: boolean;
@@ -1542,7 +1623,7 @@ export interface RequestUploadUrlResponse {
1542
1623
  /** Source type the file was created with, echoed from the request. */
1543
1624
  source_type?: FileSourceType | null;
1544
1625
  }
1545
- export type Role = "admin" | "editor" | "settings_admin" | "art_director" | "artist" | "member";
1626
+ export type Role = "admin" | "editor" | "settings_admin" | "art_director" | "artist" | "member" | "installation" | "provisioning";
1546
1627
  export interface RotateWebhookSecretResponse {
1547
1628
  /** The new signing secret. Start verifying with it. */
1548
1629
  secret: string;
@@ -1736,6 +1817,16 @@ export interface StartTrainingResponse {
1736
1817
  */
1737
1818
  export type StyleCategory = "general" | "character" | "object" | "scene" | "animation" | "brand" | "camera_movement" | "camera_angle" | "camera_framing" | "camera_lens" | "scene_lighting" | "scene_composition" | "scene_atmosphere" | "time_and_motion" | "genre_look" | "optical_effect" | "visual_effect" | "character_performance";
1738
1819
  export type TargetRegion = "all" | "subject" | "background";
1820
+ export interface TokenResponse {
1821
+ /** A signed JWT access token (RFC 9068), sent as `Authorization: Bearer <token>`. Treat it as opaque. */
1822
+ access_token: string;
1823
+ /** Always `Bearer`. */
1824
+ token_type: string;
1825
+ /** Seconds until the token expires. */
1826
+ expires_in: number;
1827
+ /** The space-delimited scopes the token carries. */
1828
+ scope: string;
1829
+ }
1739
1830
  export interface ToolGuidanceFileTypeSupport {
1740
1831
  /** Guidance file type, such as init_image, reference_image, first_frame, pose, or depth. */
1741
1832
  type: string;
@@ -1820,6 +1911,9 @@ export interface ValidationError {
1820
1911
  input?: unknown;
1821
1912
  ctx?: Record<string, unknown>;
1822
1913
  }
1914
+ export type VectorizationColorMode = "color" | "binary";
1915
+ export type VectorizationLayering = "stacked" | "cutout";
1916
+ export type VectorizationMode = "spline" | "polygon";
1823
1917
  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
1918
  /**
1825
1919
  * 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.40";
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.40",
4
4
  "description": "Official JavaScript and TypeScript SDK for Layer \u2014 AI asset creation for game studios.",
5
5
  "keywords": [
6
6
  "ai",