@layer_ai/sdk 1.0.40 → 1.0.44

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.
@@ -55,6 +55,8 @@ export interface BaseModelCapabilitiesREST {
55
55
  tileability?: boolean;
56
56
  /** Generates a tileable image by construction when `tileability` is set, rather than through Layer's seam-repair pass. Cannot be combined with a LoRA style. */
57
57
  native_tileability?: boolean;
58
+ /** Draws a game tile (isometric or hex) onto a fixed grid when a generation sets `tile_grid`. */
59
+ tile_grid?: boolean;
58
60
  /** Supported guidance inputs and their per-type file limits. `init_image` is the source image an edit model modifies; `reference_image` supplies subjects to reproduce; `ip_adapter` is legacy IP-Adapter style-only transfer. */
59
61
  guidance_file_types?: Array<ToolGuidanceFileTypeSupport>;
60
62
  /** Caps on the combined count of several guidance types, on top of each type's own max_count. A run must fit both: 9 images, 3 videos and 3 audio files can each be within their own limits and still exceed a 12-file total. */
@@ -586,6 +588,10 @@ export interface EstimateInferencePriceV2Request {
586
588
  reframe?: boolean | null;
587
589
  /** Generate a seamless texture that tiles without a visible edge. Honored by the models whose `inference-schema` lists `tileability` (list them with `GET .../base-models?tileable=true`), and ignored by the rest. */
588
590
  tileability?: boolean | null;
591
+ /** `EQUIRECTANGULAR` draws a 2:1 360 degree skybox whose sides meet and whose poles are settled. Honored by the models listed for the `create_skybox` use case; the size must be one of the model's skybox sizes (its presets carrying the projection), and unset takes the largest. */
592
+ projection?: ImageProjection | null;
593
+ /** How strongly a model's 360 LoRA draws the projection, as its scale. Unset takes the LoRA's own. */
594
+ projection_strength?: number | null;
589
595
  /** Outpaint/refill transparent areas. */
590
596
  refill?: boolean | null;
591
597
  /** Re-render the init image from another camera position: rotation in degrees (`yaw_delta` turns around the subject, `pitch_delta` looks from above or below), `distance_delta` moves closer or further. Honored by the models whose capabilities report `camera_transform`, such as those listed for the `multi_angle` use case. */
@@ -594,6 +600,10 @@ export interface EstimateInferencePriceV2Request {
594
600
  camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
595
601
  /** Relight the init image: one or more orbit lights, each placed by `rotation` (`yaw` around the subject and `pitch` above or below it, in degrees) with an `intensity` and a `color_hex`. Honored by the models whose capabilities report `scene_lighting`. */
596
602
  scene_lighting?: SceneLightingConfig | null;
603
+ /** Draw a game tile onto a grid: its `shape` (`SQUARE` for an isometric diamond, `HEXAGON` for a hex tile) and `orientation` (`POINTY_TOP` or `FLAT_TOP` for a hexagon), the camera `elevation` (30 for 2:1 dimetric; a hexagon takes 60, or 90 from straight above), a `facing` of 0, 90, 180 or 270 for a square, the `footprint_width` x `footprint_depth` in cells (a hexagon covers one), the wall `height` in cell sides (0 for a flat ground tile) and the delivered `tile_width` in pixels. The run draws over a blockout of the grid, so it takes no init image, and the output comes back cut out and fitted onto the grid, its base recorded in the file's `tile` metadata. Honored by the models whose capabilities report `tile_grid`. */
604
+ tile_grid?: TileGrid | null;
605
+ /** Fit the image onto its delivery canvas after everything else the run does: `trim` its transparent margin, keep the drawing's own size (`canvas: CONTENT`) or place it on a `FIXED` `width` x `height` canvas, scaled as `scale` says and aligned on `anchor` (`BASE` stands a game tile's base on the bottom centre), with `padding` px of transparent margin. Image outputs only. */
606
+ output_fit?: OutputFit | null;
597
607
  /** The expression a face edit gives the face, one of the names the model's capabilities list under `expressions`. */
598
608
  expression?: string | null;
599
609
  /** The language a dub speaks, as one of the ISO 639-1 codes the model's capabilities list under `dub_languages`. */
@@ -942,6 +952,10 @@ export interface ExecuteInferenceV2Request {
942
952
  reframe?: boolean | null;
943
953
  /** Generate a seamless texture that tiles without a visible edge. Honored by the models whose `inference-schema` lists `tileability` (list them with `GET .../base-models?tileable=true`), and ignored by the rest. */
944
954
  tileability?: boolean | null;
955
+ /** `EQUIRECTANGULAR` draws a 2:1 360 degree skybox whose sides meet and whose poles are settled. Honored by the models listed for the `create_skybox` use case; the size must be one of the model's skybox sizes (its presets carrying the projection), and unset takes the largest. */
956
+ projection?: ImageProjection | null;
957
+ /** How strongly a model's 360 LoRA draws the projection, as its scale. Unset takes the LoRA's own. */
958
+ projection_strength?: number | null;
945
959
  /** Outpaint/refill transparent areas. */
946
960
  refill?: boolean | null;
947
961
  /** Re-render the init image from another camera position: rotation in degrees (`yaw_delta` turns around the subject, `pitch_delta` looks from above or below), `distance_delta` moves closer or further. Honored by the models whose capabilities report `camera_transform`, such as those listed for the `multi_angle` use case. */
@@ -950,6 +964,10 @@ export interface ExecuteInferenceV2Request {
950
964
  camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
951
965
  /** Relight the init image: one or more orbit lights, each placed by `rotation` (`yaw` around the subject and `pitch` above or below it, in degrees) with an `intensity` and a `color_hex`. Honored by the models whose capabilities report `scene_lighting`. */
952
966
  scene_lighting?: SceneLightingConfig | null;
967
+ /** Draw a game tile onto a grid: its `shape` (`SQUARE` for an isometric diamond, `HEXAGON` for a hex tile) and `orientation` (`POINTY_TOP` or `FLAT_TOP` for a hexagon), the camera `elevation` (30 for 2:1 dimetric; a hexagon takes 60, or 90 from straight above), a `facing` of 0, 90, 180 or 270 for a square, the `footprint_width` x `footprint_depth` in cells (a hexagon covers one), the wall `height` in cell sides (0 for a flat ground tile) and the delivered `tile_width` in pixels. The run draws over a blockout of the grid, so it takes no init image, and the output comes back cut out and fitted onto the grid, its base recorded in the file's `tile` metadata. Honored by the models whose capabilities report `tile_grid`. */
968
+ tile_grid?: TileGrid | null;
969
+ /** Fit the image onto its delivery canvas after everything else the run does: `trim` its transparent margin, keep the drawing's own size (`canvas: CONTENT`) or place it on a `FIXED` `width` x `height` canvas, scaled as `scale` says and aligned on `anchor` (`BASE` stands a game tile's base on the bottom centre), with `padding` px of transparent margin. Image outputs only. */
970
+ output_fit?: OutputFit | null;
953
971
  /** The expression a face edit gives the face, one of the names the model's capabilities list under `expressions`. */
954
972
  expression?: string | null;
955
973
  /** The language a dub speaks, as one of the ISO 639-1 codes the model's capabilities list under `dub_languages`. */
@@ -1039,7 +1057,7 @@ export interface ForgeGuidanceFileInput {
1039
1057
  export interface ForgeMaskInput {
1040
1058
  /** Mask image file ID. */
1041
1059
  file_id?: string | null;
1042
- /** Use transparent areas as mask. */
1060
+ /** Use the init image's transparent areas as the mask. As the only mask source, a fully opaque init used as stored (no transform, padding or target) is refused; a mask file works on any init. */
1043
1061
  for_transparency?: boolean | null;
1044
1062
  /** Use non-transparent areas as mask. */
1045
1063
  for_nontransparency?: boolean | null;
@@ -1275,6 +1293,8 @@ export type GuidanceFileType = "init_image" | "reference_image" | "scribble" | "
1275
1293
  export interface HTTPValidationError {
1276
1294
  detail?: Array<ValidationError>;
1277
1295
  }
1296
+ /** The geometry an output image is drawn in, when it is not an ordinary flat picture. */
1297
+ export type ImageProjection = "EQUIRECTANGULAR";
1278
1298
  export interface InferenceReferenceSetInput {
1279
1299
  /** Reference set ID from GET /v2/workspaces/{workspace_id}/reference-sets. */
1280
1300
  set_id: string;
@@ -1282,7 +1302,7 @@ export interface InferenceReferenceSetInput {
1282
1302
  weight?: number;
1283
1303
  }
1284
1304
  export type InferenceStatus = "in_progress" | "complete" | "failed" | "cancelled" | "deleted";
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";
1305
+ 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" | "voice_change" | "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" | "create_skybox" | "complete_draft";
1286
1306
  /** Delivered when an inference run reaches a terminal state. */
1287
1307
  export interface InferenceWebhookEvent {
1288
1308
  /** Unique event id, repeated in the webhook-id header. */
@@ -1512,6 +1532,25 @@ export interface OrbitLightRotation {
1512
1532
  pitch: number;
1513
1533
  yaw: number;
1514
1534
  }
1535
+ export interface OutputFit {
1536
+ trim?: boolean;
1537
+ canvas?: OutputFitCanvas;
1538
+ width?: number | null;
1539
+ height?: number | null;
1540
+ scale?: OutputFitScale;
1541
+ anchor?: OutputFitAnchor;
1542
+ padding?: number;
1543
+ }
1544
+ /**
1545
+ * The point of the drawing that lands on the same point of the canvas.
1546
+ *
1547
+ * ``BASE`` is a game tile's base: its anchor, the bottom centre of the cell it stands on, lands
1548
+ * at the bottom centre of the canvas, so tiles of one grid stand on the same point whatever rises above them.
1549
+ */
1550
+ export type OutputFitAnchor = "TOP_LEFT" | "TOP_CENTER" | "TOP_RIGHT" | "CENTER_LEFT" | "CENTER" | "CENTER_RIGHT" | "BOTTOM_LEFT" | "BOTTOM_CENTER" | "BOTTOM_RIGHT" | "BASE";
1551
+ export type OutputFitCanvas = "CONTENT" | "FIXED";
1552
+ /** How the drawing goes onto a fixed canvas. The names follow the workflow Resize node's. */
1553
+ export type OutputFitScale = "PLACE" | "SHRINK_AND_PAD" | "FIT_AND_PAD" | "FIT_AND_CROP" | "STRETCH";
1515
1554
  export interface PaginationOutput {
1516
1555
  /** Cursor to use to get the next page */
1517
1556
  next_cursor?: string | null;
@@ -1817,6 +1856,39 @@ export interface StartTrainingResponse {
1817
1856
  */
1818
1857
  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";
1819
1858
  export type TargetRegion = "all" | "subject" | "background";
1859
+ /**
1860
+ * A quarter turn of the camera around a diamond tile, in degrees clockwise seen from above.
1861
+ *
1862
+ * 0 is the facing a set is drawn in first; the others show the same subject's other sides. A
1863
+ * hexagon is only drawn facing 0.
1864
+ */
1865
+ export type TileFacing = 0 | 90 | 180 | 270;
1866
+ /** One tile's place on the grid. Every tile of a set shares all but the footprint and height. */
1867
+ export interface TileGrid {
1868
+ shape?: TileShape;
1869
+ /** Unset takes the shape's first: DIAMOND for a square, POINTY_TOP for a hexagon. */
1870
+ orientation?: TileOrientation | null;
1871
+ /** Unset takes 30 (2:1 dimetric) for a square, 60 for a hexagon. */
1872
+ elevation?: number | null;
1873
+ facing?: TileFacing;
1874
+ footprint_width?: number;
1875
+ footprint_depth?: number;
1876
+ height?: number;
1877
+ tile_width?: number;
1878
+ light_from?: TileLightSide;
1879
+ }
1880
+ /** The side the key light comes from, seen from the camera. */
1881
+ export type TileLightSide = "left" | "right";
1882
+ /**
1883
+ * How a cell's outline is turned to the camera.
1884
+ *
1885
+ * A square cell is either ``DIAMOND``, turned 45 degrees so its base reads as a diamond (the
1886
+ * isometric look), or ``ALIGNED`` with the camera, as top-down maps are. A hexagon has either a
1887
+ * vertex (``POINTY_TOP``) or an edge (``FLAT_TOP``) at the top.
1888
+ */
1889
+ export type TileOrientation = "DIAMOND" | "ALIGNED" | "POINTY_TOP" | "FLAT_TOP";
1890
+ /** The outline of one cell of the grid, seen from straight above. */
1891
+ export type TileShape = "SQUARE" | "HEXAGON";
1820
1892
  export interface TokenResponse {
1821
1893
  /** A signed JWT access token (RFC 9068), sent as `Authorization: Bearer <token>`. Treat it as opaque. */
1822
1894
  access_token: string;
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.0.40";
1
+ export const VERSION = "1.0.44";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layer_ai/sdk",
3
- "version": "1.0.40",
3
+ "version": "1.0.44",
4
4
  "description": "Official JavaScript and TypeScript SDK for Layer \u2014 AI asset creation for game studios.",
5
5
  "keywords": [
6
6
  "ai",