@layer_ai/sdk 1.0.7 → 1.0.13

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.
@@ -34,6 +34,8 @@ export interface BaseModelCapabilitiesREST {
34
34
  tileability?: boolean;
35
35
  /** 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. */
36
36
  guidance_file_types?: Array<ToolGuidanceFileTypeSupport>;
37
+ /** 3D models that read their init_image files by view: the views a source can fill. Tag each init_image with the view it shows (`view` on the guidance file); the model reads each file as the view it is tagged with, so a wrong tag warps the mesh. Empty when the model takes its views unordered. */
38
+ init_image_views?: Array<string>;
37
39
  /** Supported video durations in seconds */
38
40
  duration_seconds?: Array<number>;
39
41
  /** Audio models: shortest clip this model generates, in seconds. */
@@ -62,6 +64,8 @@ export interface BaseModelCapabilitiesREST {
62
64
  instrumental?: boolean;
63
65
  /** Composes the clip to repeat with no audible seam when the `loop` parameter is set. */
64
66
  loop?: boolean;
67
+ /** Takes the track as an ordered list of sections, each with its own length, styles and sung lines, via the `composition_plan` parameter. A plan supersedes `prompt`, `duration_seconds` and `instrumental`, which are dropped rather than sent with it. */
68
+ composition_plan?: boolean;
65
69
  audio_inpaint?: boolean;
66
70
  audio_outpaint?: boolean;
67
71
  /** Scores a video stretch by stretch from a contiguous list of per-stretch briefs. */
@@ -71,6 +75,7 @@ export interface BaseModelCapabilitiesREST {
71
75
  /** 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. */
72
76
  voice_reference_set_required?: boolean;
73
77
  camera_transform?: boolean;
78
+ camera_trajectory?: boolean;
74
79
  voice_changer?: boolean;
75
80
  audio_isolation?: boolean;
76
81
  audio_denoise?: boolean;
@@ -103,6 +108,8 @@ export interface BaseModelDetail {
103
108
  aliases?: Array<string>;
104
109
  /** image, video, three_d, or audio. */
105
110
  modality: Modality;
111
+ /** Slug of the organization behind the model, e.g. openai or bfl, when known. */
112
+ provider?: string | null;
106
113
  /** Short description. */
107
114
  description?: string | null;
108
115
  /** CU cost per measurement unit. */
@@ -123,6 +130,8 @@ export interface BaseModelSummary {
123
130
  aliases?: Array<string>;
124
131
  /** image, video, three_d, or audio. */
125
132
  modality: Modality;
133
+ /** Slug of the organization behind the model, e.g. openai or bfl, when known. */
134
+ provider?: string | null;
126
135
  /** Short description. */
127
136
  description?: string | null;
128
137
  /** CU cost per measurement unit. */
@@ -134,6 +143,27 @@ export interface BaseModelSummary {
134
143
  }
135
144
  /** Enum representing the status of a blueprint run. */
136
145
  export type BlueprintRunStatus = "pending" | "running" | "success" | "failure" | "cancelled";
146
+ export interface CameraRotationDelta {
147
+ pitch_delta?: number | null;
148
+ yaw_delta?: number | null;
149
+ roll_delta?: number | null;
150
+ }
151
+ /** One orbit-camera pose at a normalized point in a generated clip. */
152
+ export interface CameraTrajectoryKeyframe {
153
+ time: number;
154
+ azimuth: number;
155
+ elevation: number;
156
+ distance: number;
157
+ }
158
+ /** Relative adjustments to apply to an existing origin-locked orbit camera state. */
159
+ export interface CameraTransformDelta {
160
+ distance_delta?: number | null;
161
+ rotation_delta?: CameraRotationDelta | null;
162
+ zoom_delta?: CameraZoomDelta | null;
163
+ }
164
+ export interface CameraZoomDelta {
165
+ fov_y_delta?: number | null;
166
+ }
137
167
  export interface CancelTrainingRunResponse {
138
168
  training_run_id: string;
139
169
  state: "in_progress" | "terminal_success" | "terminal_failure";
@@ -162,6 +192,30 @@ export interface CliAuthConfiguration {
162
192
  /** Path component of the registered loopback callback URLs. */
163
193
  redirect_path: string;
164
194
  }
195
+ /**
196
+ * Which native client is signing in.
197
+ *
198
+ * Each is its own Auth0 application, so Auth0 can tell them apart in its logs, metrics and
199
+ * grants, and a client-level change to one never reaches the other.
200
+ */
201
+ export type CliClient = "cli" | "blender";
202
+ /**
203
+ * A track authored as an ordered list of sections rather than as one description.
204
+ *
205
+ * The split is load-bearing: the plan's own styles carry what must hold for the whole
206
+ * track, genre, era, production character, palette, and each section carries only what
207
+ * changes. Reversing it produces a track that either drifts or never moves.
208
+ *
209
+ * A plan replaces the prompt rather than supplementing it. Providers taking a plan ignore
210
+ * the prompt, the requested length and the vocal-free flag, because the plan already
211
+ * states all three.
212
+ */
213
+ export interface CompositionPlan {
214
+ positive_styles?: Array<string>;
215
+ negative_styles?: Array<string>;
216
+ sections: Array<MusicSection>;
217
+ respect_section_durations?: boolean;
218
+ }
165
219
  export interface CreateGroupBody {
166
220
  /** The group's name. Must be unique within the workspace. */
167
221
  name: string;
@@ -200,6 +254,10 @@ export interface CreateReferenceSetResponse {
200
254
  /** Files from file_ids that were not included, each with the reason. */
201
255
  skipped?: Array<SkippedFile>;
202
256
  }
257
+ export interface CreateSessionBody {
258
+ /** The session's display name. */
259
+ name: string;
260
+ }
203
261
  export interface DailyUsage {
204
262
  /** Calendar day (UTC), ISO format YYYY-MM-DD. */
205
263
  date: string;
@@ -254,6 +312,8 @@ export interface EstimateInferencePriceRequest {
254
312
  output_format?: AudioOutputFormat | null;
255
313
  /** Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself. */
256
314
  lyrics?: string | null;
315
+ /** The track as an ordered list of sections, for models whose capabilities report composition_plan. Supersedes prompt, duration_seconds and instrumental, which are dropped rather than sent with it. */
316
+ composition_plan?: CompositionPlan | null;
257
317
  /** FPS for LTX video generation (e.g. 25 or 50). */
258
318
  fps?: number | null;
259
319
  /** Video effects to apply. */
@@ -365,6 +425,8 @@ export interface EstimateInferencePriceV2Request {
365
425
  output_format?: AudioOutputFormat | null;
366
426
  /** Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself. */
367
427
  lyrics?: string | null;
428
+ /** The track as an ordered list of sections, for models whose capabilities report composition_plan. Supersedes prompt, duration_seconds and instrumental, which are dropped rather than sent with it. */
429
+ composition_plan?: CompositionPlan | null;
368
430
  /** FPS for LTX video generation (e.g. 25 or 50). */
369
431
  fps?: number | null;
370
432
  /** Video effects to apply. */
@@ -411,8 +473,14 @@ export interface EstimateInferencePriceV2Request {
411
473
  transparency?: boolean | null;
412
474
  /** Reframe/extend the image. */
413
475
  reframe?: boolean | null;
476
+ /** 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. */
477
+ tileability?: boolean | null;
414
478
  /** Outpaint/refill transparent areas. */
415
479
  refill?: boolean | null;
480
+ /** 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. */
481
+ camera_transform?: CameraTransformDelta | null;
482
+ /** A camera path for an image-to-video run: 2 to 12 keyframes, each an orbit pose (`azimuth` and `elevation` in degrees, `distance` where 1 is the source image's framing) at a `time` from 0 (first frame) to 1 (last). Honored by the models whose capabilities report `camera_trajectory`. */
483
+ camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
416
484
  /** Reference images/files to guide generation. */
417
485
  guidance_files?: Array<ForgeGuidanceFileInput>;
418
486
  }
@@ -512,6 +580,8 @@ export interface ExecuteInferenceRequest {
512
580
  output_format?: AudioOutputFormat | null;
513
581
  /** Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself. */
514
582
  lyrics?: string | null;
583
+ /** The track as an ordered list of sections, for models whose capabilities report composition_plan. Supersedes prompt, duration_seconds and instrumental, which are dropped rather than sent with it. */
584
+ composition_plan?: CompositionPlan | null;
515
585
  /** FPS for LTX video generation (e.g. 25 or 50). */
516
586
  fps?: number | null;
517
587
  /** Video effects to apply. */
@@ -637,6 +707,8 @@ export interface ExecuteInferenceV2Request {
637
707
  output_format?: AudioOutputFormat | null;
638
708
  /** Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself. */
639
709
  lyrics?: string | null;
710
+ /** The track as an ordered list of sections, for models whose capabilities report composition_plan. Supersedes prompt, duration_seconds and instrumental, which are dropped rather than sent with it. */
711
+ composition_plan?: CompositionPlan | null;
640
712
  /** FPS for LTX video generation (e.g. 25 or 50). */
641
713
  fps?: number | null;
642
714
  /** Video effects to apply. */
@@ -683,16 +755,24 @@ export interface ExecuteInferenceV2Request {
683
755
  transparency?: boolean | null;
684
756
  /** Reframe/extend the image. */
685
757
  reframe?: boolean | null;
758
+ /** 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. */
759
+ tileability?: boolean | null;
686
760
  /** Outpaint/refill transparent areas. */
687
761
  refill?: boolean | null;
762
+ /** 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. */
763
+ camera_transform?: CameraTransformDelta | null;
764
+ /** A camera path for an image-to-video run: 2 to 12 keyframes, each an orbit pose (`azimuth` and `elevation` in degrees, `distance` where 1 is the source image's framing) at a `time` from 0 (first frame) to 1 (last). Honored by the models whose capabilities report `camera_trajectory`. */
765
+ camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
688
766
  /** Reference images/files to guide generation. */
689
767
  guidance_files?: Array<ForgeGuidanceFileInput>;
690
768
  /** Random seed. -1 for random. */
691
769
  seed?: number;
692
770
  /** Mask for inpainting/outpainting. */
693
771
  mask?: ForgeMaskInput | null;
694
- /** Session name. */
772
+ /** Organize this run under the most recent active session with this name, creating one if none matches. Ignored when `session_id` is given. */
695
773
  session_name?: string | null;
774
+ /** Organize this run under this session, from GET /v2/workspaces/{workspace_id}/sessions. Takes precedence over `session_name`, and must belong to this workspace. */
775
+ session_id?: string | null;
696
776
  /** Deliver this run's terminal events to a URL instead of polling for them. See the Webhooks section of this document for the payload, headers and retry behaviour. */
697
777
  webhook?: WebhookInput | null;
698
778
  }
@@ -756,6 +836,8 @@ export interface ForgeGuidanceFileInput {
756
836
  type: GuidanceFileType;
757
837
  /** Influence weight (0-1). Defaults to 0.5 for init, 1 for others. */
758
838
  weight?: number | null;
839
+ /** 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. */
840
+ view?: MultiViewSlot | null;
759
841
  }
760
842
  export interface ForgeMaskInput {
761
843
  /** Mask image file ID. */
@@ -780,6 +862,8 @@ export interface ForgeReferenceSetContribution {
780
862
  mapped_asset_count?: number;
781
863
  /** True when the set fell back to prompt-only representation. */
782
864
  prompt_fallback_applied?: boolean;
865
+ /** True when the set's auto prompt addition was appended to the prompt. Informational: the text rides on top of whatever else the set contributed and is not a degradation. */
866
+ auto_prompt_applied?: boolean;
783
867
  /** True when SBMC has a LoRA for this set on another base model but not the one used. */
784
868
  lora_available_but_incompatible?: boolean;
785
869
  /** True when the set isn't applicable to the chosen model (its modality / applicable base models exclude it) so no LoRA or assets were applied. */
@@ -997,7 +1081,7 @@ export interface InferenceReferenceSetInput {
997
1081
  weight?: number;
998
1082
  }
999
1083
  export type InferenceStatus = "in_progress" | "complete" | "failed" | "cancelled" | "deleted";
1000
- 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" | "video_subtitle" | "video_lipsync" | "image_to_video_lipsync" | "text_to_3d" | "image_to_3d" | "remesh" | "retexture" | "uv_unwrap" | "animate" | "rig" | "segment" | "image_segment" | "text_to_speech" | "sound_effects" | "music" | "upscaling" | "video_interpolation" | "denoise_image" | "denoise_video" | "deblur_video" | "restore_image" | "sdr_to_hdr_video" | "background_removal" | "vectorization" | "virtual_try_on";
1084
+ 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" | "video_subtitle" | "video_lipsync" | "motion_transfer" | "video_object_swap" | "image_to_video_lipsync" | "text_to_3d" | "image_to_3d" | "remesh" | "retexture" | "uv_unwrap" | "animate" | "rig" | "segment" | "image_segment" | "text_to_speech" | "sound_effects" | "music" | "upscaling" | "video_interpolation" | "denoise_image" | "denoise_video" | "deblur_video" | "restore_image" | "sdr_to_hdr_video" | "background_removal" | "vectorization" | "virtual_try_on";
1001
1085
  /** Delivered when an inference run reaches a terminal state. */
1002
1086
  export interface InferenceWebhookEvent {
1003
1087
  /** Unique event id, repeated in the webhook-id header. */
@@ -1050,6 +1134,14 @@ export interface ListScoringRulesOutput {
1050
1134
  /** Every rule in force for the scope, workspace-mandated rules first. */
1051
1135
  rules: Array<ScoringRuleSummary>;
1052
1136
  }
1137
+ export interface ListSessionObjectsOutput {
1138
+ objects: Array<SessionObject>;
1139
+ pagination: PaginationOutput;
1140
+ }
1141
+ export interface ListSessionsOutput {
1142
+ sessions: Array<SessionSummary>;
1143
+ pagination: PaginationOutput;
1144
+ }
1053
1145
  export interface ListTrainingRunsResponse {
1054
1146
  runs: Array<TrainingRunSummary>;
1055
1147
  pagination: PaginationOutput;
@@ -1140,6 +1232,23 @@ export interface ModelSummary {
1140
1232
  /** Typical generation time range, e.g. '5-15s' */
1141
1233
  inference_timing: string;
1142
1234
  }
1235
+ /** The view a source image shows, for 3D models that read their sources by view. */
1236
+ export type MultiViewSlot = "FRONT" | "LEFT" | "BACK" | "RIGHT";
1237
+ /**
1238
+ * One section of a planned track, carrying its own length, styles and sung lines.
1239
+ *
1240
+ * ``positive_styles``/``negative_styles`` are the section's delta: what enters or leaves
1241
+ * here, against the palette the plan holds for the whole track. A section's exclusions are
1242
+ * what keep it empty of something the rest of the track has, the plan-wide negatives
1243
+ * cannot express "no percussion until the second section".
1244
+ */
1245
+ export interface MusicSection {
1246
+ name: string;
1247
+ duration_seconds: number;
1248
+ positive_styles?: Array<string>;
1249
+ negative_styles?: Array<string>;
1250
+ lines?: Array<string>;
1251
+ }
1143
1252
  /**
1144
1253
  * Inference parameters after model-specific normalization.
1145
1254
  *
@@ -1184,6 +1293,7 @@ export interface NormalizedInferenceParametersV2 {
1184
1293
  /** Resolved FPS. */
1185
1294
  fps?: number | null;
1186
1295
  }
1296
+ export type ObjectEventType = "created" | "updated" | "deleted";
1187
1297
  export interface PaginationOutput {
1188
1298
  /** Cursor to use to get the next page */
1189
1299
  next_cursor?: string | null;
@@ -1364,6 +1474,67 @@ export interface ScoringRunWebhookEvent {
1364
1474
  /** Whatever you sent as webhook.metadata. */
1365
1475
  metadata?: Record<string, string>;
1366
1476
  }
1477
+ /** One `object` event on a session's stream. */
1478
+ export interface SessionEvent {
1479
+ /** What happened to the object: created, updated, or deleted. */
1480
+ type: ObjectEventType;
1481
+ /** The object's id. For a file this is its file_id, the one generation outputs report. */
1482
+ object_id: string;
1483
+ /** The object as it stands after the event. Null on a deletion, or once the object is gone. */
1484
+ object?: SessionEventObject | null;
1485
+ }
1486
+ /** What the object an event names looks like now. Absent on a deletion. */
1487
+ export interface SessionEventObject {
1488
+ /** Whether the object is a single file or a composite asset. */
1489
+ kind: "file" | "asset";
1490
+ /** The object's display name. */
1491
+ name: string;
1492
+ /** MIME type, for a file. */
1493
+ content_type?: string | null;
1494
+ /** Processing status, for a file. A file is ready to download once it reads `processed`. */
1495
+ status?: string | null;
1496
+ /** Download URL, for a processed file. */
1497
+ url?: string | null;
1498
+ /** Thumbnail URL, for a file that has one. */
1499
+ preview_url?: string | null;
1500
+ /** Width in pixels, for an image or video file. */
1501
+ width?: number | null;
1502
+ /** Height in pixels, for an image or video file. */
1503
+ height?: number | null;
1504
+ }
1505
+ /** A file or asset in the session, as it stands now: what a `SessionEvent` carries. */
1506
+ export interface SessionObject {
1507
+ /** Whether the object is a single file or a composite asset. */
1508
+ kind: "file" | "asset";
1509
+ /** The object's display name. */
1510
+ name: string;
1511
+ /** MIME type, for a file. */
1512
+ content_type?: string | null;
1513
+ /** Processing status, for a file. A file is ready to download once it reads `processed`. */
1514
+ status?: string | null;
1515
+ /** Download URL, for a processed file. */
1516
+ url?: string | null;
1517
+ /** Thumbnail URL, for a file that has one. */
1518
+ preview_url?: string | null;
1519
+ /** Width in pixels, for an image or video file. */
1520
+ width?: number | null;
1521
+ /** Height in pixels, for an image or video file. */
1522
+ height?: number | null;
1523
+ /** The object's id, the same one its `SessionEvent`s carry. For a file this is its file_id. */
1524
+ object_id: string;
1525
+ }
1526
+ export interface SessionSummary {
1527
+ /** The session's unique identifier. */
1528
+ session_id: string;
1529
+ /** The session's display name. */
1530
+ name: string;
1531
+ /** The project the session is filed under, if any. */
1532
+ project_id?: string | null;
1533
+ /** When the session was created. */
1534
+ created_at: string;
1535
+ /** When anyone last worked in the session, or null if nobody has yet. */
1536
+ last_interacted_at?: string | null;
1537
+ }
1367
1538
  export interface SetUsageLimitBody {
1368
1539
  /** Creative Units cap for the period. */
1369
1540
  cu_limit: number;
@@ -1415,6 +1586,8 @@ export interface ToolGuidanceFileTypeSupport {
1415
1586
  type: string;
1416
1587
  /** Maximum number of files of this type accepted by the model. */
1417
1588
  max_count: number;
1589
+ /** Minimum number of files of this type a run must supply. 0 means the input is optional. */
1590
+ min_count?: number;
1418
1591
  }
1419
1592
  export interface TrainedModelResponse {
1420
1593
  /** ID of the trained finetune (LoRA) for the run. */
@@ -1466,6 +1639,10 @@ export interface UpdateProjectBody {
1466
1639
  /** Set true to archive, false to unarchive. Omit to leave unchanged. */
1467
1640
  archived?: boolean | null;
1468
1641
  }
1642
+ export interface UpdateSessionBody {
1643
+ /** The session's new display name. */
1644
+ name: string;
1645
+ }
1469
1646
  export type UsageLimitPeriod = "daily" | "weekly" | "monthly";
1470
1647
  export interface ValidationError {
1471
1648
  loc: Array<string | number>;
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.0.7";
1
+ export const VERSION = "1.0.13";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layer_ai/sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.13",
4
4
  "description": "Official JavaScript and TypeScript SDK for Layer \u2014 AI asset creation for game studios.",
5
5
  "keywords": [
6
6
  "ai",