@layer_ai/sdk 1.0.70 → 1.0.74

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.
@@ -426,6 +426,8 @@ export interface CreateReferenceSetResponse {
426
426
  export interface CreateSessionBody {
427
427
  /** The session's display name. */
428
428
  name: string;
429
+ /** The project to file the session under. Runs in the session follow the project's AI policy, and their outputs are added to the project. The project must be active and the caller a member of it or a workspace admin. */
430
+ project_id?: string | null;
429
431
  }
430
432
  export interface DailyUsage {
431
433
  /** Calendar day (UTC), ISO format YYYY-MM-DD. */
@@ -795,13 +797,13 @@ export interface EstimateInferencePriceV2Request {
795
797
  camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
796
798
  /** 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`. */
797
799
  scene_lighting?: SceneLightingConfig | null;
798
- /** 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`. */
800
+ /** 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 (unset keeps the cell as drawn, rounded to a power of two). The run draws over a blockout of the grid; an init image is the tile's subject, redrawn onto the grid with its shape and design kept. 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`. */
799
801
  tile_grid?: TileGrid | null;
800
802
  /** 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 and `corner_radius` px rounded corners cut to transparent. Image outputs only. */
801
803
  output_fit?: OutputFit | null;
802
804
  /** Deliver the image as a 9-slice UI element (a button, frame or panel that resizes): after everything else the run does, the plain band through its middle is found on each axis, the edges and centre are made to tile (painted texture kept, light evened out), and the insets are recorded as the file's `nineSlice` metadata. An image with no such band is delivered as drawn, without insets. Image outputs only. */
803
805
  nine_slice?: boolean | null;
804
- /** Split the init image into parallax layers by depth: `layers` (2 to 6, default 5) cut at `cuts`, ascending nearness values in (0, 1), one fewer than the layers (unset cuts at the gaps in the scene's own depth); `loop` makes every layer repeat left to right. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model given no prompt is told to continue the scenery. Delivered as a layered PSD, farthest layer at the bottom, with each layer's scroll speed in the file's `parallax` metadata. Billed as one run of the model per layer but the nearest. */
806
+ /** Split the init image into parallax layers by depth: `layers` (2 to 6, default 5) cut at `cuts`, ascending nearness values in (0, 1), one fewer than the layers (unset cuts at the gaps in the scene's own depth); `loop` makes every layer repeat left to right, each plate healed across its wrap by GPT Image 2.5 Flare at high quality. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model given no prompt is told to continue the scenery. Delivered as a layered PSD, farthest layer at the bottom, with each layer's scroll speed in the file's `parallax` metadata. Billed as one run of the model per layer but the nearest; a loop adds one heal per plate. */
805
807
  parallax?: ParallaxSplit | null;
806
808
  /** Colors the output should use: `colors`, each a `name` and a `#RRGGBB` `hex` (and an optional `role`), and optionally the `reference_set_id` they were picked from. The provider steers toward the hex values on the models whose capabilities report `max_palette_colors`, which is also the most colors a run takes there. Other models whose prompt describes how the output looks get the colors added to a non-empty prompt; models whose prompt is spoken, set into the output as text, a query, or a description of sound or motion, and text and audio models, ignore it. */
807
809
  color_palette?: InferenceColorPalette | null;
@@ -1223,13 +1225,13 @@ export interface ExecuteInferenceV2Request {
1223
1225
  camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
1224
1226
  /** 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`. */
1225
1227
  scene_lighting?: SceneLightingConfig | null;
1226
- /** 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`. */
1228
+ /** 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 (unset keeps the cell as drawn, rounded to a power of two). The run draws over a blockout of the grid; an init image is the tile's subject, redrawn onto the grid with its shape and design kept. 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`. */
1227
1229
  tile_grid?: TileGrid | null;
1228
1230
  /** 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 and `corner_radius` px rounded corners cut to transparent. Image outputs only. */
1229
1231
  output_fit?: OutputFit | null;
1230
1232
  /** Deliver the image as a 9-slice UI element (a button, frame or panel that resizes): after everything else the run does, the plain band through its middle is found on each axis, the edges and centre are made to tile (painted texture kept, light evened out), and the insets are recorded as the file's `nineSlice` metadata. An image with no such band is delivered as drawn, without insets. Image outputs only. */
1231
1233
  nine_slice?: boolean | null;
1232
- /** Split the init image into parallax layers by depth: `layers` (2 to 6, default 5) cut at `cuts`, ascending nearness values in (0, 1), one fewer than the layers (unset cuts at the gaps in the scene's own depth); `loop` makes every layer repeat left to right. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model given no prompt is told to continue the scenery. Delivered as a layered PSD, farthest layer at the bottom, with each layer's scroll speed in the file's `parallax` metadata. Billed as one run of the model per layer but the nearest. */
1234
+ /** Split the init image into parallax layers by depth: `layers` (2 to 6, default 5) cut at `cuts`, ascending nearness values in (0, 1), one fewer than the layers (unset cuts at the gaps in the scene's own depth); `loop` makes every layer repeat left to right, each plate healed across its wrap by GPT Image 2.5 Flare at high quality. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model given no prompt is told to continue the scenery. Delivered as a layered PSD, farthest layer at the bottom, with each layer's scroll speed in the file's `parallax` metadata. Billed as one run of the model per layer but the nearest; a loop adds one heal per plate. */
1233
1235
  parallax?: ParallaxSplit | null;
1234
1236
  /** Colors the output should use: `colors`, each a `name` and a `#RRGGBB` `hex` (and an optional `role`), and optionally the `reference_set_id` they were picked from. The provider steers toward the hex values on the models whose capabilities report `max_palette_colors`, which is also the most colors a run takes there. Other models whose prompt describes how the output looks get the colors added to a non-empty prompt; models whose prompt is spoken, set into the output as text, a query, or a description of sound or motion, and text and audio models, ignore it. */
1235
1237
  color_palette?: InferenceColorPalette | null;
@@ -1641,6 +1643,30 @@ export interface InferenceReferenceSetInput {
1641
1643
  weight?: number;
1642
1644
  }
1643
1645
  export type InferenceStatus = "in_progress" | "complete" | "failed" | "cancelled" | "deleted";
1646
+ /** Whether a tool makes something new or changes something the user already has. */
1647
+ export type InferenceToolGroup = "generate" | "edit";
1648
+ export interface InferenceToolSource {
1649
+ /** The type of asset the tool works on. */
1650
+ modality: Modality;
1651
+ }
1652
+ export interface InferenceToolSummary {
1653
+ /** The tool's key, such as `image.upscale`. */
1654
+ key: string;
1655
+ /** The tool's name, as the Layer app shows it. */
1656
+ name: string;
1657
+ /** What the tool does. */
1658
+ description: string;
1659
+ /** `generate` for a tool that makes something new, `edit` for one that changes an asset. */
1660
+ group: InferenceToolGroup;
1661
+ /** The type of asset the tool makes. */
1662
+ modality: Modality;
1663
+ /** What an edit works on; null for a tool that makes something new. */
1664
+ source: InferenceToolSource | null;
1665
+ /** The base models the caller can run the tool on, in catalog order. */
1666
+ base_model_ids: Array<string>;
1667
+ /** The model a run of the tool takes when it names none: the tool's own default, else the caller's first pinned model among `base_model_ids`, else Layer's recommendation for the tool's job. */
1668
+ default_base_model_id: string;
1669
+ }
1644
1670
  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" | "image_mask" | "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";
1645
1671
  /** Delivered when an inference run reaches a terminal state. */
1646
1672
  export interface InferenceWebhookEvent {
@@ -1683,6 +1709,10 @@ export interface ListGroupsOutput {
1683
1709
  groups: Array<GroupOut>;
1684
1710
  pagination: PaginationOutput;
1685
1711
  }
1712
+ export interface ListInferenceToolsOutput {
1713
+ inference_tools: Array<InferenceToolSummary>;
1714
+ pagination: PaginationOutput;
1715
+ }
1686
1716
  export interface ListMembersOutput {
1687
1717
  members: Array<MemberOutput>;
1688
1718
  pagination: PaginationOutput;
@@ -2442,7 +2472,7 @@ export interface TileGrid {
2442
2472
  footprint_width?: number;
2443
2473
  footprint_depth?: number;
2444
2474
  height?: number;
2445
- tile_width?: number;
2475
+ tile_width?: number | null;
2446
2476
  light_from?: TileLightSide;
2447
2477
  }
2448
2478
  /** The side the key light comes from, seen from the camera. */
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.0.70";
1
+ export const VERSION = "1.0.74";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layer_ai/sdk",
3
- "version": "1.0.70",
3
+ "version": "1.0.74",
4
4
  "description": "Official JavaScript and TypeScript SDK for Layer \u2014 AI asset creation for game studios.",
5
5
  "keywords": [
6
6
  "ai",