@layer_ai/sdk 1.0.37 → 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.
@@ -46,6 +46,8 @@ export interface BaseModelCapabilitiesREST {
46
46
  session_modes?: Array<string>;
47
47
  text_prompt?: boolean;
48
48
  text_prompt_required?: boolean;
49
+ /** Longest prompt, in characters, the model accepts; null when unbounded. */
50
+ max_prompt_chars?: number | null;
49
51
  negative_prompt?: boolean;
50
52
  seed?: boolean;
51
53
  inpainting?: boolean;
@@ -53,6 +55,8 @@ export interface BaseModelCapabilitiesREST {
53
55
  tileability?: boolean;
54
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. */
55
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;
56
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. */
57
61
  guidance_file_types?: Array<ToolGuidanceFileTypeSupport>;
58
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. */
@@ -170,6 +174,24 @@ export interface BaseModelSummary {
170
174
  }
171
175
  /** Enum representing the status of a blueprint run. */
172
176
  export type BlueprintRunStatus = "pending" | "running" | "success" | "failure" | "cancelled";
177
+ export interface Body_exchangeToken {
178
+ /** Must be `client_credentials`. */
179
+ grant_type: string;
180
+ /** The service account's id. */
181
+ client_id?: string | null;
182
+ /** One of the service account's keys. */
183
+ client_secret?: string | null;
184
+ /** Space-delimited scopes to narrow the token to. */
185
+ scope?: string | null;
186
+ }
187
+ export interface Body_revokeToken {
188
+ /** The service account key to revoke. */
189
+ token: string;
190
+ /** The service account's id. */
191
+ client_id?: string | null;
192
+ /** One of the service account's keys. */
193
+ client_secret?: string | null;
194
+ }
173
195
  export interface CameraRotationDelta {
174
196
  pitch_delta?: number | null;
175
197
  yaw_delta?: number | null;
@@ -389,6 +411,10 @@ export interface EstimateInferencePriceRequest {
389
411
  reframe?: boolean | null;
390
412
  /** Outpaint/refill transparent areas. */
391
413
  refill?: boolean | null;
414
+ /** 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. */
415
+ guidance_files?: Array<ForgeGuidanceFileInput>;
416
+ /** The mask the execute call will pass. Some models bill a masked edit at a different rate. */
417
+ mask?: ForgeMaskInput | null;
392
418
  }
393
419
  export interface EstimateInferencePriceV2Output {
394
420
  /** Total estimated Creative Units price for this run. */
@@ -562,6 +588,10 @@ export interface EstimateInferencePriceV2Request {
562
588
  reframe?: boolean | null;
563
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. */
564
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;
565
595
  /** Outpaint/refill transparent areas. */
566
596
  refill?: boolean | null;
567
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. */
@@ -570,6 +600,10 @@ export interface EstimateInferencePriceV2Request {
570
600
  camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
571
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`. */
572
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;
573
607
  /** The expression a face edit gives the face, one of the names the model's capabilities list under `expressions`. */
574
608
  expression?: string | null;
575
609
  /** The language a dub speaks, as one of the ISO 639-1 codes the model's capabilities list under `dub_languages`. */
@@ -582,6 +616,8 @@ export interface EstimateInferencePriceV2Request {
582
616
  video_section?: VideoSection | null;
583
617
  /** Reference images/files to guide generation. */
584
618
  guidance_files?: Array<ForgeGuidanceFileInput>;
619
+ /** The mask the execute call will pass. Some models bill a masked edit at a different rate. */
620
+ mask?: ForgeMaskInput | null;
585
621
  }
586
622
  export interface EstimateTrainingPriceRequest {
587
623
  /** The reference set to price training for. */
@@ -916,6 +952,10 @@ export interface ExecuteInferenceV2Request {
916
952
  reframe?: boolean | null;
917
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. */
918
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;
919
959
  /** Outpaint/refill transparent areas. */
920
960
  refill?: boolean | null;
921
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. */
@@ -924,6 +964,10 @@ export interface ExecuteInferenceV2Request {
924
964
  camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
925
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`. */
926
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;
927
971
  /** The expression a face edit gives the face, one of the names the model's capabilities list under `expressions`. */
928
972
  expression?: string | null;
929
973
  /** The language a dub speaks, as one of the ISO 639-1 codes the model's capabilities list under `dub_languages`. */
@@ -1013,7 +1057,7 @@ export interface ForgeGuidanceFileInput {
1013
1057
  export interface ForgeMaskInput {
1014
1058
  /** Mask image file ID. */
1015
1059
  file_id?: string | null;
1016
- /** 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. */
1017
1061
  for_transparency?: boolean | null;
1018
1062
  /** Use non-transparent areas as mask. */
1019
1063
  for_nontransparency?: boolean | null;
@@ -1249,6 +1293,8 @@ export type GuidanceFileType = "init_image" | "reference_image" | "scribble" | "
1249
1293
  export interface HTTPValidationError {
1250
1294
  detail?: Array<ValidationError>;
1251
1295
  }
1296
+ /** The geometry an output image is drawn in, when it is not an ordinary flat picture. */
1297
+ export type ImageProjection = "EQUIRECTANGULAR";
1252
1298
  export interface InferenceReferenceSetInput {
1253
1299
  /** Reference set ID from GET /v2/workspaces/{workspace_id}/reference-sets. */
1254
1300
  set_id: string;
@@ -1256,7 +1302,7 @@ export interface InferenceReferenceSetInput {
1256
1302
  weight?: number;
1257
1303
  }
1258
1304
  export type InferenceStatus = "in_progress" | "complete" | "failed" | "cancelled" | "deleted";
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";
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";
1260
1306
  /** Delivered when an inference run reaches a terminal state. */
1261
1307
  export interface InferenceWebhookEvent {
1262
1308
  /** Unique event id, repeated in the webhook-id header. */
@@ -1351,6 +1397,8 @@ export interface ModelCapabilitiesREST {
1351
1397
  session_modes?: Array<string>;
1352
1398
  text_prompt?: boolean;
1353
1399
  text_prompt_required?: boolean;
1400
+ /** Longest prompt, in characters, the model accepts; null when unbounded. */
1401
+ max_prompt_chars?: number | null;
1354
1402
  negative_prompt?: boolean;
1355
1403
  seed?: boolean;
1356
1404
  inpainting?: boolean;
@@ -1484,6 +1532,25 @@ export interface OrbitLightRotation {
1484
1532
  pitch: number;
1485
1533
  yaw: number;
1486
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";
1487
1554
  export interface PaginationOutput {
1488
1555
  /** Cursor to use to get the next page */
1489
1556
  next_cursor?: string | null;
@@ -1595,7 +1662,7 @@ export interface RequestUploadUrlResponse {
1595
1662
  /** Source type the file was created with, echoed from the request. */
1596
1663
  source_type?: FileSourceType | null;
1597
1664
  }
1598
- export type Role = "admin" | "editor" | "settings_admin" | "art_director" | "artist" | "member";
1665
+ export type Role = "admin" | "editor" | "settings_admin" | "art_director" | "artist" | "member" | "installation" | "provisioning";
1599
1666
  export interface RotateWebhookSecretResponse {
1600
1667
  /** The new signing secret. Start verifying with it. */
1601
1668
  secret: string;
@@ -1789,6 +1856,49 @@ export interface StartTrainingResponse {
1789
1856
  */
1790
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";
1791
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";
1892
+ export interface TokenResponse {
1893
+ /** A signed JWT access token (RFC 9068), sent as `Authorization: Bearer <token>`. Treat it as opaque. */
1894
+ access_token: string;
1895
+ /** Always `Bearer`. */
1896
+ token_type: string;
1897
+ /** Seconds until the token expires. */
1898
+ expires_in: number;
1899
+ /** The space-delimited scopes the token carries. */
1900
+ scope: string;
1901
+ }
1792
1902
  export interface ToolGuidanceFileTypeSupport {
1793
1903
  /** Guidance file type, such as init_image, reference_image, first_frame, pose, or depth. */
1794
1904
  type: string;
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.0.37";
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.37",
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",