@layer_ai/sdk 1.0.52 → 1.0.60

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.
@@ -5,8 +5,10 @@
5
5
  * Do not edit: CI regenerates this file and fails on any difference.
6
6
  */
7
7
  export interface AddGroupMemberBody {
8
- /** Id of the workspace member to add to the group. */
9
- user_id: string;
8
+ /** Principal id of the workspace member to add to the group. */
9
+ principal_id?: string | null;
10
+ /** User id of the workspace member to add to the group. Deprecated: use principal_id. */
11
+ user_id?: string | null;
10
12
  }
11
13
  export interface AddProjectMembersBody {
12
14
  /** Ids of workspace members to add. All must already be active workspace members. */
@@ -99,6 +101,8 @@ export interface BaseModelCapabilitiesREST {
99
101
  audio_segments?: boolean;
100
102
  /** Containers this model can be asked to deliver. Layer never re-encodes a clip, so an empty list means the model returns what it returns and the format cannot be promised. */
101
103
  output_formats?: Array<string>;
104
+ /** ISO 639-1 codes a `dub_video` model can speak, passed to forge as `target_language`. */
105
+ dub_languages?: Array<string>;
102
106
  /** Speaks only in a trained voice, so a generation needs a reference set holding one. Without it the provider falls back to its own default voice. */
103
107
  voice_reference_set_required?: boolean;
104
108
  rigging?: boolean;
@@ -111,6 +115,18 @@ export interface BaseModelCapabilitiesREST {
111
115
  audio_isolation?: boolean;
112
116
  audio_denoise?: boolean;
113
117
  audio_separation?: boolean;
118
+ /** Caption styles this subtitle model takes as `subtitle_preset`. */
119
+ subtitle_presets?: Array<string>;
120
+ /** The `subtitle_presets` that animate word by word; they bill at a higher rate than the rest. */
121
+ subtitle_dynamic_presets?: Array<string>;
122
+ /** Takes the caption text colour as `subtitle_color`. */
123
+ subtitle_primary_color?: boolean;
124
+ /** Takes the colour of the words it emphasises as `subtitle_secondary_color`. */
125
+ subtitle_secondary_color?: boolean;
126
+ /** Takes the captions' vertical position as `subtitle_alignment`. */
127
+ subtitle_alignment?: boolean;
128
+ /** Reads `prompt` as SRT cues to burn in verbatim and refuses any other text there; an empty prompt transcribes the video's own audio. */
129
+ subtitle_text_srt?: boolean;
114
130
  output_aspect_ratios?: Array<string>;
115
131
  output_size_envelope?: string | null;
116
132
  }
@@ -175,23 +191,45 @@ export interface BaseModelSummary {
175
191
  /** Enum representing the status of a blueprint run. */
176
192
  export type BlueprintRunStatus = "pending" | "running" | "success" | "failure" | "cancelled";
177
193
  export interface Body_exchangeToken {
178
- /** Must be `client_credentials`. */
194
+ /** `client_credentials`, `urn:ietf:params:oauth:grant-type:device_code` or `refresh_token`. */
179
195
  grant_type: string;
180
- /** The service account's id. */
196
+ /** The service account's or native client's id. */
181
197
  client_id?: string | null;
182
198
  /** One of the service account's keys. */
183
199
  client_secret?: string | null;
184
200
  /** Space-delimited scopes to narrow the token to. */
185
201
  scope?: string | null;
202
+ /** Device grant: the code the device login returned. */
203
+ device_code?: string | null;
204
+ /** Refresh grant: the refresh token to renew. */
205
+ refresh_token?: string | null;
186
206
  }
187
207
  export interface Body_revokeToken {
188
- /** The service account key to revoke. */
208
+ /** The service account key, or a native client's refresh token. */
189
209
  token: string;
190
- /** The service account's id. */
210
+ /** The service account's or native client's id. */
191
211
  client_id?: string | null;
192
212
  /** One of the service account's keys. */
193
213
  client_secret?: string | null;
194
214
  }
215
+ export interface Body_startDeviceLogin {
216
+ /** The native client's id. */
217
+ client_id?: string | null;
218
+ /** Space-delimited subset of `openid profile email offline_access`. */
219
+ scope?: string | null;
220
+ /** The API audience. Optional. */
221
+ audience?: string | null;
222
+ /** The machine's name, shown on the person's Devices page. */
223
+ device_name?: string | null;
224
+ /** The host application: `photoshop`, `figma`, `blender`, `cli`, ... */
225
+ app?: string | null;
226
+ /** The host application's version. */
227
+ app_version?: string | null;
228
+ /** The Layer plugin, add-on or CLI version. */
229
+ client_version?: string | null;
230
+ /** The operating system and its version. */
231
+ os?: string | null;
232
+ }
195
233
  export interface CameraRotationDelta {
196
234
  pitch_delta?: number | null;
197
235
  yaw_delta?: number | null;
@@ -236,10 +274,16 @@ export interface CliAuthConfiguration {
236
274
  scopes: Array<string>;
237
275
  /** Grant types this client may use, most preferred first. */
238
276
  grant_types: Array<string>;
239
- /** Ports registered as loopback callbacks. Bind the first one that is free and redirect to `http://127.0.0.1:<port>{redirect_path}`. The authorization server does not accept a port outside this list, so fall back to the device-code grant when every one is taken. */
277
+ /** Ports registered as loopback callbacks, for releases that sign in with the authorization code flow at `issuer`. A current client signs in with `device_authorization_endpoint` instead. */
240
278
  loopback_ports: Array<number>;
241
- /** Path component of the registered loopback callback URLs. */
279
+ /** Path component of the registered loopback callback URLs, for the same older releases. */
242
280
  redirect_path: string;
281
+ /** Where to start a device login (RFC 8628 section 3.1). Sign in with this, not the issuer. */
282
+ device_authorization_endpoint: string;
283
+ /** Where to poll for the device login's tokens, and to refresh them. */
284
+ token_endpoint: string;
285
+ /** Where to revoke the refresh token on sign-out. */
286
+ revocation_endpoint: string;
243
287
  }
244
288
  /**
245
289
  * Which native client is signing in.
@@ -247,7 +291,7 @@ export interface CliAuthConfiguration {
247
291
  * Each is its own Auth0 application, so Auth0 can tell them apart in its logs, metrics and
248
292
  * grants, and a client-level change to one never reaches the other.
249
293
  */
250
- export type CliClient = "cli" | "blender" | "unity";
294
+ export type CliClient = "cli" | "blender" | "unity" | "godot";
251
295
  /**
252
296
  * A track authored as an ordered list of sections rather than as one description.
253
297
  *
@@ -325,6 +369,14 @@ export interface EstimateForgePriceOutput {
325
369
  }
326
370
  /** REST request body for estimating inference price. workspace_id comes from path. */
327
371
  export interface EstimateInferencePriceRequest {
372
+ /** Caption style, spelled exactly as one of the model's `subtitle_presets`: any other name is quoted at the default style and refused at launch. Its `subtitle_dynamic_presets` animate word by word and bill at a higher rate, so pass the same preset to the estimate. Omit for the model's default style. */
373
+ subtitle_preset?: string | null;
374
+ /** Caption text colour as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
375
+ subtitle_color?: string | null;
376
+ /** Colour of the words the model emphasises, as hex, for models whose capabilities report `subtitle_secondary_color`. */
377
+ subtitle_secondary_color?: string | null;
378
+ /** Where the captions sit vertically, for models whose capabilities report `subtitle_alignment`. */
379
+ subtitle_alignment?: "top" | "center" | "bottom" | null;
328
380
  /** Model/style ID to use for generation. */
329
381
  model_id: string;
330
382
  /** Style/LoRA strength applied to the model. 1.0 = as trained; lower weakens, higher over-applies the style. Only affects LoRA/adapter-backed styles; ignored for models without a trainable adapter. */
@@ -450,9 +502,17 @@ export interface EstimateInferencePriceV2Output {
450
502
  }
451
503
  /** REST request body for estimating inference price. workspace_id comes from path. */
452
504
  export interface EstimateInferencePriceV2Request {
505
+ /** Caption style, spelled exactly as one of the model's `subtitle_presets`: any other name is quoted at the default style and refused at launch. Its `subtitle_dynamic_presets` animate word by word and bill at a higher rate, so pass the same preset to the estimate. Omit for the model's default style. */
506
+ subtitle_preset?: string | null;
507
+ /** Caption text colour as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
508
+ subtitle_color?: string | null;
509
+ /** Colour of the words the model emphasises, as hex, for models whose capabilities report `subtitle_secondary_color`. */
510
+ subtitle_secondary_color?: string | null;
511
+ /** Where the captions sit vertically, for models whose capabilities report `subtitle_alignment`. */
512
+ subtitle_alignment?: "top" | "center" | "bottom" | null;
453
513
  /** Base model to run, as an id (e.g. flux-dev), display name, or community alias. */
454
514
  base_model_id?: string | null;
455
- /** Reference sets to apply, up to 10. */
515
+ /** Reference sets to apply, up to 25. */
456
516
  reference_sets?: Array<InferenceReferenceSetInput>;
457
517
  /** Output modality: image, video, three_d, or audio. Only needed to disambiguate reference-set translation when no base_model_id is given. */
458
518
  modality?: Modality | null;
@@ -466,7 +526,7 @@ export interface EstimateInferencePriceV2Request {
466
526
  height?: number | null;
467
527
  /** Derive the output's shape from the input instead of from width/height. Only on models whose capabilities include autoAspectRatio. */
468
528
  auto_aspect_ratio?: boolean | null;
469
- /** The size tier of an auto_aspect_ratio run (e.g. '2K'), one of the model's autoResolutions. Unset, the size follows the input. */
529
+ /** The size tier of an auto_aspect_ratio run (e.g. '2K'), one of the model's autoResolutions. Unset on an image run, the smallest tier that holds the input image. */
470
530
  auto_resolution?: string | null;
471
531
  /** Number of outputs (1-16). */
472
532
  batch_size?: number;
@@ -630,6 +690,8 @@ export interface EstimateInferencePriceV2Request {
630
690
  output_fit?: OutputFit | null;
631
691
  /** Deliver the image as a 9-slice UI element (a button, frame or panel that stretches): after everything else the run does, the plain band through its middle is found on each axis, the stretched regions are cleaned so nothing smears, 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. */
632
692
  nine_slice?: boolean | null;
693
+ /** 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. */
694
+ parallax?: ParallaxSplit | null;
633
695
  /** 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. Honored by the models whose capabilities report `max_palette_colors`, which is also the most colors a run takes; others ignore it. */
634
696
  color_palette?: InferenceColorPalette | null;
635
697
  /** The expression a face edit gives the face, one of the names the model's capabilities list under `expressions`. */
@@ -707,6 +769,14 @@ export interface ExecuteForgeOutput {
707
769
  }
708
770
  /** REST request body for executing an inference. workspace_id comes from path. */
709
771
  export interface ExecuteInferenceRequest {
772
+ /** Caption style, spelled exactly as one of the model's `subtitle_presets`: any other name is quoted at the default style and refused at launch. Its `subtitle_dynamic_presets` animate word by word and bill at a higher rate, so pass the same preset to the estimate. Omit for the model's default style. */
773
+ subtitle_preset?: string | null;
774
+ /** Caption text colour as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
775
+ subtitle_color?: string | null;
776
+ /** Colour of the words the model emphasises, as hex, for models whose capabilities report `subtitle_secondary_color`. */
777
+ subtitle_secondary_color?: string | null;
778
+ /** Where the captions sit vertically, for models whose capabilities report `subtitle_alignment`. */
779
+ subtitle_alignment?: "top" | "center" | "bottom" | null;
710
780
  /** Model/style ID to use for generation. */
711
781
  model_id: string;
712
782
  /** Style/LoRA strength applied to the model. 1.0 = as trained; lower weakens, higher over-applies the style. Only affects LoRA/adapter-backed styles; ignored for models without a trainable adapter. */
@@ -842,9 +912,17 @@ export interface ExecuteInferenceV2Output {
842
912
  }
843
913
  /** REST request body for executing an inference. workspace_id comes from path. */
844
914
  export interface ExecuteInferenceV2Request {
915
+ /** Caption style, spelled exactly as one of the model's `subtitle_presets`: any other name is quoted at the default style and refused at launch. Its `subtitle_dynamic_presets` animate word by word and bill at a higher rate, so pass the same preset to the estimate. Omit for the model's default style. */
916
+ subtitle_preset?: string | null;
917
+ /** Caption text colour as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
918
+ subtitle_color?: string | null;
919
+ /** Colour of the words the model emphasises, as hex, for models whose capabilities report `subtitle_secondary_color`. */
920
+ subtitle_secondary_color?: string | null;
921
+ /** Where the captions sit vertically, for models whose capabilities report `subtitle_alignment`. */
922
+ subtitle_alignment?: "top" | "center" | "bottom" | null;
845
923
  /** Base model to run, as an id (e.g. flux-dev), display name, or community alias. */
846
924
  base_model_id?: string | null;
847
- /** Reference sets to apply, up to 10. */
925
+ /** Reference sets to apply, up to 25. */
848
926
  reference_sets?: Array<InferenceReferenceSetInput>;
849
927
  /** Output modality: image, video, three_d, or audio. Only needed to disambiguate reference-set translation when no base_model_id is given. */
850
928
  modality?: Modality | null;
@@ -858,7 +936,7 @@ export interface ExecuteInferenceV2Request {
858
936
  height?: number | null;
859
937
  /** Derive the output's shape from the input instead of from width/height. Only on models whose capabilities include autoAspectRatio. */
860
938
  auto_aspect_ratio?: boolean | null;
861
- /** The size tier of an auto_aspect_ratio run (e.g. '2K'), one of the model's autoResolutions. Unset, the size follows the input. */
939
+ /** The size tier of an auto_aspect_ratio run (e.g. '2K'), one of the model's autoResolutions. Unset on an image run, the smallest tier that holds the input image. */
862
940
  auto_resolution?: string | null;
863
941
  /** Number of outputs (1-16). */
864
942
  batch_size?: number;
@@ -1022,6 +1100,8 @@ export interface ExecuteInferenceV2Request {
1022
1100
  output_fit?: OutputFit | null;
1023
1101
  /** Deliver the image as a 9-slice UI element (a button, frame or panel that stretches): after everything else the run does, the plain band through its middle is found on each axis, the stretched regions are cleaned so nothing smears, 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. */
1024
1102
  nine_slice?: boolean | null;
1103
+ /** 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. */
1104
+ parallax?: ParallaxSplit | null;
1025
1105
  /** 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. Honored by the models whose capabilities report `max_palette_colors`, which is also the most colors a run takes; others ignore it. */
1026
1106
  color_palette?: InferenceColorPalette | null;
1027
1107
  /** The expression a face edit gives the face, one of the names the model's capabilities list under `expressions`. */
@@ -1116,8 +1196,10 @@ export interface ForgeGuidanceFileInput {
1116
1196
  type: GuidanceFileType;
1117
1197
  /** Influence weight (0-1). Defaults to 0.5 for init, 1 for others. */
1118
1198
  weight?: number | null;
1119
- /** For a model whose capabilities list init_image_views: the view this init image shows. Untagged init images fill the remaining views in order. A front view is required whenever more than one view is given. */
1199
+ /** For a model whose capabilities list init_image_views: the view this init image shows. Untagged init images fill the remaining views in order. Every set needs a front view, even a single image. */
1120
1200
  view?: MultiViewSlot | null;
1201
+ /** On the init image or a reference image: numbered marks saying what to change where, or what to use from a reference. Each item is a `BOX`, `ELLIPSE`, `ARROW`, `FREEHAND` path or `PIN`, placed with points from (0, 0) at the top left to (1, 1) at the bottom right of the image after any crop or rotation, with an `intent` (`EDIT`, `REMOVE`, or `MOVE` for an arrow whose `source_id` names the box or ellipse it moves) and a `note` saying what to do there. Models whose capabilities report `visual_annotations` `RENDERED` read them from a copy of each marked image with the marks drawn on; `NATIVE_BOXES` models take boxes and arrows moving a box, on the init image only. Other models ignore them. Leave `color` unset to have it chosen against the image. */
1202
+ annotations?: ImageAnnotations | null;
1121
1203
  }
1122
1204
  export interface ForgeMaskInput {
1123
1205
  /** Mask image file ID. */
@@ -1212,8 +1294,10 @@ export interface GetInferenceRunV2Output {
1212
1294
  actual_price_creative_units?: number | null;
1213
1295
  /** Error message. Present only on FAILED. */
1214
1296
  error?: string | null;
1215
- /** Machine-readable error code. Present only on FAILED. Balance-related values: `INSUFFICIENT_BALANCE` (the workspace ran out of Creative Units — top up and resubmit), `BALANCE_UNAVAILABLE` (the balance could not be verified, retry later) and `USAGE_LIMIT_EXCEEDED` (the member is past their usage limit: ask a workspace admin for more, or wait for it to reset). */
1297
+ /** Machine-readable error code. Present only on FAILED. Balance-related values: `INSUFFICIENT_BALANCE` (the workspace ran out of Creative Units — top up and resubmit), `BALANCE_UNAVAILABLE` (the balance could not be verified, retry later) and `USAGE_LIMIT_EXCEEDED` (the member is past their usage limit: ask a workspace admin for more, or wait for it to reset). Refusal values, each also described by `refusal`: `INPUT_GUARDRAIL_VIOLATION`, `CONTENT_POLICY_VIOLATION`, `PROMPT_INTELLECTUAL_PROPERTY` and `NO_MEDIA_GENERATED`. */
1216
1298
  error_code?: string | null;
1299
+ /** Who refused the generation and why, when it failed because a guardrail or the provider refused it. Null on every other outcome. Resubmitting the same inputs is refused the same way. */
1300
+ refusal?: RunRefusal | null;
1217
1301
  /** Base model the run used, resolved or auto-picked. */
1218
1302
  base_model_id?: string | null;
1219
1303
  /** Per-set summary of what each reference set contributed. */
@@ -1313,8 +1397,10 @@ export interface GetWorkflowRunOutput {
1313
1397
  outputs?: Array<WorkflowRunAsset> | null;
1314
1398
  /** Error message. Present only on FAILURE. */
1315
1399
  error?: string | null;
1316
- /** Machine-readable error code. Present only on FAILURE. Balance-related values: `BlueprintInsufficientBalanceError` (the workspace ran out of Creative Units — top up and resubmit), `BlueprintBalanceUnavailableError` (the balance could not be verified, retry later) and `BlueprintUsageLimitExceededError` (the member who started the run is past their usage limit: ask a workspace admin for more, or wait for it to reset). */
1400
+ /** Machine-readable error code. Present only on FAILURE. Balance-related values: `BlueprintInsufficientBalanceError` (the workspace ran out of Creative Units — top up and resubmit), `BlueprintBalanceUnavailableError` (the balance could not be verified, retry later) and `BlueprintUsageLimitExceededError` (the member who started the run is past their usage limit: ask a workspace admin for more, or wait for it to reset). A run stopped by a refused generation reports `BlueprintInvalidRuntimeValueError`; `refusals` says who refused it and why. */
1317
1401
  error_code?: string | null;
1402
+ /** Every generation this run started that a guardrail or the provider refused, oldest first. Present only on FAILURE, and empty when no generation was refused. */
1403
+ refusals?: Array<RunRefusal>;
1318
1404
  /** The callback attached to this run and how its delivery has gone. Null when the run was submitted without one. */
1319
1405
  webhook?: WebhookStatusView | null;
1320
1406
  }
@@ -1329,7 +1415,9 @@ export interface GetWorkflowRunStep {
1329
1415
  error_code?: string | null;
1330
1416
  }
1331
1417
  export interface GroupMemberOut {
1332
- /** The member's user id. */
1418
+ /** The member's principal id: for a person, the same as their user id. */
1419
+ principal_id: string;
1420
+ /** The member's user id. Deprecated: use principal_id. */
1333
1421
  user_id: string;
1334
1422
  /** The member's email address. */
1335
1423
  email: string;
@@ -1349,6 +1437,8 @@ export interface GroupOut {
1349
1437
  /** Id of the role actually assigned. A custom role reports its own id here while `role` reports the builtin floor it grants, so read this to tell the two apart. */
1350
1438
  role_id?: string | null;
1351
1439
  }
1440
+ /** What kind of guardrail refused it: one of the guardrails Layer ships, or the workspace's own. */
1441
+ export type GuardrailCategory = "copyright_infringement" | "ip_trademark_infringement" | "artist_style_mimicry" | "custom";
1352
1442
  /**
1353
1443
  * What a guidance file *is*.
1354
1444
  *
@@ -1360,6 +1450,34 @@ export type GuidanceFileType = "init_image" | "reference_image" | "scribble" | "
1360
1450
  export interface HTTPValidationError {
1361
1451
  detail?: Array<ValidationError>;
1362
1452
  }
1453
+ /** One mark. Its number, on the image and in the legend, is its position in the list plus one. */
1454
+ export interface ImageAnnotation {
1455
+ id: string;
1456
+ kind: ImageAnnotationKind;
1457
+ intent?: ImageAnnotationIntent;
1458
+ points: Array<ImageAnnotationPoint>;
1459
+ note?: string | null;
1460
+ color?: string | null;
1461
+ source_id?: string | null;
1462
+ }
1463
+ export type ImageAnnotationIntent = "EDIT" | "REMOVE" | "MOVE";
1464
+ export type ImageAnnotationKind = "BOX" | "ELLIPSE" | "ARROW" | "FREEHAND" | "PIN";
1465
+ /**
1466
+ * A point on the image, from (0, 0) at the top left to (1, 1) at the bottom right.
1467
+ *
1468
+ * The image is the one the slot sends, before the model fits it: the file as stored (or, for a
1469
+ * video or a 3D model, the frame taken from it, ``video_to_image`` / ``mesh_to_image``) after its
1470
+ * flip, scale, rotation and crop. Marks are the last edit on it.
1471
+ */
1472
+ export interface ImageAnnotationPoint {
1473
+ x: number;
1474
+ y: number;
1475
+ }
1476
+ /** The marks drawn on one image, in the order they are numbered. */
1477
+ export interface ImageAnnotations {
1478
+ items?: Array<ImageAnnotation>;
1479
+ color?: string | null;
1480
+ }
1363
1481
  /** The geometry an output image is drawn in, when it is not an ordinary flat picture. */
1364
1482
  export type ImageProjection = "EQUIRECTANGULAR";
1365
1483
  /**
@@ -1396,8 +1514,17 @@ export interface InferenceWebhookEvent {
1396
1514
  export interface InviteMemberBody {
1397
1515
  /** Email of the person to invite. A Layer user is created if none exists. */
1398
1516
  email: string;
1399
- /** Workspace role to grant. Defaults to member. */
1400
- role?: Role;
1517
+ /** Workspace role to grant: admin or creator, plus member in an enterprise workspace. Defaults to creator, or member in an enterprise workspace. */
1518
+ role?: Role | null;
1519
+ }
1520
+ /** The device authorization response (RFC 8628 section 3.2). */
1521
+ export interface IssuedDeviceCode {
1522
+ device_code: string;
1523
+ user_code: string;
1524
+ verification_uri: string;
1525
+ verification_uri_complete: string;
1526
+ expires_in: number;
1527
+ interval: number;
1401
1528
  }
1402
1529
  export type LibraryObjectType = "directory" | "file" | "asset" | "style" | "blueprint" | "skill";
1403
1530
  export interface ListBaseModelsOutput {
@@ -1456,7 +1583,9 @@ export interface ListWorkspacesOutput {
1456
1583
  export interface MemberOutput {
1457
1584
  /** The workspace membership's unique identifier. */
1458
1585
  membership_id: string;
1459
- /** The member's user id. */
1586
+ /** The member's principal id: for a person, the same as their user id. */
1587
+ principal_id: string;
1588
+ /** The member's user id. Deprecated: use principal_id. */
1460
1589
  user_id: string;
1461
1590
  /** The member's email address. */
1462
1591
  email: string;
@@ -1513,6 +1642,14 @@ export interface ModelCapabilitiesREST {
1513
1642
  audio_inpaint?: boolean;
1514
1643
  audio_outpaint?: boolean;
1515
1644
  audio_denoise?: boolean;
1645
+ /** Caption styles this subtitle model takes as subtitle_preset. */
1646
+ subtitle_presets?: Array<string>;
1647
+ /** The subtitle_presets that animate word by word; they bill at a higher rate than the rest. */
1648
+ subtitle_dynamic_presets?: Array<string>;
1649
+ subtitle_primary_color?: boolean;
1650
+ subtitle_secondary_color?: boolean;
1651
+ subtitle_alignment?: boolean;
1652
+ subtitle_text_srt?: boolean;
1516
1653
  }
1517
1654
  export interface ModelDetailREST {
1518
1655
  model_id: string;
@@ -1667,6 +1804,11 @@ export interface PaletteColor {
1667
1804
  hex: string;
1668
1805
  role?: string | null;
1669
1806
  }
1807
+ export interface ParallaxSplit {
1808
+ layers?: number;
1809
+ cuts?: Array<number> | null;
1810
+ loop?: boolean;
1811
+ }
1670
1812
  /**
1671
1813
  * Canonical rest pose a character-mesh model is asked to generate in.
1672
1814
  * ``A_POSE`` places the arms angled down at roughly 45°; ``T_POSE`` holds them
@@ -1695,7 +1837,9 @@ export interface ProjectDetail {
1695
1837
  instructions?: string | null;
1696
1838
  }
1697
1839
  export interface ProjectMember {
1698
- /** The member's user id. */
1840
+ /** The member's principal id: for a person, the same as their user id. */
1841
+ principal_id: string;
1842
+ /** The member's user id. Deprecated: use principal_id. */
1699
1843
  user_id: string;
1700
1844
  }
1701
1845
  export interface ProjectMembersOutput {
@@ -1750,6 +1894,18 @@ export interface ReferenceSetSummary {
1750
1894
  /** True when the set has a trained custom model. */
1751
1895
  has_active_finetune: boolean;
1752
1896
  }
1897
+ /** The error code a refused generation fails with. */
1898
+ export type RefusalCode = "INPUT_GUARDRAIL_VIOLATION" | "CONTENT_POLICY_VIOLATION" | "PROMPT_INTELLECTUAL_PROPERTY" | "NO_MEDIA_GENERATED";
1899
+ export interface RefusalGuardrail {
1900
+ /** ID of the guardrail rule that blocked the generation. */
1901
+ guardrail_id: string;
1902
+ /** The rule's name as it read when it judged the request. */
1903
+ name: string;
1904
+ /** `copyright_infringement`, `ip_trademark_infringement` or `artist_style_mimicry` for the guardrails Layer ships, `custom` for a rule the workspace wrote itself. */
1905
+ category: GuardrailCategory;
1906
+ /** Why the rule judged the request a violation. May be empty. */
1907
+ reason: string;
1908
+ }
1753
1909
  export interface RequestUploadUrlRequest {
1754
1910
  /** MIME type of the file to upload. */
1755
1911
  content_type: string;
@@ -1770,13 +1926,21 @@ export interface RequestUploadUrlResponse {
1770
1926
  /** Source type the file was created with, echoed from the request. */
1771
1927
  source_type?: FileSourceType | null;
1772
1928
  }
1773
- export type Role = "admin" | "editor" | "settings_admin" | "art_director" | "artist" | "member" | "installation" | "provisioning";
1929
+ export type Role = "admin" | "editor" | "settings_admin" | "art_director" | "artist" | "creator" | "member" | "installation" | "provisioning";
1774
1930
  export interface RotateWebhookSecretResponse {
1775
1931
  /** The new signing secret. Start verifying with it. */
1776
1932
  secret: string;
1777
1933
  /** When the previous secret stops signing. Until then both secrets sign every delivery, so a receiver can be updated without dropping anything. */
1778
1934
  previous_secret_expires_at: string;
1779
1935
  }
1936
+ export interface RunRefusal {
1937
+ /** The generation that was refused. */
1938
+ inference_id: string;
1939
+ /** Machine-readable refusal code: `INPUT_GUARDRAIL_VIOLATION` (a guardrail the workspace or project set blocked it, and nothing reached the provider), `CONTENT_POLICY_VIOLATION` (the provider's content policy), `PROMPT_INTELLECTUAL_PROPERTY` (the provider refused protected IP) or `NO_MEDIA_GENERATED` (the provider returned no output and no reason, usually a silent refusal of the prompt). */
1940
+ code: RefusalCode;
1941
+ /** Every guardrail that blocked the generation. Empty unless `code` is `INPUT_GUARDRAIL_VIOLATION`. */
1942
+ guardrails?: Array<RefusalGuardrail>;
1943
+ }
1780
1944
  /** An array of orbiting light sources to populate the graphics engine environment. */
1781
1945
  export interface SceneLightingConfig {
1782
1946
  lights?: Array<OrbitLight>;
@@ -2102,14 +2266,16 @@ export interface TilePointView {
2102
2266
  /** The outline of one cell of the grid, seen from straight above. */
2103
2267
  export type TileShape = "SQUARE" | "HEXAGON";
2104
2268
  export interface TokenResponse {
2105
- /** A signed JWT access token (RFC 9068), sent as `Authorization: Bearer <token>`. Treat it as opaque. */
2269
+ /** A signed JWT access token, sent as `Authorization: Bearer <token>`. Treat it as opaque. */
2106
2270
  access_token: string;
2107
2271
  /** Always `Bearer`. */
2108
2272
  token_type: string;
2109
2273
  /** Seconds until the token expires. */
2110
2274
  expires_in: number;
2111
2275
  /** The space-delimited scopes the token carries. */
2112
- scope: string;
2276
+ scope?: string | null;
2277
+ /** Device and refresh grants only: the refresh token, replaced on every refresh. */
2278
+ refresh_token?: string | null;
2113
2279
  }
2114
2280
  export interface ToolGuidanceFileTypeSupport {
2115
2281
  /** Guidance file type, such as init_image, reference_image, first_frame, pose, or depth. */
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.0.52";
1
+ export const VERSION = "1.0.60";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layer_ai/sdk",
3
- "version": "1.0.52",
3
+ "version": "1.0.60",
4
4
  "description": "Official JavaScript and TypeScript SDK for Layer \u2014 AI asset creation for game studios.",
5
5
  "keywords": [
6
6
  "ai",