@layer_ai/sdk 1.0.46 → 1.0.51
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.
- package/dist/generated/types.d.ts +152 -3
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -628,6 +628,10 @@ export interface EstimateInferencePriceV2Request {
|
|
|
628
628
|
tile_grid?: TileGrid | null;
|
|
629
629
|
/** 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. */
|
|
630
630
|
output_fit?: OutputFit | null;
|
|
631
|
+
/** 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
|
+
nine_slice?: boolean | null;
|
|
633
|
+
/** 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
|
+
color_palette?: InferenceColorPalette | null;
|
|
631
635
|
/** The expression a face edit gives the face, one of the names the model's capabilities list under `expressions`. */
|
|
632
636
|
expression?: string | null;
|
|
633
637
|
/** The language a dub speaks, as one of the ISO 639-1 codes the model's capabilities list under `dub_languages`. */
|
|
@@ -1016,6 +1020,10 @@ export interface ExecuteInferenceV2Request {
|
|
|
1016
1020
|
tile_grid?: TileGrid | null;
|
|
1017
1021
|
/** 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. */
|
|
1018
1022
|
output_fit?: OutputFit | null;
|
|
1023
|
+
/** 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
|
+
nine_slice?: boolean | null;
|
|
1025
|
+
/** 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
|
+
color_palette?: InferenceColorPalette | null;
|
|
1019
1027
|
/** The expression a face edit gives the face, one of the names the model's capabilities list under `expressions`. */
|
|
1020
1028
|
expression?: string | null;
|
|
1021
1029
|
/** The language a dub speaks, as one of the ISO 639-1 codes the model's capabilities list under `dub_languages`. */
|
|
@@ -1065,6 +1073,15 @@ export interface ExecuteWorkflowRequest {
|
|
|
1065
1073
|
/** Deliver this run's terminal events to a URL instead of polling for them. Only the run's own outcome is delivered — the generations it performs internally are not yours to poll and raise no events of their own. See the Webhooks section of this document for the payload, headers and retry behaviour. */
|
|
1066
1074
|
webhook?: WebhookInput | null;
|
|
1067
1075
|
}
|
|
1076
|
+
/** What an engine needs beyond the image to build a resource from a file. Each kind is null when absent. */
|
|
1077
|
+
export interface FileMetadataView {
|
|
1078
|
+
/** Grid placement, for a game tile sprite. */
|
|
1079
|
+
tile?: TileMetadataView | null;
|
|
1080
|
+
/** 9-slice insets, for a UI element such as a button, frame, or panel. */
|
|
1081
|
+
nine_slice?: NineSliceMetadataView | null;
|
|
1082
|
+
/** Frame grid and animations, for a sprite sheet. */
|
|
1083
|
+
sprite_sheet?: SpriteSheetMetadataView | null;
|
|
1084
|
+
}
|
|
1068
1085
|
export interface FileScore {
|
|
1069
1086
|
/** The rule that produced this verdict. */
|
|
1070
1087
|
rule_id: string;
|
|
@@ -1153,6 +1170,8 @@ export interface ForgeRunAsset {
|
|
|
1153
1170
|
duration_seconds?: number | null;
|
|
1154
1171
|
/** File size in bytes. */
|
|
1155
1172
|
file_size_bytes?: number | null;
|
|
1173
|
+
/** What an engine needs beyond the file to build a resource from it. Null when the file has none. */
|
|
1174
|
+
metadata?: FileMetadataView | null;
|
|
1156
1175
|
}
|
|
1157
1176
|
export interface ForgeVideoEffectInput {
|
|
1158
1177
|
/** Video effect type. See model capabilities for supported effects per model. */
|
|
@@ -1175,7 +1194,7 @@ export interface GetForgeRunOutput {
|
|
|
1175
1194
|
actual_price_creative_units?: number | null;
|
|
1176
1195
|
/** Error message. Present only on FAILED. */
|
|
1177
1196
|
error?: string | null;
|
|
1178
|
-
/** Machine-readable error code. Present only on FAILED. Balance-related values: `INSUFFICIENT_BALANCE` (the workspace ran out of Creative Units — top up and resubmit)
|
|
1197
|
+
/** 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). */
|
|
1179
1198
|
error_code?: string | null;
|
|
1180
1199
|
}
|
|
1181
1200
|
export interface GetInferenceRunV2Output {
|
|
@@ -1193,7 +1212,7 @@ export interface GetInferenceRunV2Output {
|
|
|
1193
1212
|
actual_price_creative_units?: number | null;
|
|
1194
1213
|
/** Error message. Present only on FAILED. */
|
|
1195
1214
|
error?: string | null;
|
|
1196
|
-
/** Machine-readable error code. Present only on FAILED. Balance-related values: `INSUFFICIENT_BALANCE` (the workspace ran out of Creative Units — top up and resubmit)
|
|
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). */
|
|
1197
1216
|
error_code?: string | null;
|
|
1198
1217
|
/** Base model the run used, resolved or auto-picked. */
|
|
1199
1218
|
base_model_id?: string | null;
|
|
@@ -1294,7 +1313,7 @@ export interface GetWorkflowRunOutput {
|
|
|
1294
1313
|
outputs?: Array<WorkflowRunAsset> | null;
|
|
1295
1314
|
/** Error message. Present only on FAILURE. */
|
|
1296
1315
|
error?: string | null;
|
|
1297
|
-
/** Machine-readable error code. Present only on FAILURE. Balance-related values: `BlueprintInsufficientBalanceError` (the workspace ran out of Creative Units — top up and resubmit)
|
|
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). */
|
|
1298
1317
|
error_code?: string | null;
|
|
1299
1318
|
/** The callback attached to this run and how its delivery has gone. Null when the run was submitted without one. */
|
|
1300
1319
|
webhook?: WebhookStatusView | null;
|
|
@@ -1343,6 +1362,16 @@ export interface HTTPValidationError {
|
|
|
1343
1362
|
}
|
|
1344
1363
|
/** The geometry an output image is drawn in, when it is not an ordinary flat picture. */
|
|
1345
1364
|
export type ImageProjection = "EQUIRECTANGULAR";
|
|
1365
|
+
/**
|
|
1366
|
+
* The colors a generation is asked to use, and the reference set they were picked from.
|
|
1367
|
+
*
|
|
1368
|
+
* The run uses the colors it carries: a later edit to the set changes no run already made.
|
|
1369
|
+
* ``reference_set_id`` only names where they came from, so a form can show and restore it.
|
|
1370
|
+
*/
|
|
1371
|
+
export interface InferenceColorPalette {
|
|
1372
|
+
colors?: Array<PaletteColor>;
|
|
1373
|
+
reference_set_id?: string | null;
|
|
1374
|
+
}
|
|
1346
1375
|
export interface InferenceReferenceSetInput {
|
|
1347
1376
|
/** Reference set ID from GET /v2/workspaces/{workspace_id}/reference-sets. */
|
|
1348
1377
|
set_id: string;
|
|
@@ -1526,6 +1555,25 @@ export interface MusicSection {
|
|
|
1526
1555
|
negative_styles?: Array<string>;
|
|
1527
1556
|
lines?: Array<string>;
|
|
1528
1557
|
}
|
|
1558
|
+
/**
|
|
1559
|
+
* The insets a 9-slice draws a UI element by, in the image's own pixels in from each edge.
|
|
1560
|
+
*
|
|
1561
|
+
* The corners are drawn at their own size, the edges stretch along their length, and the centre
|
|
1562
|
+
* stretches both ways.
|
|
1563
|
+
*/
|
|
1564
|
+
export interface NineSliceMetadataView {
|
|
1565
|
+
/** Pixels in from the left edge. */
|
|
1566
|
+
left: number;
|
|
1567
|
+
/** Pixels in from the top edge. */
|
|
1568
|
+
top: number;
|
|
1569
|
+
/** Pixels in from the right edge. */
|
|
1570
|
+
right: number;
|
|
1571
|
+
/** Pixels in from the bottom edge. */
|
|
1572
|
+
bottom: number;
|
|
1573
|
+
/** DETECTED when measured off the pixels, USER when a person set the insets. */
|
|
1574
|
+
source: NineSliceSource;
|
|
1575
|
+
}
|
|
1576
|
+
export type NineSliceSource = "DETECTED" | "USER";
|
|
1529
1577
|
/**
|
|
1530
1578
|
* Inference parameters after model-specific normalization.
|
|
1531
1579
|
*
|
|
@@ -1613,6 +1661,12 @@ export interface PaginationOutput {
|
|
|
1613
1661
|
/** Total number of results matching the query */
|
|
1614
1662
|
total_count?: number | null;
|
|
1615
1663
|
}
|
|
1664
|
+
/** One named color of a palette. */
|
|
1665
|
+
export interface PaletteColor {
|
|
1666
|
+
name: string;
|
|
1667
|
+
hex: string;
|
|
1668
|
+
role?: string | null;
|
|
1669
|
+
}
|
|
1616
1670
|
/**
|
|
1617
1671
|
* Canonical rest pose a character-mesh model is asked to generate in.
|
|
1618
1672
|
* ``A_POSE`` places the arms angled down at roughly 45°; ``T_POSE`` holds them
|
|
@@ -1836,6 +1890,8 @@ export interface SessionEventObject {
|
|
|
1836
1890
|
width?: number | null;
|
|
1837
1891
|
/** Height in pixels, for an image or video file. */
|
|
1838
1892
|
height?: number | null;
|
|
1893
|
+
/** What an engine needs beyond the file to build a resource from it, for a file. Null when it has none. */
|
|
1894
|
+
metadata?: FileMetadataView | null;
|
|
1839
1895
|
}
|
|
1840
1896
|
/** A file or asset in the session, as it stands now: what a `SessionEvent` carries. */
|
|
1841
1897
|
export interface SessionObject {
|
|
@@ -1855,6 +1911,8 @@ export interface SessionObject {
|
|
|
1855
1911
|
width?: number | null;
|
|
1856
1912
|
/** Height in pixels, for an image or video file. */
|
|
1857
1913
|
height?: number | null;
|
|
1914
|
+
/** What an engine needs beyond the file to build a resource from it, for a file. Null when it has none. */
|
|
1915
|
+
metadata?: FileMetadataView | null;
|
|
1858
1916
|
/** The object's id, the same one its `SessionEvent`s carry. For a file this is its file_id. */
|
|
1859
1917
|
object_id: string;
|
|
1860
1918
|
}
|
|
@@ -1875,12 +1933,64 @@ export interface SetUsageLimitBody {
|
|
|
1875
1933
|
cu_limit: number;
|
|
1876
1934
|
/** Reset period for the cap (e.g. DAILY, MONTHLY). */
|
|
1877
1935
|
period: UsageLimitPeriod;
|
|
1936
|
+
/** WARN tells members they are past the cap; BLOCK also stops anything that charges Creative Units. */
|
|
1937
|
+
mode?: UsageLimitMode;
|
|
1938
|
+
/** Percent of the cap at which members are warned. */
|
|
1939
|
+
warn_threshold_pct?: number;
|
|
1878
1940
|
}
|
|
1879
1941
|
export interface SkippedFile {
|
|
1880
1942
|
file_id: string;
|
|
1881
1943
|
/** Why this file_id was not added: not_found (no such file), foreign_workspace (belongs to another workspace), already_member (already in the set), or duplicate_in_request (listed more than once in this call). */
|
|
1882
1944
|
reason: "not_found" | "foreign_workspace" | "already_member" | "duplicate_in_request";
|
|
1883
1945
|
}
|
|
1946
|
+
export interface SpriteSheetAnimationView {
|
|
1947
|
+
/** The animation's name. */
|
|
1948
|
+
name: string;
|
|
1949
|
+
/** Frame indexes (`frames[].index`), in play order. */
|
|
1950
|
+
frames: Array<number>;
|
|
1951
|
+
/** Frames per second. */
|
|
1952
|
+
fps: number;
|
|
1953
|
+
/** Whether the animation restarts after its last frame. */
|
|
1954
|
+
loop: boolean;
|
|
1955
|
+
}
|
|
1956
|
+
/** One frame's rect on the sheet, in the sheet's own pixels from its top-left corner. */
|
|
1957
|
+
export interface SpriteSheetFrameView {
|
|
1958
|
+
/** The frame's cell in reading order over the whole grid (left to right, then top to bottom). Cells that hold no frame are left out, so indexes can skip. */
|
|
1959
|
+
index: number;
|
|
1960
|
+
/** The frame's left edge on the sheet, in pixels. */
|
|
1961
|
+
x: number;
|
|
1962
|
+
/** The frame's top edge on the sheet, in pixels. */
|
|
1963
|
+
y: number;
|
|
1964
|
+
/** The frame's width in pixels. */
|
|
1965
|
+
w: number;
|
|
1966
|
+
/** The frame's height in pixels. */
|
|
1967
|
+
h: number;
|
|
1968
|
+
/** The point the frame is placed by, in pixels from the frame's top-left corner. Null when the frames were registered by centring them in their cells. */
|
|
1969
|
+
anchor?: TilePointView | null;
|
|
1970
|
+
}
|
|
1971
|
+
/**
|
|
1972
|
+
* The frame grid a sprite sheet was packed on, in the sheet's own pixels from its top-left corner.
|
|
1973
|
+
*
|
|
1974
|
+
* Cells start `margin` pixels in from the sheet's edges with `spacing` pixels between them.
|
|
1975
|
+
*/
|
|
1976
|
+
export interface SpriteSheetMetadataView {
|
|
1977
|
+
/** Cells across. */
|
|
1978
|
+
columns: number;
|
|
1979
|
+
/** Cells down. */
|
|
1980
|
+
rows: number;
|
|
1981
|
+
/** Width of one cell in pixels. */
|
|
1982
|
+
cell_width: number;
|
|
1983
|
+
/** Height of one cell in pixels. */
|
|
1984
|
+
cell_height: number;
|
|
1985
|
+
/** Pixels between the sheet's edges and the outer cells. */
|
|
1986
|
+
margin: number;
|
|
1987
|
+
/** Pixels between neighbouring cells. */
|
|
1988
|
+
spacing: number;
|
|
1989
|
+
/** The frames, in play order: left to right, then top to bottom, unless the list orders them otherwise. */
|
|
1990
|
+
frames: Array<SpriteSheetFrameView>;
|
|
1991
|
+
/** Named animations over the frames. When empty, play the sheet as one animation named `default` over every frame in `frames` order, at 12 fps, looping. */
|
|
1992
|
+
animations: Array<SpriteSheetAnimationView>;
|
|
1993
|
+
}
|
|
1884
1994
|
export interface StartTrainingRequest {
|
|
1885
1995
|
/** The reference set (Style) to train a LoRA for. */
|
|
1886
1996
|
reference_set_id: string;
|
|
@@ -1946,6 +2056,35 @@ export interface TileGrid {
|
|
|
1946
2056
|
}
|
|
1947
2057
|
/** The side the key light comes from, seen from the camera. */
|
|
1948
2058
|
export type TileLightSide = "left" | "right";
|
|
2059
|
+
/** Where a game tile's sprite sits on its grid, in the sprite's own pixels from its top-left corner. */
|
|
2060
|
+
export interface TileMetadataView {
|
|
2061
|
+
/** The outline of one grid cell seen from straight above. */
|
|
2062
|
+
shape: TileShape;
|
|
2063
|
+
/** How the cell is turned to the camera: DIAMOND or ALIGNED for a square, POINTY_TOP or FLAT_TOP for a hexagon. */
|
|
2064
|
+
orientation: TileOrientation;
|
|
2065
|
+
/** Camera tilt in degrees above the ground plane; 90 is straight down. */
|
|
2066
|
+
elevation: number;
|
|
2067
|
+
/** Quarter turn of the camera around the tile, in degrees clockwise seen from above: 0, 90, 180, or 270. A hexagon is only drawn facing 0. */
|
|
2068
|
+
facing: number;
|
|
2069
|
+
/** Cells the footprint covers across (the base's right-hand edge) at facing 0. */
|
|
2070
|
+
footprint_width: number;
|
|
2071
|
+
/** Cells the footprint covers deep (the base's left-hand edge) at facing 0. */
|
|
2072
|
+
footprint_depth: number;
|
|
2073
|
+
/** Wall height in cell sides: 0 is a flat ground tile, 1 a cube on a square. */
|
|
2074
|
+
height: number;
|
|
2075
|
+
/** Width in pixels of one cell's base outline in the sprite. */
|
|
2076
|
+
tile_width: number;
|
|
2077
|
+
/** Height in pixels of one cell's base outline in the sprite. */
|
|
2078
|
+
tile_height: number;
|
|
2079
|
+
/** The point the tile is placed by: the bottom centre of the cell it stands on (the front cell of a footprint wider than one). */
|
|
2080
|
+
anchor: TilePointView;
|
|
2081
|
+
/** The centre of the anchor's cell. Godot and Unity pin a tile here rather than at the anchor. */
|
|
2082
|
+
cell_center: TilePointView;
|
|
2083
|
+
/** The footprint's whole base outline, clockwise on screen from the anchor's vertex or edge. */
|
|
2084
|
+
base_outline: Array<TilePointView>;
|
|
2085
|
+
/** What the tile shows. Every facing of one subject shares it, so a tileset can group them. */
|
|
2086
|
+
subject_id?: string | null;
|
|
2087
|
+
}
|
|
1949
2088
|
/**
|
|
1950
2089
|
* How a cell's outline is turned to the camera.
|
|
1951
2090
|
*
|
|
@@ -1954,6 +2093,12 @@ export type TileLightSide = "left" | "right";
|
|
|
1954
2093
|
* vertex (``POINTY_TOP``) or an edge (``FLAT_TOP``) at the top.
|
|
1955
2094
|
*/
|
|
1956
2095
|
export type TileOrientation = "DIAMOND" | "ALIGNED" | "POINTY_TOP" | "FLAT_TOP";
|
|
2096
|
+
export interface TilePointView {
|
|
2097
|
+
/** Pixels right of the sprite's left edge. */
|
|
2098
|
+
x: number;
|
|
2099
|
+
/** Pixels down from the sprite's top edge. */
|
|
2100
|
+
y: number;
|
|
2101
|
+
}
|
|
1957
2102
|
/** The outline of one cell of the grid, seen from straight above. */
|
|
1958
2103
|
export type TileShape = "SQUARE" | "HEXAGON";
|
|
1959
2104
|
export interface TokenResponse {
|
|
@@ -2042,6 +2187,8 @@ export interface UpdateSessionBody {
|
|
|
2042
2187
|
/** The session's new display name. */
|
|
2043
2188
|
name: string;
|
|
2044
2189
|
}
|
|
2190
|
+
/** What a cap does once its member has used all of it. */
|
|
2191
|
+
export type UsageLimitMode = "warn" | "block";
|
|
2045
2192
|
export type UsageLimitPeriod = "daily" | "weekly" | "monthly";
|
|
2046
2193
|
export interface ValidationError {
|
|
2047
2194
|
loc: Array<string | number>;
|
|
@@ -2169,6 +2316,8 @@ export interface WorkflowRunAsset {
|
|
|
2169
2316
|
duration_seconds?: number | null;
|
|
2170
2317
|
/** File size in bytes. */
|
|
2171
2318
|
file_size_bytes?: number | null;
|
|
2319
|
+
/** What an engine needs beyond the file to build a resource from it. Null when the file has none. */
|
|
2320
|
+
metadata?: FileMetadataView | null;
|
|
2172
2321
|
}
|
|
2173
2322
|
/** Delivered when a workflow run reaches a terminal state. */
|
|
2174
2323
|
export interface WorkflowRunWebhookEvent {
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.0.
|
|
1
|
+
export const VERSION = "1.0.51";
|