@layer_ai/sdk 1.0.70 → 1.0.82

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/README.md CHANGED
@@ -81,10 +81,10 @@ await layer.inferences.generate({
81
81
  });
82
82
  ```
83
83
 
84
- ## Browse the catalogue
84
+ ## Browse the catalog
85
85
 
86
86
  Which models a workspace can run depends on its plan and its policy, so read the
87
- catalogue rather than hard-coding ids:
87
+ catalog rather than hard-coding ids:
88
88
 
89
89
  ```ts
90
90
  for await (const model of layer.baseModels.listAll({ modality: "video" })) {
@@ -139,7 +139,7 @@ so a retried generation is replayed rather than run, and paid for, twice.
139
139
  | Namespace | What it reaches |
140
140
  | ---------------------- | ------------------------------------------------------- |
141
141
  | `layer.inferences` | Generation: estimate, create, wait, cancel |
142
- | `layer.baseModels` | The model catalogue, defaults, and per-model schemas |
142
+ | `layer.baseModels` | The model catalog, defaults, and per-model schemas |
143
143
  | `layer.referenceSets` | Trained subjects, styles, and characters |
144
144
  | `layer.trainingRuns` | Training a reference set, and the model it produces |
145
145
  | `layer.files` | Uploads and per-file quality scores |
@@ -11,9 +11,113 @@ export interface AddGroupMemberBody {
11
11
  user_id?: string | null;
12
12
  }
13
13
  export interface AddProjectMembersBody {
14
- /** Ids of workspace members to add. All must already be active workspace members. */
14
+ /** IDs of workspace members to add. All must already be active workspace members. */
15
15
  user_ids: Array<string>;
16
16
  }
17
+ /**
18
+ * The AI controls one scope sets. Anything absent is inherited from the less specific scopes.
19
+ *
20
+ * Every control is a setting, or a map of settings keyed by what it controls, so each value is
21
+ * inherited, overridden and locked on its own: a group that turns one model on leaves every other
22
+ * model to the workspace.
23
+ */
24
+ export interface AiPolicy {
25
+ agent_enabled?: Setting_bool_ | null;
26
+ agents?: Record<string, Setting_bool_>;
27
+ agent_confirm_above_cu?: Setting_Annotated_float__Ge__ | null;
28
+ modalities?: Record<string, Setting_bool_>;
29
+ new_models_enabled?: Setting_bool_ | null;
30
+ models?: Record<string, Setting_bool_>;
31
+ model_defaults?: Record<string, Record<string, Setting_JsonValue_>>;
32
+ guardrails?: Record<string, Setting_bool_>;
33
+ output_scoring?: Record<string, Setting_bool_>;
34
+ nsfw_tolerance?: Setting_Annotated_int__FieldInfo_annotation_NoneType__required_True__metadata__Ge_ge_1___Le_le_6_____ | null;
35
+ reference_set_sharing_enabled?: Setting_bool_ | null;
36
+ workflow_sharing_enabled?: Setting_bool_ | null;
37
+ usage_caps?: Record<string, Setting_Union_UsageCap__NoneType__>;
38
+ }
39
+ export interface AiPolicyOutput {
40
+ /** What the policy is attached to. */
41
+ scope: AiPolicyScope;
42
+ /** What the scope sets itself, each value as {value, locked}. Anything absent is inherited. */
43
+ policy: AiPolicy;
44
+ /** What the scope inherits from the less specific scopes, each value as {value, source}. A value with no source is the platform default. */
45
+ inherited: EffectiveAiPolicy;
46
+ /** When the policy was last written; null if it sets nothing. */
47
+ updated_at: string | null;
48
+ /** Who last wrote the policy, when known. */
49
+ updated_by_id: string | null;
50
+ }
51
+ /**
52
+ * A change to the AI controls one scope sets, as a JSON merge patch (RFC 7396) of its policy.
53
+ *
54
+ * A control or key the patch names is set; one it names as null is removed, so the scope inherits
55
+ * it again; anything it leaves out stays as it is. A setting is one value: naming it replaces both
56
+ * its value and its lock. Only the controls the policy editor writes can be patched; guardrails,
57
+ * output scoring and usage caps belong to the services that own them, and naming one is refused.
58
+ */
59
+ export interface AiPolicyPatch {
60
+ agent_enabled?: Setting_bool_ | null;
61
+ agents?: Record<string, Setting_bool_ | null> | null;
62
+ agent_confirm_above_cu?: Setting_Annotated_float__Ge__ | null;
63
+ modalities?: Record<string, Setting_bool_ | null> | null;
64
+ new_models_enabled?: Setting_bool_ | null;
65
+ models?: Record<string, Setting_bool_ | null> | null;
66
+ model_defaults?: Record<string, Record<string, Setting_JsonValue_ | null> | null> | null;
67
+ nsfw_tolerance?: Setting_Annotated_int__FieldInfo_annotation_NoneType__required_True__metadata__Ge_ge_1___Le_le_6_____ | null;
68
+ reference_set_sharing_enabled?: Setting_bool_ | null;
69
+ workflow_sharing_enabled?: Setting_bool_ | null;
70
+ }
71
+ /** A stored policy: the scope it is attached to, what it sets, and its last write. */
72
+ export interface AiPolicyRecord {
73
+ scope: AiPolicyScope;
74
+ policy: AiPolicy;
75
+ updated_at: string;
76
+ updated_by_id: string | null;
77
+ }
78
+ /**
79
+ * Everything a scope sets itself, replacing what it set before. Leave a control out to inherit it.
80
+ *
81
+ * Guardrails, output scoring and usage caps are managed by their own endpoints; a copy of them
82
+ * sent back from a read is ignored, and what is stored for them is kept.
83
+ */
84
+ export interface AiPolicyReplacement {
85
+ /** The Layer agent as a whole. */
86
+ agent_enabled?: Setting_bool_ | null;
87
+ /** Each subagent on or off, by the principal it acts as. */
88
+ agents?: Record<string, Setting_bool_>;
89
+ /** The Creative Units above which the agent asks before running a job. */
90
+ agent_confirm_above_cu?: Setting_Annotated_float__Ge__ | null;
91
+ /** Each modality on or off. */
92
+ modalities?: Record<string, Setting_bool_>;
93
+ /** Whether a model `models` does not name may run: true makes `models` a deny list, false an allow list. */
94
+ new_models_enabled?: Setting_bool_ | null;
95
+ /** Each base model on or off. */
96
+ models?: Record<string, Setting_bool_>;
97
+ /** Parameter values a generation on the model starts from, by parameter name. */
98
+ model_defaults?: Record<string, Record<string, Setting_JsonValue_>>;
99
+ /** How much NSFW content generations may produce: 1 is the strictest, 6 the most permissive. */
100
+ nsfw_tolerance?: Setting_Annotated_int__FieldInfo_annotation_NoneType__required_True__metadata__Ge_ge_1___Le_le_6_____ | null;
101
+ /** Whether the workspace's reference sets may be shared beyond it. */
102
+ reference_set_sharing_enabled?: Setting_bool_ | null;
103
+ /** Whether the workspace's workflows may be shared beyond it. */
104
+ workflow_sharing_enabled?: Setting_bool_ | null;
105
+ }
106
+ /** Where a policy is attached: a workspace, or a project, group or member inside one. */
107
+ export interface AiPolicyScope {
108
+ kind: AiPolicyScopeKind;
109
+ workspace_id: string;
110
+ project_id?: string | null;
111
+ group_id?: string | null;
112
+ principal_id?: string | null;
113
+ }
114
+ /** What an AI policy is attached to, from least to most specific. */
115
+ export type AiPolicyScopeKind = "workspace" | "project" | "group" | "member";
116
+ /** The policy a resolved value comes from. */
117
+ export interface AiPolicySource {
118
+ scope: AiPolicyScope;
119
+ locked: boolean;
120
+ }
17
121
  /** Which boundary of the source clip a section's times are measured from. */
18
122
  export type AudioAnchor = "START" | "END";
19
123
  /**
@@ -91,7 +195,7 @@ export interface AutoDeleteRuleIO {
91
195
  keep_pinned?: boolean;
92
196
  }
93
197
  export interface AutoDeleteRunOutput {
94
- /** Id of the run. */
198
+ /** ID of the run. */
95
199
  run_id: string;
96
200
  /** Whether the nightly schedule or a person started it. */
97
201
  trigger: AutoDeleteTrigger;
@@ -195,9 +299,9 @@ export interface BaseModelCapabilitiesREST {
195
299
  subtitle_presets?: Array<string>;
196
300
  /** The `subtitle_presets` that animate word by word; they bill at a higher rate than the rest. */
197
301
  subtitle_dynamic_presets?: Array<string>;
198
- /** Takes the caption text colour as `subtitle_color`. */
302
+ /** Takes the caption text color as `subtitle_color`. */
199
303
  subtitle_primary_color?: boolean;
200
- /** Takes the colour of the words it emphasises as `subtitle_secondary_color`. */
304
+ /** Takes the color of the words it emphasizes as `subtitle_secondary_color`. */
201
305
  subtitle_secondary_color?: boolean;
202
306
  /** Takes the captions' vertical position as `subtitle_alignment`. */
203
307
  subtitle_alignment?: boolean;
@@ -244,6 +348,7 @@ export interface BaseModelDetail {
244
348
  /** Supported inputs, sizes, and generation features. */
245
349
  capabilities: BaseModelCapabilitiesREST;
246
350
  }
351
+ export type BaseModelId = "gpt-5.2" | "gpt-5.4" | "gpt-5.4-nano" | "gpt-5.4-mini" | "gpt-5.4-pro" | "gpt-5.5" | "gpt-5.5-pro" | "gemini-3-flash-lite" | "gemini-3.5-flash" | "claude-sonnet-4-6" | "claude-haiku-4-5" | "claude-opus-4-7" | "claude-opus-4-7-fast" | "claude-fable-5" | "claude-fable-5-1" | "grok-4.20" | "deepseek-v3" | "deepseek-v4-pro" | "deepseek-v4-flash" | "mistral-medium-3.5" | "llama-4-maverick" | "qwen-3.7-max" | "qwen-3.8-max" | "kimi-k2.6" | "mureka-lyrics" | "kimi-k3" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-5.6-luna" | "gemini-3.6-flash" | "claude-opus-5" | "claude-opus-4-8" | "claude-sonnet-5" | "grok-4.5" | "jev-1.13" | "glm-5.2" | "muse-spark-1.1" | "muse-spark-1.2" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-6-astra" | "gpt-6-astra-pro" | "muse-spark-1.3" | "grok-4.6" | "glm-5.3" | "glm-5.3-flash" | "qwen-3.8-flash" | "deepseek-v4.1-flash" | "gpt-6-sol" | "gpt-6-sol-pro" | "gpt-6-luna" | "gpt-6-luna-pro" | "gpt-6.1-terra" | "gpt-6-luna-decisions" | "claude-opus-5.5" | "grok-4.7" | "glm-5.3-flashx" | "qwen-3.8-omni-flash" | "claude-haiku-5.5" | "sdxl" | "sdxl-turbo" | "sd3" | "fooocus" | "bria21" | "bria22-fast" | "bria23" | "bria-fibo-2" | "flux-schnell" | "flux" | "flux-dev-srpo" | "flux-dev-krea" | "flux-pro" | "flux-1-1-pro" | "flux-1-1-pro-ultra" | "flux-pro-vto" | "flux-kontext-dev" | "flux-kontext-pro" | "flux-kontext-max" | "flux-2-flex" | "flux-2-dev" | "flux-2-pro" | "flux-2-flex-edit" | "flux-2-dev-edit" | "flux-2-pro-edit" | "flux-2-max" | "flux-2-max-edit" | "flux-2-klein-4b" | "flux-2-klein-9b" | "flux-2-klein-4b-edit" | "flux-2-klein-9b-edit" | "flux-2-klein-realtime" | "flux-3-image" | "flux-3-klein-base" | "flux-3-klein-base-edit" | "flux-3-klein" | "z-image-turbo" | "krea-2-turbo" | "krea-2-large" | "krea-3-realtime" | "krea-3" | "hidream-o1-image" | "hidream-o1-image-dev" | "dall-e" | "gpt-image-1" | "gpt-image-1.5" | "gpt-image-2" | "gpt-image-2.5-flare" | "gpt-image-2.5-sunburst" | "imagen-2" | "imagen-3" | "imagen-3-fast" | "imagen-4" | "imagen-4-fast" | "imagen-4-ultra" | "gemini-2.0-flash-preview-image-generation" | "gemini-2.5-flash-image" | "gemini-2.5-flash-image-edit" | "gemini-3-pro-image" | "gemini-3-pro-image-edit" | "gemini-3.1-flash-image" | "gemini-3.1-flash-image-edit" | "gemini-3.1-flash-lite-image" | "gemini-3.1-flash-lite-image-edit" | "nano-banana-2.1" | "google-virtual-try-on" | "qwen-image" | "qwen-image-edit" | "qwen-image-edit-2509" | "qwen-image-layered" | "qwen-image-edit-2511" | "qwen-image-edit-2511-multiple-angles" | "qwen-image-2512" | "qwen-image-2" | "qwen-image-2-pro" | "qwen-image-2-edit" | "qwen-image-2-pro-edit" | "qwen-image-2.1" | "qwen-image-2.1-edit" | "grok-imagine-image" | "grok-imagine-image-edit" | "grok-imagine-image-2.0" | "seedream-4" | "seedream-4.5" | "seedream-5-lite" | "seedream-5-lite-edit" | "seedream-5-pro" | "seedream-5-pro-edit" | "seedream-5-pro-layerize" | "seedream-5-flash" | "seedream-5-flash-layerize" | "patina" | "patina-tileable" | "luma-uni-1" | "luma-uni-1-max" | "recraft-v3" | "recraft-v4" | "recraft-v4-pro" | "recraft-v4-vector" | "recraft-v4-pro-vector" | "ideogram-v4" | "ideogram-v4.5" | "ideogram-vector" | "recraft-v4.1" | "recraft-v4.1-pro" | "recraft-v4.1-pro-vector" | "recraft-v4.1-vector" | "step1x-edit" | "mai-image-2.5" | "mai-image-2.5-pro" | "muse-image" | "reve-2" | "reve-2-remix" | "reve-2.1" | "reve-2.1-remix" | "pruna-p-image" | "clarity-upscaler" | "esrgan-upscaler" | "pruna-p-image-upscale" | "topaz-enhance-upscaler" | "topaz-enhance-generative-upscaler" | "topaz-standard-v2-upscale-image" | "topaz-high-fidelity-v3-upscale-image" | "topaz-low-resolution-v2-upscale-image" | "topaz-cgi-upscale-image" | "topaz-text-refine-upscale-image" | "topaz-wonder-3.5-upscale-image" | "topaz-redefine-upscale-image" | "topaz-recover-3-upscale-image" | "topaz-standard-max-upscale-image" | "topaz-recovery-v2-upscale-image" | "topaz-bloom-2-upscale-image" | "topaz-bloom-realism-upscale-image" | "topaz-transparent-upscale-image" | "seed-vr-upscale-image" | "recraft-upscale-crisp" | "recraft-upscale-creative" | "topaz-normal-denoise-image" | "topaz-strong-denoise-image" | "topaz-extreme-denoise-image" | "topaz-denoise-max-denoise-image" | "topaz-recover-3-restore-image" | "topaz-dust-scratch-v2-restore-image" | "bria-fibo-edit-restore-image" | "telestyle-v2" | "bria-fibo-edit-colorize-image" | "image2pixel-pixelate-image" | "image-apps-v2-expression-change" | "image-editing-expression-change" | "finegrain-erase-image" | "ideogram-erase-image" | "fal-object-removal-erase-image" | "bria-erase-image" | "bria-fibo-edit-rewrite-text" | "image-editing-text-removal" | "ideogram-v3-layerize-text" | "veo-2" | "veo-3" | "veo-3-fast" | "veo-3.1" | "veo-3.1-fast" | "veo-3.1-lite" | "veo-3.1-reference" | "veo-3.1-fast-reference" | "ai-avatar" | "omnihuman" | "omnihuman-v1.5" | "omnihuman-v2" | "veed-lipsync-v2" | "sync-lipsync-v3" | "sync-lipsync-v2-pro" | "latentsync" | "sync-lipsync-v3-image-to-video" | "minimax" | "minimax-live" | "minimax-hailuo-2-standard" | "minimax-hailuo-2-pro" | "minimax-hailuo-2.3-standard" | "minimax-hailuo-2.3-pro" | "minimax-hailuo-2.3-fast" | "minimax-h3" | "minimax-h3-reference" | "minimax-h3-max" | "minimax-h3-max-reference" | "minimax-h3-max-turbo" | "minimax-h3-max-lip-sync" | "minimax-h3-max-recast" | "minimax-h3-max-reframe" | "minimax-h3-max-relight" | "minimax-h3-max-extend" | "minimax-h3-max-insert" | "minimax-h3-max-3d-to-video" | "heygen-video" | "heygen-video-reference" | "hunyuan" | "hunyuan-video-foley" | "hunyuan-video-1.5" | "kling-v15-pro" | "kling-v16-pro" | "kling-v20-master" | "kling-v21-master" | "kling-v21-pro" | "kling-v2.5-turbo-pro" | "kling-v2.6-pro" | "kling-o1" | "kling-o1-reference" | "kling-o1-edit" | "kling-o3-pro" | "kling-o3-pro-edit" | "kling-o3-standard" | "kling-o3-standard-edit" | "kling-v3-pro" | "kling-v3-standard" | "kling-v2.6-pro-motion-control" | "kling-v2.6-standard-motion-control" | "kling-v3-pro-motion-control" | "kling-v3-standard-motion-control" | "kling-v3-4k" | "kling-o3-4k" | "kling-o3-4k-reference" | "kling-v4" | "kling-v4-video-edit" | "kling-v4-flash" | "kling-v4-flash-reference" | "kling-image-o3" | "kling-image-v3" | "wan-21" | "wan-22" | "wan-25" | "wan-2.6" | "wan-3.0" | "wan-3.0-reference" | "wan-2.7-pro" | "wan-2.7-pro-edit" | "happy-horse" | "happy-horse-reference" | "happy-horse-edit" | "happy-horse-1.1" | "gemini-omni-flash" | "gemini-omni-flash-edit" | "gemini-omni-flash-reference" | "gemini-omni-flash-1.1" | "gemini-omni-flash-1.1-edit" | "gemini-omni-flash-1.1-reference" | "sadtalker" | "framepack" | "higgsfield-lite" | "higgsfield-preview" | "higgsfield-turbo" | "higgsfield-soul-2" | "higgsfield-soul-cinema" | "higgsfield-genjutsu-motion-transfer" | "higgsfield-genjutsu-object-swap" | "worldlabs-marble-1.0-draft" | "worldlabs-marble-1.1" | "worldlabs-marble-1.1-plus" | "worldlabs-marble-1.1-draft-complete" | "triposplat" | "pruna-p-video" | "pruna-p-video-2" | "pruna-p-video-2-pro" | "pruna-p-video-avatar" | "pruna-p-video-avatar-tts" | "pruna-p-video-edit" | "pruna-p-video-animate" | "pruna-p-video-replace" | "magi-distilled" | "seedance-v1-lite" | "seedance" | "seedance-v1.5-pro" | "seedance-v2" | "seedance-v2-reference" | "seedance-v2-fast" | "seedance-v2-fast-reference" | "seedance-v2.5" | "seedance-v2.5-reference" | "seedance-v2.5-draft-complete" | "seedance-v2-us" | "seedance-v2.5-us" | "seedance-v2.5-us-draft-complete" | "vidu-q3-pro" | "pixverse-v5" | "pixverse-v5.5" | "pixverse-v5.5-fast" | "pixverse-v6" | "pixverse-vibemv" | "mureka-lyrics-video" | "pika-2.5" | "ray-2" | "ray-2-flash" | "ray-3-2" | "sora-2" | "sora-2-pro" | "ltx-v2-fast" | "ltx-v2-pro" | "ltx-v2.3" | "ltx-v2.3-fast" | "ltx-v2.3-22b" | "ltx-v2.3-quality-outpaint" | "ltx-v2.5-fast" | "ltx-v2.5-pro" | "ltx-v2.5-fast-audio" | "ltx-v2.5-pro-audio" | "kandinsky-6-lite" | "flux-3" | "flux-3-keyframes" | "flux-3-extend" | "flux-3-edit" | "flux-3-draft-enhance" | "flux-3-max" | "flux-3-max-keyframes" | "grok-imagine-video" | "grok-imagine-video-1.5" | "grok-imagine-video-1.5-lite" | "grok-imagine-video-edit" | "grok-imagine-video-extend" | "runway-gen4-turbo" | "runway-gen4.5" | "runway-gen4-aleph" | "runway-aleph2" | "video-upscaler-esrgan" | "video-upscaler-topaz" | "topaz-proteus-upscale-video" | "topaz-proteus-natural-upscale-video" | "topaz-iris-upscale-video" | "topaz-dione-dv-upscale-video" | "topaz-artemis-high-quality-upscale-video" | "topaz-gaia-hq-upscale-video" | "topaz-gaia-cg-upscale-video" | "topaz-gaia-2-upscale-video" | "topaz-rhea-upscale-video" | "topaz-theia-fine-tune-detail-upscale-video" | "topaz-starlight-precise-2.6-upscale-video" | "topaz-starlight-hq-upscale-video" | "topaz-starlight-mini-upscale-video" | "topaz-starlight-sharp-upscale-video" | "topaz-starlight-fast-2-upscale-video" | "topaz-astra-2-upscale-video" | "seed-vr-upscale-video" | "bria-video-increase-resolution" | "flux-video-upscale" | "flux-video-upscale-creative" | "topaz-apollo-interpolate-video" | "topaz-chronos-interpolate-video" | "topaz-aion-interpolate-video" | "topaz-nyx-denoise-video" | "topaz-nyx-fast-denoise-video" | "topaz-nyx-xl-denoise-video" | "topaz-nyx-hf-denoise-video" | "topaz-themis-2-deblur-video" | "topaz-sdr-to-hdr-video" | "ffmpeg-merge-videos" | "ffmpeg-extract-frame" | "auto-subtitle" | "auto-caption" | "veed-subtitles" | "remotion-video-timeline" | "video-as-code-render" | "recraft-vectorize-image" | "ideogram-vectorize" | "star-vector" | "fal-image-to-svg" | "birefnet-v2" | "ideogram-remove-background" | "pixelcut-background-removal" | "bria-video-background-removal" | "bria-video-background-removal-v3" | "bria-video-green-screen" | "void-video-inpainting" | "lightricks-ltx-v2-3-quality-clean-plate" | "elevenlabs-dubbing" | "heygen-translate-precision" | "heygen-translate-speed" | "decart-lucy-restyle" | "decart-lucy-edit-pro" | "id-v2v" | "pixelcut-video-background-removal" | "sam-3-1-image" | "sam-3-1-video" | "tripo-2.0" | "tripo-2.5" | "tripo-3.0" | "tripo-3.1" | "tripo-p1" | "tripo-p2" | "tripo-turbo-1.0" | "tripo-rig" | "tripo-animate" | "tripo-retarget" | "tripo-segment" | "tripo-remesh" | "tripo-retopology-v3" | "tripo-smart-uv" | "tripo-retexture" | "tripo-convert" | "rodin" | "rodin-bang" | "rodin-gen-2" | "rodin-gen-2-5" | "trellis" | "trellis-2" | "hunyuan-3d-v2" | "hunyuan-3d-v2-mini" | "hunyuan-3d-3.0" | "hunyuan-3d-v3.1-pro" | "hunyuan-3d-v3.1-fast" | "hunyuan-3d-v3.1-part" | "hunyuan-3d-v3.1-remesh" | "hunyuan-3d-uv-unwrap" | "shutterstock" | "meshy-v6-preview" | "meshy-v6" | "meshy-v7" | "meshy-v7.1" | "meshy-t2" | "meshy-t2.5" | "meshy-v6-draft-complete" | "meshy-v7.1-draft-complete" | "meshy-t2-draft-complete" | "meshy-t2.5-draft-complete" | "bytedance-seed-3d" | "hi-3d" | "hi-3d-v3" | "hi-3d-texture" | "hi-3d-parts" | "sam-3-3d-objects" | "sam-3-3d-body" | "sam-3-3d-align" | "anything-world-animate" | "anything-world-rig" | "uthana-animate" | "uthana-auto-rig-character" | "meshy-v5-retexture" | "meshy-v6-lite-retexture" | "meshy-v6-retexture" | "meshy-v7-retexture" | "meshy-v5-remesh" | "meshy-remesh" | "meshy-rigging" | "meshy-uv-unwrap" | "meshy-auto-split" | "stable-audio" | "stable-audio-25" | "stable-audio-3-medium" | "stable-audio-3-small-music" | "stable-audio-3-small-sfx" | "gemini-tts" | "gemini-3.1-flash-tts" | "gemini-3.8-flash-tts" | "gemini-3.8-flash-lite-tts" | "ace-step" | "minimax-music-v2" | "minimax-music-v2.5" | "minimax-music-v2.6" | "minimax-music-3" | "eleven-labs-music" | "cassetteai-music" | "lyria-2" | "lyria-3" | "lyria-3-pro" | "lyria-3-5" | "sonilo-v1-1-text-to-music" | "sonilo-v1-1-video-to-music" | "mureka-song" | "mureka-instrumental" | "mureka-podcast" | "eleven-labs-multilingual-v2" | "eleven-labs-tts-v3" | "eleven-labs-tts-v4" | "eleven-labs-tts-v4-turbo" | "eleven-labs-voice-changer" | "eleven-labs-text-to-dialogue" | "inworld-tts-1.5-max" | "xai-tts-v1" | "heygen-voice" | "heygen-voice-turbo" | "qwen-3-tts" | "seed-audio-1" | "eleven-labs-sound-effects" | "cassetteai-sfx" | "mirelo-sfx" | "mirelo-sfx-2" | "mirelo-sfx-2-video-to-audio" | "sonilo-v1-1-text-to-sound-effects" | "sonilo-v1-1-video-to-sound-effects" | "sam-audio-separate" | "kling-video-to-audio" | "eleven-labs-audio-isolation" | "deepfilternet-3" | "veed-clean-audio" | "sonilo-v1-1-video-to-video-music" | "sonilo-v1-1-video-to-video-sound-effects" | "mirelo-sfx-2-video-to-video" | "playable-v1" | "image-preprocessor" | "comfy-image" | "sd15" | "sd2-base" | "sd2" | "sd21-base" | "sd21" | "getty";
247
352
  export interface BaseModelSummary {
248
353
  /** Base model identifier, e.g. flux-dev — pass it as `base_model_id`. */
249
354
  base_model_id: string;
@@ -390,15 +495,17 @@ export interface CreateGroupBody {
390
495
  name: string;
391
496
  /** Optional workspace role to grant members. */
392
497
  role?: Role | null;
393
- /** Id of a custom role to grant instead of a builtin `role`. */
498
+ /** ID of a custom role to grant instead of a builtin `role`. */
394
499
  role_id?: string | null;
395
500
  }
396
501
  export interface CreateProjectBody {
397
502
  /** The project's display name. Must be unique within the workspace. */
398
503
  name: string;
399
504
  description?: string | null;
400
- /** Deprecated: attach a skill to the project instead. Honoured while it holds text, and read back as null once the project's instructions have been converted into a project-attached skill. */
505
+ /** Deprecated: attach a skill to the project instead. Honored while it holds text, and read back as null once the project's instructions have been converted into a project-attached skill. */
401
506
  instructions?: string | null;
507
+ /** Who can reach the project's sessions and the work made in them. `workspace`: workspace members with project access. `members`: the project's own members only; workspace admins outside the project are refused too. */
508
+ visibility?: ProjectVisibility;
402
509
  }
403
510
  export interface CreateReferenceSetRequest {
404
511
  /** Display name for the reference set. */
@@ -426,6 +533,8 @@ export interface CreateReferenceSetResponse {
426
533
  export interface CreateSessionBody {
427
534
  /** The session's display name. */
428
535
  name: string;
536
+ /** The project to file the session under. Runs in the session follow the project's AI policy, and their outputs are added to the project. The project must be active and the caller a member of it or a workspace admin. */
537
+ project_id?: string | null;
429
538
  }
430
539
  export interface DailyUsage {
431
540
  /** Calendar day (UTC), ISO format YYYY-MM-DD. */
@@ -438,9 +547,30 @@ export interface DeleteStoredFilesOutput {
438
547
  deleted_files: number;
439
548
  /** Bytes those files held. */
440
549
  deleted_bytes: number;
441
- /** Files left because something depends on them. Ids that are not a stored file are left silently. */
550
+ /** Files left because something depends on them. IDs that are not a stored file are left silently. */
442
551
  skipped: Array<SkippedFileOutput>;
443
552
  }
553
+ /**
554
+ * The AI controls in force for one piece of work: every scope's policy, resolved.
555
+ *
556
+ * The maps hold only what some policy names; anything they leave out takes the platform default
557
+ * the accessors below apply.
558
+ */
559
+ export interface EffectiveAiPolicy {
560
+ agent_enabled: Resolved_bool_;
561
+ agents: Record<string, Resolved_bool_>;
562
+ agent_confirm_above_cu: Resolved_float_;
563
+ modalities: Record<string, Resolved_bool_>;
564
+ new_models_enabled: Resolved_bool_;
565
+ models: Record<string, Resolved_bool_>;
566
+ model_defaults: Record<string, Record<string, Resolved_JsonValue_>>;
567
+ guardrails: Record<string, Resolved_bool_>;
568
+ output_scoring: Record<string, Resolved_bool_>;
569
+ nsfw_tolerance?: Resolved_int_;
570
+ reference_set_sharing_enabled?: Resolved_bool_;
571
+ workflow_sharing_enabled?: Resolved_bool_;
572
+ usage_caps?: Record<string, Resolved_Union_UsageCap__NoneType__>;
573
+ }
444
574
  export interface EffectiveAutoDeletePolicyOutput {
445
575
  policy: AutoDeletePolicyIO;
446
576
  /** The workspace that set the policy: this one or an ancestor. */
@@ -464,9 +594,9 @@ export interface EstimateForgePriceOutput {
464
594
  export interface EstimateInferencePriceRequest {
465
595
  /** 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. */
466
596
  subtitle_preset?: string | null;
467
- /** Caption text colour as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
597
+ /** Caption text color as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
468
598
  subtitle_color?: string | null;
469
- /** Colour of the words the model emphasises, as hex, for models whose capabilities report `subtitle_secondary_color`. */
599
+ /** Color of the words the model emphasizes, as hex, for models whose capabilities report `subtitle_secondary_color`. */
470
600
  subtitle_secondary_color?: string | null;
471
601
  /** Where the captions sit vertically, for models whose capabilities report `subtitle_alignment`. */
472
602
  subtitle_alignment?: "top" | "center" | "bottom" | null;
@@ -605,9 +735,9 @@ export interface EstimateInferencePriceV2Output {
605
735
  export interface EstimateInferencePriceV2Request {
606
736
  /** 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. */
607
737
  subtitle_preset?: string | null;
608
- /** Caption text colour as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
738
+ /** Caption text color as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
609
739
  subtitle_color?: string | null;
610
- /** Colour of the words the model emphasises, as hex, for models whose capabilities report `subtitle_secondary_color`. */
740
+ /** Color of the words the model emphasizes, as hex, for models whose capabilities report `subtitle_secondary_color`. */
611
741
  subtitle_secondary_color?: string | null;
612
742
  /** Where the captions sit vertically, for models whose capabilities report `subtitle_alignment`. */
613
743
  subtitle_alignment?: "top" | "center" | "bottom" | null;
@@ -795,13 +925,13 @@ export interface EstimateInferencePriceV2Request {
795
925
  camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
796
926
  /** Relight the init image: one or more orbit lights, each placed by `rotation` (`yaw` around the subject and `pitch` above or below it, in degrees) with an `intensity` and a `color_hex`. Honored by the models whose capabilities report `scene_lighting`. */
797
927
  scene_lighting?: SceneLightingConfig | null;
798
- /** Draw a game tile onto a grid: its `shape` (`SQUARE` for an isometric diamond, `HEXAGON` for a hex tile) and `orientation` (`POINTY_TOP` or `FLAT_TOP` for a hexagon), the camera `elevation` (30 for 2:1 dimetric; a hexagon takes 60, or 90 from straight above), a `facing` of 0, 90, 180 or 270 for a square, the `footprint_width` x `footprint_depth` in cells (a hexagon covers one), the wall `height` in cell sides (0 for a flat ground tile) and the delivered `tile_width` in pixels. The run draws over a blockout of the grid, so it takes no init image, and the output comes back cut out and fitted onto the grid, its base recorded in the file's `tile` metadata. Honored by the models whose capabilities report `tile_grid`. */
928
+ /** Draw a game tile onto a grid: its `shape` (`SQUARE` for an isometric diamond, `HEXAGON` for a hex tile) and `orientation` (`POINTY_TOP` or `FLAT_TOP` for a hexagon), the camera `elevation` (30 for 2:1 dimetric; a hexagon takes 60, or 90 from straight above), a `facing` of 0, 90, 180 or 270 for a square, the `footprint_width` x `footprint_depth` in cells (a hexagon covers one), the wall `height` in cell sides (0 for a flat ground tile) and the delivered `tile_width` in pixels (unset keeps the cell as drawn, rounded to a power of two). The run draws over a blockout of the grid; an init image is the tile's subject, redrawn onto the grid with its shape and design kept. The output comes back cut out and fitted onto the grid, its base recorded in the file's `tile` metadata. Honored by the models whose capabilities report `tile_grid`. */
799
929
  tile_grid?: TileGrid | null;
800
- /** Fit the image onto its delivery canvas after everything else the run does: `trim` its transparent margin, keep the drawing's own size (`canvas: CONTENT`) or place it on a `FIXED` `width` x `height` canvas, scaled as `scale` says and aligned on `anchor` (`BASE` stands a game tile's base on the bottom centre), with `padding` px of transparent margin and `corner_radius` px rounded corners cut to transparent. Image outputs only. */
930
+ /** 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 center), with `padding` px of transparent margin and `corner_radius` px rounded corners cut to transparent. Image outputs only. */
801
931
  output_fit?: OutputFit | null;
802
- /** Deliver the image as a 9-slice UI element (a button, frame or panel that resizes): after everything else the run does, the plain band through its middle is found on each axis, the edges and centre are made to tile (painted texture kept, light evened out), and the insets are recorded as the file's `nineSlice` metadata. An image with no such band is delivered as drawn, without insets. Image outputs only. */
932
+ /** Deliver the image as a 9-slice UI element (a button, frame or panel that resizes): after everything else the run does, the plain band through its middle is found on each axis, the edges and center are made to tile (painted texture kept, light evened out), and the insets are recorded on the output as `metadata.nine_slice`. An image with no such band is delivered as drawn, its output carrying no `metadata` or no `nine_slice` in it. Image outputs only. */
803
933
  nine_slice?: boolean | null;
804
- /** Split the init image into parallax layers by depth: `layers` (2 to 6, default 5) cut at `cuts`, ascending nearness values in (0, 1), one fewer than the layers (unset cuts at the gaps in the scene's own depth); `loop` makes every layer repeat left to right. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model given no prompt is told to continue the scenery. Delivered as a layered PSD, farthest layer at the bottom, with each layer's scroll speed in the file's `parallax` metadata. Billed as one run of the model per layer but the nearest. */
934
+ /** 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 scene and each plate healed across its wrap by GPT Image 2.5 Flare at high quality. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model is always told to continue the scenery and add nothing in front, and a prompt, if given, describes that 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, and a depth estimate per layer between the farthest and the nearest; a loop adds one heal per layer. */
805
935
  parallax?: ParallaxSplit | null;
806
936
  /** Colors the output should use: `colors`, each a `name` and a `#RRGGBB` `hex` (and an optional `role`), and optionally the `reference_set_id` they were picked from. The provider steers toward the hex values on the models whose capabilities report `max_palette_colors`, which is also the most colors a run takes there. Other models whose prompt describes how the output looks get the colors added to a non-empty prompt; models whose prompt is spoken, set into the output as text, a query, or a description of sound or motion, and text and audio models, ignore it. */
807
937
  color_palette?: InferenceColorPalette | null;
@@ -827,6 +957,8 @@ export interface EstimateTrainingPriceRequest {
827
957
  base_model_id?: string | null;
828
958
  /** Training framework override. Omit for the server default. */
829
959
  training_framework?: "fal" | "ai-toolkit" | null;
960
+ /** Hyperparameters for this run in place of the reference set's saved settings. Each applies only where the run's framework offers it; one the framework does not take is refused. */
961
+ training_parameters?: TrainingOverrides | null;
830
962
  }
831
963
  export interface EstimateTrainingPriceResponse {
832
964
  /** Estimated Creative Units to train this reference set. */
@@ -882,9 +1014,9 @@ export interface ExecuteForgeOutput {
882
1014
  export interface ExecuteInferenceRequest {
883
1015
  /** 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. */
884
1016
  subtitle_preset?: string | null;
885
- /** Caption text colour as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
1017
+ /** Caption text color as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
886
1018
  subtitle_color?: string | null;
887
- /** Colour of the words the model emphasises, as hex, for models whose capabilities report `subtitle_secondary_color`. */
1019
+ /** Color of the words the model emphasizes, as hex, for models whose capabilities report `subtitle_secondary_color`. */
888
1020
  subtitle_secondary_color?: string | null;
889
1021
  /** Where the captions sit vertically, for models whose capabilities report `subtitle_alignment`. */
890
1022
  subtitle_alignment?: "top" | "center" | "bottom" | null;
@@ -1033,9 +1165,9 @@ export interface ExecuteInferenceV2Output {
1033
1165
  export interface ExecuteInferenceV2Request {
1034
1166
  /** 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. */
1035
1167
  subtitle_preset?: string | null;
1036
- /** Caption text colour as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
1168
+ /** Caption text color as hex (`#FFFFFF`), for models whose capabilities report `subtitle_primary_color`. */
1037
1169
  subtitle_color?: string | null;
1038
- /** Colour of the words the model emphasises, as hex, for models whose capabilities report `subtitle_secondary_color`. */
1170
+ /** Color of the words the model emphasizes, as hex, for models whose capabilities report `subtitle_secondary_color`. */
1039
1171
  subtitle_secondary_color?: string | null;
1040
1172
  /** Where the captions sit vertically, for models whose capabilities report `subtitle_alignment`. */
1041
1173
  subtitle_alignment?: "top" | "center" | "bottom" | null;
@@ -1223,13 +1355,13 @@ export interface ExecuteInferenceV2Request {
1223
1355
  camera_trajectory?: Array<CameraTrajectoryKeyframe> | null;
1224
1356
  /** Relight the init image: one or more orbit lights, each placed by `rotation` (`yaw` around the subject and `pitch` above or below it, in degrees) with an `intensity` and a `color_hex`. Honored by the models whose capabilities report `scene_lighting`. */
1225
1357
  scene_lighting?: SceneLightingConfig | null;
1226
- /** Draw a game tile onto a grid: its `shape` (`SQUARE` for an isometric diamond, `HEXAGON` for a hex tile) and `orientation` (`POINTY_TOP` or `FLAT_TOP` for a hexagon), the camera `elevation` (30 for 2:1 dimetric; a hexagon takes 60, or 90 from straight above), a `facing` of 0, 90, 180 or 270 for a square, the `footprint_width` x `footprint_depth` in cells (a hexagon covers one), the wall `height` in cell sides (0 for a flat ground tile) and the delivered `tile_width` in pixels. The run draws over a blockout of the grid, so it takes no init image, and the output comes back cut out and fitted onto the grid, its base recorded in the file's `tile` metadata. Honored by the models whose capabilities report `tile_grid`. */
1358
+ /** Draw a game tile onto a grid: its `shape` (`SQUARE` for an isometric diamond, `HEXAGON` for a hex tile) and `orientation` (`POINTY_TOP` or `FLAT_TOP` for a hexagon), the camera `elevation` (30 for 2:1 dimetric; a hexagon takes 60, or 90 from straight above), a `facing` of 0, 90, 180 or 270 for a square, the `footprint_width` x `footprint_depth` in cells (a hexagon covers one), the wall `height` in cell sides (0 for a flat ground tile) and the delivered `tile_width` in pixels (unset keeps the cell as drawn, rounded to a power of two). The run draws over a blockout of the grid; an init image is the tile's subject, redrawn onto the grid with its shape and design kept. The output comes back cut out and fitted onto the grid, its base recorded in the file's `tile` metadata. Honored by the models whose capabilities report `tile_grid`. */
1227
1359
  tile_grid?: TileGrid | null;
1228
- /** Fit the image onto its delivery canvas after everything else the run does: `trim` its transparent margin, keep the drawing's own size (`canvas: CONTENT`) or place it on a `FIXED` `width` x `height` canvas, scaled as `scale` says and aligned on `anchor` (`BASE` stands a game tile's base on the bottom centre), with `padding` px of transparent margin and `corner_radius` px rounded corners cut to transparent. Image outputs only. */
1360
+ /** 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 center), with `padding` px of transparent margin and `corner_radius` px rounded corners cut to transparent. Image outputs only. */
1229
1361
  output_fit?: OutputFit | null;
1230
- /** Deliver the image as a 9-slice UI element (a button, frame or panel that resizes): after everything else the run does, the plain band through its middle is found on each axis, the edges and centre are made to tile (painted texture kept, light evened out), and the insets are recorded as the file's `nineSlice` metadata. An image with no such band is delivered as drawn, without insets. Image outputs only. */
1362
+ /** Deliver the image as a 9-slice UI element (a button, frame or panel that resizes): after everything else the run does, the plain band through its middle is found on each axis, the edges and center are made to tile (painted texture kept, light evened out), and the insets are recorded on the output as `metadata.nine_slice`. An image with no such band is delivered as drawn, its output carrying no `metadata` or no `nine_slice` in it. Image outputs only. */
1231
1363
  nine_slice?: boolean | null;
1232
- /** Split the init image into parallax layers by depth: `layers` (2 to 6, default 5) cut at `cuts`, ascending nearness values in (0, 1), one fewer than the layers (unset cuts at the gaps in the scene's own depth); `loop` makes every layer repeat left to right. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model given no prompt is told to continue the scenery. Delivered as a layered PSD, farthest layer at the bottom, with each layer's scroll speed in the file's `parallax` metadata. Billed as one run of the model per layer but the nearest. */
1364
+ /** 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 scene and each plate healed across its wrap by GPT Image 2.5 Flare at high quality. The model fills in what each layer hides, so it must be an image eraser or inpainting model (an `ERASE_OBJECT` or `INPAINTING` use case); an inpainting model is always told to continue the scenery and add nothing in front, and a prompt, if given, describes that 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, and a depth estimate per layer between the farthest and the nearest; a loop adds one heal per layer. */
1233
1365
  parallax?: ParallaxSplit | null;
1234
1366
  /** Colors the output should use: `colors`, each a `name` and a `#RRGGBB` `hex` (and an optional `role`), and optionally the `reference_set_id` they were picked from. The provider steers toward the hex values on the models whose capabilities report `max_palette_colors`, which is also the most colors a run takes there. Other models whose prompt describes how the output looks get the colors added to a non-empty prompt; models whose prompt is spoken, set into the output as text, a query, or a description of sound or motion, and text and audio models, ignore it. */
1235
1367
  color_palette?: InferenceColorPalette | null;
@@ -1253,9 +1385,9 @@ export interface ExecuteInferenceV2Request {
1253
1385
  session_name?: string | null;
1254
1386
  /** Organize this run under this session, from GET /v2/workspaces/{workspace_id}/sessions. Takes precedence over `session_name`, and must belong to this workspace. */
1255
1387
  session_id?: string | null;
1256
- /** 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. */
1388
+ /** 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 behavior. */
1257
1389
  webhook?: WebhookInput | null;
1258
- /** The Layer tool this run is, such as `image.upscale`, so the asset it makes reopens in that tool in the Layer app. The run must be one the tool makes: a `base_model_id` from the tool's models, with every value the tool fixes left as the tool sets it. A run that is not is refused with a 422 naming why (`UNKNOWN_INFERENCE_TOOL`, `INFERENCE_TOOL_MODEL_NOT_IN_POOL`, `INFERENCE_TOOL_PIN_MISMATCH`, `INFERENCE_TOOL_NO_REFRAME` or `INFERENCE_TOOL_UPSCALE_COPIES_SOURCE`). */
1390
+ /** The Layer tool this run is, such as `image.upscale`, so the asset it makes reopens in that tool in the Layer app. The run must be one the tool makes: a `base_model_id` from the tool's models, with every value the tool fixes left as the tool sets it. A run that is not is refused with a 422 naming why (`UNKNOWN_INFERENCE_TOOL`, `INFERENCE_TOOL_MODEL_NOT_IN_POOL`, `INFERENCE_TOOL_PIN_MISMATCH`, `INFERENCE_TOOL_MODEL_TAKES_NO_MASK`, `INFERENCE_TOOL_NO_REFRAME` or `INFERENCE_TOOL_UPSCALE_COPIES_SOURCE`). */
1259
1391
  inference_tool_key?: string | null;
1260
1392
  }
1261
1393
  export interface ExecuteWorkflowOutput {
@@ -1281,14 +1413,14 @@ export interface ExecuteWorkflowRequest {
1281
1413
  session_id?: string | null;
1282
1414
  /** Session name. Creates a new session if not found in the workspace. Ignored if session_id is set. */
1283
1415
  session_name?: string | null;
1284
- /** 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. */
1416
+ /** 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 behavior. */
1285
1417
  webhook?: WebhookInput | null;
1286
1418
  }
1287
1419
  export type FileContentCategory = "image" | "video" | "mesh" | "audio" | "pose" | "safetensors" | "playable" | "spine" | "font" | "world" | "pbr_materials" | "other";
1288
1420
  export interface FileDependencyOutput {
1289
1421
  /** What depends on the file: `style`, `reference_set`, `workflow`, `skill`, `template`, `content_policy_rule`, `base_model`, `workspace_share`, `trend`, `ua_creative`, `export` or `scoring_run`. */
1290
1422
  kind: string;
1291
- /** Id of the thing that depends on the file. */
1423
+ /** ID of the thing that depends on the file. */
1292
1424
  owner_id: string;
1293
1425
  /** Its name, when it has one. */
1294
1426
  owner_name: string | null;
@@ -1408,7 +1540,7 @@ export interface ForgeVideoEffectInput {
1408
1540
  export interface GetForgeRunOutput {
1409
1541
  /** Unique identifier for this forge run. */
1410
1542
  inference_id: string;
1411
- /** Current status: in_progress, complete, failed, cancelled, or deleted. */
1543
+ /** Current status: in_progress, complete, failed, canceled, or deleted. */
1412
1544
  status: InferenceStatus;
1413
1545
  /** Suggested polling interval in seconds. Present while IN_PROGRESS. */
1414
1546
  poll_interval_seconds?: number | null;
@@ -1426,7 +1558,7 @@ export interface GetForgeRunOutput {
1426
1558
  export interface GetInferenceRunV2Output {
1427
1559
  /** Unique identifier for this inference run. */
1428
1560
  inference_id: string;
1429
- /** Current status: in_progress, complete, failed, cancelled, or deleted. */
1561
+ /** Current status: in_progress, complete, failed, canceled, or deleted. */
1430
1562
  status: InferenceStatus;
1431
1563
  /** Suggested polling interval in seconds. Present while IN_PROGRESS. */
1432
1564
  poll_interval_seconds?: number | null;
@@ -1515,6 +1647,8 @@ export interface GetTrainingRunResponse {
1515
1647
  eta_at?: string | null;
1516
1648
  started_at?: string | null;
1517
1649
  finished_at?: string | null;
1650
+ /** The hyperparameters this run trains with. */
1651
+ training_parameters: TrainingParametersView;
1518
1652
  /** Error message. Present only on terminal_failure. */
1519
1653
  error?: string | null;
1520
1654
  /** Machine-readable error code. Present on terminal_failure. */
@@ -1522,10 +1656,48 @@ export interface GetTrainingRunResponse {
1522
1656
  /** The callback attached to this run and how its delivery has gone. Null when the run was submitted without one. */
1523
1657
  webhook?: WebhookStatusView | null;
1524
1658
  }
1659
+ export interface GetTrendOutput {
1660
+ /** The trend's id; read its full detail with the get-trend call. */
1661
+ trend_id: string;
1662
+ /** `creative` for a pattern distilled from mobile game UA video ads, `top` for a public board entry. */
1663
+ type: TrendType;
1664
+ /** The name of the trend. */
1665
+ title: string;
1666
+ /** What the trend is and why it works; empty while a board trend's research runs. */
1667
+ summary: string;
1668
+ /** Descriptive tags. */
1669
+ tags?: Array<string>;
1670
+ /** Game genres the trend shows up in. */
1671
+ genres?: Array<string>;
1672
+ /** Countries the trend was seen in. */
1673
+ countries?: Array<string>;
1674
+ /** How many distinct ads show a `creative` trend; 0 for a `top` trend. */
1675
+ match_count: number;
1676
+ /** Board slug, such as `tiktok`, for a `top` trend. */
1677
+ source?: string | null;
1678
+ /** Place on the board's latest refresh, for a `top` trend. */
1679
+ rank?: number | null;
1680
+ /** Place on the refresh before; null on a `top` trend means it is newly charted. */
1681
+ previous_rank?: number | null;
1682
+ /** When the board placement was recorded. */
1683
+ ranked_at?: string | null;
1684
+ /** When the trend was first recorded. */
1685
+ created_at: string;
1686
+ /** The ad beat by beat, for a `creative` trend. */
1687
+ scenario?: string;
1688
+ /** Why the pattern works and where it fits. */
1689
+ notes?: string | null;
1690
+ /** Alternative angles on the same pattern, for a `creative` trend. */
1691
+ variants?: Array<TrendVariantOutput>;
1692
+ /** Web research on a `top` trend: summary, remix ideas, grounded findings with sources, YouTube videos with a highlight window, and images. Null while the research runs. */
1693
+ research?: TrendResearchOutput | null;
1694
+ /** Public files that show the trend, in display order: the matched ads for a `creative` trend, the research images for a `top` trend. */
1695
+ reference_files?: Array<TrendReferenceFile>;
1696
+ }
1525
1697
  export interface GetWorkflowRunOutput {
1526
1698
  /** Unique identifier for this workflow run. */
1527
1699
  run_id: string;
1528
- /** Current status: pending, running, success, failure, or cancelled. */
1700
+ /** Current status: pending, running, success, failure, or canceled. */
1529
1701
  status: BlueprintRunStatus;
1530
1702
  /** Suggested polling interval in seconds. Present while PENDING or RUNNING. */
1531
1703
  poll_interval_seconds?: number | null;
@@ -1551,7 +1723,7 @@ export interface GetWorkflowRunOutput {
1551
1723
  export interface GetWorkflowRunStep {
1552
1724
  /** The name of the workflow step */
1553
1725
  name: string;
1554
- /** The execution status of the step: pending, running, success, failure, or cancelled. */
1726
+ /** The execution status of the step: pending, running, success, failure, or canceled. */
1555
1727
  status: BlueprintRunStatus;
1556
1728
  /** The error details if any */
1557
1729
  error?: string | null;
@@ -1578,7 +1750,7 @@ export interface GroupOut {
1578
1750
  name: string;
1579
1751
  /** The workspace role this group grants its members, if any. */
1580
1752
  role?: Role | null;
1581
- /** 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. */
1753
+ /** 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. */
1582
1754
  role_id?: string | null;
1583
1755
  }
1584
1756
  /** What kind of guardrail refused it: one of the guardrails Layer ships, or the workspace's own. */
@@ -1641,6 +1813,32 @@ export interface InferenceReferenceSetInput {
1641
1813
  weight?: number;
1642
1814
  }
1643
1815
  export type InferenceStatus = "in_progress" | "complete" | "failed" | "cancelled" | "deleted";
1816
+ /** Whether a tool makes something new or changes something the user already has. */
1817
+ export type InferenceToolGroup = "generate" | "edit";
1818
+ export interface InferenceToolSource {
1819
+ /** The type of asset the tool works on. */
1820
+ modality: Modality;
1821
+ /** Whether the tool can keep its edit to an area a mask marks. The tool's schema on a base model says whether that model can, in `x-source.takes_mask`. */
1822
+ takes_mask: boolean;
1823
+ }
1824
+ export interface InferenceToolSummary {
1825
+ /** The tool's key, such as `image.upscale`. */
1826
+ key: string;
1827
+ /** The tool's name, as the Layer app shows it. */
1828
+ name: string;
1829
+ /** What the tool does. */
1830
+ description: string;
1831
+ /** `generate` for a tool that makes something new, `edit` for one that changes an asset. */
1832
+ group: InferenceToolGroup;
1833
+ /** The type of asset the tool makes. */
1834
+ modality: Modality;
1835
+ /** What an edit works on; null for a tool that makes something new. */
1836
+ source: InferenceToolSource | null;
1837
+ /** The base models the caller can run the tool on, in catalog order. */
1838
+ base_model_ids: Array<string>;
1839
+ /** The model a run of the tool takes when it names none: the tool's own default, else the caller's first pinned model among `base_model_ids`, else Layer's recommendation for the tool's job. */
1840
+ default_base_model_id: string;
1841
+ }
1644
1842
  export type InferenceUseCase = "text_to_image" | "image_editing" | "multi_angle" | "inpainting" | "reframing" | "split_into_layers" | "text_to_video" | "image_to_video" | "video_editing" | "video_extend" | "insert_video" | "video_subtitle" | "video_lipsync" | "motion_transfer" | "video_object_swap" | "video_character_swap" | "relight_video" | "image_to_video_lipsync" | "text_to_3d" | "image_to_3d" | "text_to_world" | "image_to_world" | "remesh" | "retexture" | "uv_unwrap" | "animate" | "rig" | "segment" | "image_segment" | "image_mask" | "text_to_speech" | "sound_effects" | "music" | "upscaling" | "video_interpolation" | "denoise_image" | "denoise_video" | "denoise_audio" | "voice_change" | "audio_separation" | "audio_isolation" | "deblur_video" | "restore_image" | "sdr_to_hdr_video" | "background_removal" | "vectorization" | "virtual_try_on" | "restyle" | "pixelate" | "colorize" | "change_expression" | "erase_object" | "edit_text" | "dub_video" | "extend_audio" | "generate_pbr_materials" | "create_skybox" | "complete_draft";
1645
1843
  /** Delivered when an inference run reaches a terminal state. */
1646
1844
  export interface InferenceWebhookEvent {
@@ -1670,7 +1868,12 @@ export interface IssuedDeviceCode {
1670
1868
  expires_in: number;
1671
1869
  interval: number;
1672
1870
  }
1871
+ export type JsonValue = unknown;
1673
1872
  export type LibraryObjectType = "directory" | "file" | "asset" | "style" | "blueprint" | "skill";
1873
+ export interface ListAiPoliciesOutput {
1874
+ policies: Array<AiPolicyRecord>;
1875
+ pagination: PaginationOutput;
1876
+ }
1674
1877
  export interface ListBaseModelsOutput {
1675
1878
  base_models: Array<BaseModelSummary>;
1676
1879
  pagination: PaginationOutput;
@@ -1683,6 +1886,10 @@ export interface ListGroupsOutput {
1683
1886
  groups: Array<GroupOut>;
1684
1887
  pagination: PaginationOutput;
1685
1888
  }
1889
+ export interface ListInferenceToolsOutput {
1890
+ inference_tools: Array<InferenceToolSummary>;
1891
+ pagination: PaginationOutput;
1892
+ }
1686
1893
  export interface ListMembersOutput {
1687
1894
  members: Array<MemberOutput>;
1688
1895
  pagination: PaginationOutput;
@@ -1715,6 +1922,10 @@ export interface ListTrainingRunsResponse {
1715
1922
  runs: Array<TrainingRunSummary>;
1716
1923
  pagination: PaginationOutput;
1717
1924
  }
1925
+ export interface ListTrendsOutput {
1926
+ trends: Array<TrendSummary>;
1927
+ pagination: PaginationOutput;
1928
+ }
1718
1929
  export interface ListWorkflowsOutput {
1719
1930
  workflows: Array<WorkflowSummary>;
1720
1931
  pagination: PaginationOutput;
@@ -1839,7 +2050,7 @@ export interface MusicSection {
1839
2050
  /**
1840
2051
  * The insets a 9-slice draws a UI element by, in the image's own pixels in from each edge.
1841
2052
  *
1842
- * The corners are drawn at their own size, the edges repeat along their length, and the centre
2053
+ * The corners are drawn at their own size, the edges repeat along their length, and the center
1843
2054
  * repeats both ways.
1844
2055
  */
1845
2056
  export interface NineSliceMetadataView {
@@ -1928,8 +2139,8 @@ export interface OutputFit {
1928
2139
  /**
1929
2140
  * The point of the drawing that lands on the same point of the canvas.
1930
2141
  *
1931
- * ``BASE`` is a game tile's base: its anchor, the bottom centre of the cell it stands on, lands
1932
- * at the bottom centre of the canvas, so tiles of one grid stand on the same point whatever rises above them.
2142
+ * ``BASE`` is a game tile's base: its anchor, the bottom center of the cell it stands on, lands
2143
+ * at the bottom center of the canvas, so tiles of one grid stand on the same point whatever rises above them.
1933
2144
  */
1934
2145
  export type OutputFitAnchor = "TOP_LEFT" | "TOP_CENTER" | "TOP_RIGHT" | "CENTER_LEFT" | "CENTER" | "CENTER_RIGHT" | "BOTTOM_LEFT" | "BOTTOM_CENTER" | "BOTTOM_RIGHT" | "BASE";
1935
2146
  export type OutputFitCanvas = "CONTENT" | "FIXED";
@@ -1974,11 +2185,13 @@ export interface ProjectDetail {
1974
2185
  name: string;
1975
2186
  /** Project status: active or archived. */
1976
2187
  status: ProjectStatus;
2188
+ /** Who can reach the project's sessions and the work made in them. `workspace`: workspace members with project access. `members`: the project's own members only; workspace admins outside the project are refused too. */
2189
+ visibility: ProjectVisibility;
1977
2190
  /** Number of library objects currently linked to this project. */
1978
2191
  object_count: number;
1979
2192
  /** The project's long-form description, if set. */
1980
2193
  description?: string | null;
1981
- /** Project-specific instructions that guide content created within it, if set. Deprecated: attach a skill to the project instead. Honoured while it holds text, and read back as null once the project's instructions have been converted into a project-attached skill. */
2194
+ /** Project-specific instructions that guide content created within it, if set. Deprecated: attach a skill to the project instead. Honored while it holds text, and read back as null once the project's instructions have been converted into a project-attached skill. */
1982
2195
  instructions?: string | null;
1983
2196
  }
1984
2197
  export interface ProjectMember {
@@ -1999,9 +2212,19 @@ export interface ProjectSummary {
1999
2212
  name: string;
2000
2213
  /** Project status: active or archived. */
2001
2214
  status: ProjectStatus;
2215
+ /** Who can reach the project's sessions and the work made in them. `workspace`: workspace members with project access. `members`: the project's own members only; workspace admins outside the project are refused too. */
2216
+ visibility: ProjectVisibility;
2002
2217
  /** Number of library objects currently linked to this project. */
2003
2218
  object_count: number;
2004
2219
  }
2220
+ /**
2221
+ * Who may reach a project's sessions and the files and inferences made in them.
2222
+ *
2223
+ * ``WORKSPACE`` is every member of the workspace who holds the permission. ``MEMBERS``
2224
+ * is the project's own members only: a workspace admin outside the project is refused
2225
+ * like anyone else, and reads the project's activity through the audit log alone.
2226
+ */
2227
+ export type ProjectVisibility = "workspace" | "members";
2005
2228
  /**
2006
2229
  * How much effort the provider spends rewriting the prompt before it generates.
2007
2230
  *
@@ -2071,8 +2294,28 @@ export interface RequestUploadUrlResponse {
2071
2294
  /** Source type the file was created with, echoed from the request. */
2072
2295
  source_type?: FileSourceType | null;
2073
2296
  }
2297
+ export interface Resolved_JsonValue_ {
2298
+ value: JsonValue;
2299
+ source?: AiPolicySource | null;
2300
+ }
2301
+ export interface Resolved_Union_UsageCap__NoneType__ {
2302
+ value: UsageCap | null;
2303
+ source?: AiPolicySource | null;
2304
+ }
2305
+ export interface Resolved_bool_ {
2306
+ value: boolean;
2307
+ source?: AiPolicySource | null;
2308
+ }
2309
+ export interface Resolved_float_ {
2310
+ value: number;
2311
+ source?: AiPolicySource | null;
2312
+ }
2313
+ export interface Resolved_int_ {
2314
+ value: number;
2315
+ source?: AiPolicySource | null;
2316
+ }
2074
2317
  export interface RestoreDeletedFilesOutput {
2075
- /** Files restored. Ids not in the trash are left silently. */
2318
+ /** Files restored. IDs not in the trash are left silently. */
2076
2319
  restored_files: number;
2077
2320
  /** Bytes those files hold. */
2078
2321
  restored_bytes: number;
@@ -2084,6 +2327,48 @@ export interface RotateWebhookSecretResponse {
2084
2327
  /** When the previous secret stops signing. Until then both secrets sign every delivery, so a receiver can be updated without dropping anything. */
2085
2328
  previous_secret_expires_at: string;
2086
2329
  }
2330
+ export interface RunInferenceToolInput {
2331
+ /** The base model to run the tool on, by ID, slug, name or alias: one of the tool's `base_model_ids`. Without it, the run takes the tool's `default_base_model_id` for the caller. */
2332
+ base_model_id?: string | null;
2333
+ /** The file an edit works on, from this workspace or public. Required where the tool's schema has `x-source.required`; a tool that makes something new takes none. */
2334
+ source_file_id?: string | null;
2335
+ /** An image the size of the source, white where the edit may change it and black where the source stays as it is. Only where the tool's schema has `x-source.takes_mask`. */
2336
+ mask_file_id?: string | null;
2337
+ /** How many outputs the run makes (1-16). More than 1 needs a tool and a model that batch. */
2338
+ batch_size?: number;
2339
+ /** The fields of the tool's schema on the model (GET .../inference-schema), with files by `file_id`. A field left out takes its default, and the tool sets the values it fixes. */
2340
+ input?: Record<string, unknown>;
2341
+ /** Reference sets to apply, up to 25, from GET /v2/workspaces/{workspace_id}/reference-sets. Some models need one: an ElevenLabs voice for a voice change or speech, an animation preset for Tripo's animate. A run on such a model without one is refused with `REFERENCE_SET_REQUIRED`. */
2342
+ reference_sets?: Array<InferenceReferenceSetInput>;
2343
+ /** Organize this run under the most recent active session with this name, creating one if none matches. Ignored when `session_id` is given. */
2344
+ session_name?: string | null;
2345
+ /** Organize this run under this session, from GET /v2/workspaces/{workspace_id}/sessions. Takes precedence over `session_name`, and must belong to this workspace. */
2346
+ session_id?: string | null;
2347
+ }
2348
+ export interface RunInferenceToolOutput {
2349
+ /** Unique identifier for this forge run. */
2350
+ inference_id: string;
2351
+ /** Current status: IN_PROGRESS. */
2352
+ status: InferenceStatus;
2353
+ /** Estimated price in Creative Units. */
2354
+ estimated_price_creative_units?: number | null;
2355
+ /** Suggested polling interval in seconds. */
2356
+ poll_interval_seconds: number;
2357
+ /** Timestamp of when the run was created. */
2358
+ created_at: string;
2359
+ /** Session ID the run was added to, if a session was specified. */
2360
+ session_id?: string | null;
2361
+ /** Actual parameters used after model-specific normalization and defaults. */
2362
+ normalized_parameters?: NormalizedInferenceParameters | null;
2363
+ /** The base model the run takes: the one named, else the tool's default. */
2364
+ base_model_id: string;
2365
+ /** Per-set summary of what each reference set contributed. */
2366
+ reference_set_contributions?: Array<ForgeReferenceSetContribution>;
2367
+ /** True when at least one attached reference set did not meaningfully contribute. The run still costs Creative Units. */
2368
+ reference_sets_degraded?: boolean;
2369
+ /** Names each degraded reference set and why, or null when none is degraded. */
2370
+ reference_sets_warning?: string | null;
2371
+ }
2087
2372
  export interface RunRefusal {
2088
2373
  /** The generation that was refused. */
2089
2374
  inference_id: string;
@@ -2103,13 +2388,13 @@ export interface ScoreFilesBody {
2103
2388
  project_id?: string | null;
2104
2389
  /** Score against these rules only. Empty runs every rule in force for the scope. */
2105
2390
  rule_ids?: Array<string>;
2106
- /** Deliver this run's terminal event to a URL instead of polling for it. See the Webhooks section of this document for the payload, headers and retry behaviour. */
2391
+ /** Deliver this run's terminal event to a URL instead of polling for it. See the Webhooks section of this document for the payload, headers and retry behavior. */
2107
2392
  webhook?: WebhookInput | null;
2108
2393
  }
2109
2394
  export interface ScoreFilesOutput {
2110
2395
  /** Handle for this batch. Poll `GET /v1/workspaces/{workspace_id}/scoring-runs/{id}` for its verdicts. Null when no rule was in force, which queues nothing. */
2111
2396
  scoring_run_id?: string | null;
2112
- /** How many (file, rule) judgements were queued — one model call each. */
2397
+ /** How many (file, rule) judgments were queued — one model call each. */
2113
2398
  requested_pair_count: number;
2114
2399
  /** How many files were accepted for scoring. */
2115
2400
  file_count: number;
@@ -2264,13 +2549,33 @@ export interface SetUsageLimitBody {
2264
2549
  /** Percent of the cap at which members are warned. */
2265
2550
  warn_threshold_pct?: number;
2266
2551
  }
2552
+ export interface Setting_Annotated_float__Ge__ {
2553
+ value: number;
2554
+ locked?: boolean;
2555
+ }
2556
+ export interface Setting_Annotated_int__FieldInfo_annotation_NoneType__required_True__metadata__Ge_ge_1___Le_le_6_____ {
2557
+ value: number;
2558
+ locked?: boolean;
2559
+ }
2560
+ export interface Setting_JsonValue_ {
2561
+ value: JsonValue;
2562
+ locked?: boolean;
2563
+ }
2564
+ export interface Setting_Union_UsageCap__NoneType__ {
2565
+ value: UsageCap | null;
2566
+ locked?: boolean;
2567
+ }
2568
+ export interface Setting_bool_ {
2569
+ value: boolean;
2570
+ locked?: boolean;
2571
+ }
2267
2572
  export interface SkippedFile {
2268
2573
  file_id: string;
2269
2574
  /** 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). */
2270
2575
  reason: "not_found" | "foreign_workspace" | "already_member" | "duplicate_in_request";
2271
2576
  }
2272
2577
  export interface SkippedFileOutput {
2273
- /** Id of the file left. */
2578
+ /** ID of the file left. */
2274
2579
  file_id: string;
2275
2580
  /** What holds the file, and what to do about it. */
2276
2581
  message: string;
@@ -2299,7 +2604,7 @@ export interface SpriteSheetFrameView {
2299
2604
  w: number;
2300
2605
  /** The frame's height in pixels. */
2301
2606
  h: number;
2302
- /** 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. */
2607
+ /** The point the frame is placed by, in pixels from the frame's top-left corner. Null when the frames were registered by centering them in their cells. */
2303
2608
  anchor?: TilePointView | null;
2304
2609
  }
2305
2610
  /**
@@ -2318,7 +2623,7 @@ export interface SpriteSheetMetadataView {
2318
2623
  cell_height: number;
2319
2624
  /** Pixels between the sheet's edges and the outer cells. */
2320
2625
  margin: number;
2321
- /** Pixels between neighbouring cells. */
2626
+ /** Pixels between neighboring cells. */
2322
2627
  spacing: number;
2323
2628
  /** The frames, in play order: left to right, then top to bottom, unless the list orders them otherwise. */
2324
2629
  frames: Array<SpriteSheetFrameView>;
@@ -2332,7 +2637,9 @@ export interface StartTrainingRequest {
2332
2637
  base_model_id?: string | null;
2333
2638
  /** Training framework override. Omit for the server default. */
2334
2639
  training_framework?: "fal" | "ai-toolkit" | null;
2335
- /** 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. */
2640
+ /** Hyperparameters for this run in place of the reference set's saved settings. Each applies only where the run's framework offers it; one the framework does not take is refused. */
2641
+ training_parameters?: TrainingOverrides | null;
2642
+ /** 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 behavior. */
2336
2643
  webhook?: WebhookInput | null;
2337
2644
  }
2338
2645
  export interface StartTrainingResponse {
@@ -2382,7 +2689,7 @@ export interface StorageSliceOutput {
2382
2689
  /** Whether a file is the output of a generation, or something a person put in the workspace. */
2383
2690
  export type StoredFileOrigin = "generated" | "uploaded";
2384
2691
  export interface StoredFileOutput {
2385
- /** Id of the file. */
2692
+ /** ID of the file. */
2386
2693
  file_id: string;
2387
2694
  /** The file's name. */
2388
2695
  name: string;
@@ -2442,7 +2749,7 @@ export interface TileGrid {
2442
2749
  footprint_width?: number;
2443
2750
  footprint_depth?: number;
2444
2751
  height?: number;
2445
- tile_width?: number;
2752
+ tile_width?: number | null;
2446
2753
  light_from?: TileLightSide;
2447
2754
  }
2448
2755
  /** The side the key light comes from, seen from the camera. */
@@ -2467,9 +2774,9 @@ export interface TileMetadataView {
2467
2774
  tile_width: number;
2468
2775
  /** Height in pixels of one cell's base outline in the sprite. */
2469
2776
  tile_height: number;
2470
- /** 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). */
2777
+ /** The point the tile is placed by: the bottom center of the cell it stands on (the front cell of a footprint wider than one). */
2471
2778
  anchor: TilePointView;
2472
- /** The centre of the anchor's cell. Godot and Unity pin a tile here rather than at the anchor. */
2779
+ /** The center of the anchor's cell. Godot and Unity pin a tile here rather than at the anchor. */
2473
2780
  cell_center: TilePointView;
2474
2781
  /** The footprint's whole base outline, clockwise on screen from the anchor's vertex or edge. */
2475
2782
  base_outline: Array<TilePointView>;
@@ -2534,6 +2841,39 @@ export interface TrainedModelResponse {
2534
2841
  /** Whether this finetune is the active one for the run's base model. */
2535
2842
  is_active: boolean;
2536
2843
  }
2844
+ /**
2845
+ * Hyperparameters one training run takes in place of the reference set's saved config.
2846
+ *
2847
+ * Each one applies only where the run's framework offers it (TrainingFrameworkDefaults.supports_parameter);
2848
+ * unset fields keep the saved value.
2849
+ */
2850
+ export interface TrainingOverrides {
2851
+ /** Number of passes over the training images. */
2852
+ epochs?: number | null;
2853
+ /** Times each image is seen within one epoch, so one epoch is (images x repeats) steps. Offered by the kohya and ai-toolkit frameworks only. */
2854
+ repeats?: number | null;
2855
+ /** Optimizer learning rate. */
2856
+ learning_rate?: number | null;
2857
+ /** LoRA rank (network dimension). */
2858
+ lora_rank?: number | null;
2859
+ }
2860
+ /**
2861
+ * The hyperparameters a training run trains with, as the public API reports them.
2862
+ *
2863
+ * The class name is an OpenAPI schema component name and so is public API.
2864
+ */
2865
+ export interface TrainingParametersView {
2866
+ /** Training framework the run uses (e.g. fal, kohya). */
2867
+ framework?: string | null;
2868
+ /** Number of passes over the training images the run trains, after capping to the framework's step limit. */
2869
+ epochs?: number | null;
2870
+ /** Times each image is seen within one epoch. Null on frameworks that do not take repeats. */
2871
+ repeats?: number | null;
2872
+ /** Optimizer learning rate. */
2873
+ learning_rate?: number | null;
2874
+ /** LoRA rank (network dimension). */
2875
+ lora_rank?: number | null;
2876
+ }
2537
2877
  export interface TrainingRunSummary {
2538
2878
  training_run_id: string;
2539
2879
  reference_set_id: string;
@@ -2556,10 +2896,115 @@ export interface TrainingWebhookEvent {
2556
2896
  /** Whatever you sent as webhook.metadata. */
2557
2897
  metadata?: Record<string, string>;
2558
2898
  }
2899
+ export interface TrendReferenceFile {
2900
+ /** Public file to pass by id as generation guidance, such as a reference video or image. */
2901
+ file_id: string;
2902
+ /** Download URL for the file. */
2903
+ url: string;
2904
+ /** MIME type, e.g. video/mp4 or image/jpeg. */
2905
+ content_type: string;
2906
+ /** Length of a video; null when not probed. */
2907
+ duration_seconds?: number | null;
2908
+ /** Pixel width; null when not probed. */
2909
+ width?: number | null;
2910
+ /** Pixel height; null when not probed. */
2911
+ height?: number | null;
2912
+ }
2913
+ export interface TrendResearchFindingOutput {
2914
+ /** What the finding is about. */
2915
+ topic: string;
2916
+ /** The grounded claim. */
2917
+ finding: string;
2918
+ /** Pages that back the claim. */
2919
+ source_urls?: Array<string>;
2920
+ }
2921
+ export interface TrendResearchImageOutput {
2922
+ /** The image as a public file; it is also among the reference files. */
2923
+ file_id: string;
2924
+ /** Page the image was found on. */
2925
+ source_url: string;
2926
+ /** One line on what the image shows. */
2927
+ shows: string;
2928
+ }
2929
+ export interface TrendResearchOutput {
2930
+ /** What the trend is and which media carries it. */
2931
+ summary: string;
2932
+ /** Angles for adapting the trend to game UA video ads. */
2933
+ remix_ideas: string;
2934
+ /** Grounded claims. */
2935
+ findings?: Array<TrendResearchFindingOutput>;
2936
+ /** Pages consulted. */
2937
+ sources?: Array<TrendResearchSourceOutput>;
2938
+ /** Videos that show the trend. */
2939
+ videos?: Array<TrendResearchVideoOutput>;
2940
+ /** Stills that show the trend. */
2941
+ images?: Array<TrendResearchImageOutput>;
2942
+ /** Gaps the research could not close. */
2943
+ uncertainties?: Array<string>;
2944
+ /** When the research ran. */
2945
+ researched_at: string;
2946
+ }
2947
+ export interface TrendResearchSourceOutput {
2948
+ /** Title of a page the research consulted. */
2949
+ title: string;
2950
+ /** Address of the page. */
2951
+ url: string;
2952
+ }
2953
+ export interface TrendResearchVideoOutput {
2954
+ /** YouTube address of the video; it is not downloaded. */
2955
+ url: string;
2956
+ /** Title of the video. */
2957
+ title: string;
2958
+ /** Channel that published it. */
2959
+ channel: string;
2960
+ /** Length of the video; null when unknown. */
2961
+ duration_seconds?: number | null;
2962
+ /** Start of the part that shows the trend. */
2963
+ start_seconds: number;
2964
+ /** End of the part that shows the trend. */
2965
+ end_seconds: number;
2966
+ /** What that part demonstrates. */
2967
+ why: string;
2968
+ }
2969
+ export interface TrendSummary {
2970
+ /** The trend's id; read its full detail with the get-trend call. */
2971
+ trend_id: string;
2972
+ /** `creative` for a pattern distilled from mobile game UA video ads, `top` for a public board entry. */
2973
+ type: TrendType;
2974
+ /** The name of the trend. */
2975
+ title: string;
2976
+ /** What the trend is and why it works; empty while a board trend's research runs. */
2977
+ summary: string;
2978
+ /** Descriptive tags. */
2979
+ tags?: Array<string>;
2980
+ /** Game genres the trend shows up in. */
2981
+ genres?: Array<string>;
2982
+ /** Countries the trend was seen in. */
2983
+ countries?: Array<string>;
2984
+ /** How many distinct ads show a `creative` trend; 0 for a `top` trend. */
2985
+ match_count: number;
2986
+ /** Board slug, such as `tiktok`, for a `top` trend. */
2987
+ source?: string | null;
2988
+ /** Place on the board's latest refresh, for a `top` trend. */
2989
+ rank?: number | null;
2990
+ /** Place on the refresh before; null on a `top` trend means it is newly charted. */
2991
+ previous_rank?: number | null;
2992
+ /** When the board placement was recorded. */
2993
+ ranked_at?: string | null;
2994
+ /** When the trend was first recorded. */
2995
+ created_at: string;
2996
+ }
2997
+ export type TrendType = "creative" | "top";
2998
+ export interface TrendVariantOutput {
2999
+ /** Short name of the variant. */
3000
+ label: string;
3001
+ /** How this angle differs from the main pattern. */
3002
+ description: string;
3003
+ }
2559
3004
  export interface UpdateGroupBody {
2560
3005
  /** New builtin role to grant members. Send null with no role_id to clear the group's role. */
2561
3006
  role: Role | null;
2562
- /** Id of a custom role to grant instead of a builtin `role`. */
3007
+ /** ID of a custom role to grant instead of a builtin `role`. */
2563
3008
  role_id?: string | null;
2564
3009
  }
2565
3010
  export interface UpdateMemberBody {
@@ -2571,15 +3016,23 @@ export interface UpdateMemberBody {
2571
3016
  export interface UpdateProjectBody {
2572
3017
  name?: string | null;
2573
3018
  description?: string | null;
2574
- /** Deprecated: attach a skill to the project instead. Honoured while it holds text, and read back as null once the project's instructions have been converted into a project-attached skill. */
3019
+ /** Deprecated: attach a skill to the project instead. Honored while it holds text, and read back as null once the project's instructions have been converted into a project-attached skill. */
2575
3020
  instructions?: string | null;
2576
3021
  /** Set true to archive, false to unarchive. Omit to leave unchanged. */
2577
3022
  archived?: boolean | null;
3023
+ /** Who can reach the project's sessions and the work made in them. `workspace`: workspace members with project access. `members`: the project's own members only; workspace admins outside the project are refused too. Only a member of the project can change it. Omit to leave unchanged. */
3024
+ visibility?: ProjectVisibility | null;
2578
3025
  }
2579
3026
  export interface UpdateSessionBody {
2580
3027
  /** The session's new display name. */
2581
3028
  name: string;
2582
3029
  }
3030
+ /** A cap on the Creative Units each member may spend in a workspace over one period, as a policy sets it. */
3031
+ export interface UsageCap {
3032
+ cu_limit: number;
3033
+ mode: UsageLimitMode;
3034
+ warn_threshold_pct: number;
3035
+ }
2583
3036
  /** What a cap does once its member has used all of it. */
2584
3037
  export type UsageLimitMode = "warn" | "block";
2585
3038
  /** How often a usage cap resets: at midnight UTC, on Monday, or on the 1st of the month. */
@@ -9,10 +9,10 @@ export interface BaseModelListOptions extends ListOptions {
9
9
  search?: string;
10
10
  }
11
11
  /**
12
- * The model catalogue, as this workspace may run it.
12
+ * The model catalog, as this workspace may run it.
13
13
  *
14
14
  * Read it rather than hard-coding ids: which models a workspace can reach depends on its
15
- * plan and its policy, and the catalogue changes without an SDK release.
15
+ * plan and its policy, and the catalog changes without an SDK release.
16
16
  */
17
17
  export declare class BaseModels {
18
18
  private readonly http;
@@ -1,9 +1,9 @@
1
1
  import { walkPages } from "../pagination.js";
2
2
  /**
3
- * The model catalogue, as this workspace may run it.
3
+ * The model catalog, as this workspace may run it.
4
4
  *
5
5
  * Read it rather than hard-coding ids: which models a workspace can reach depends on its
6
- * plan and its policy, and the catalogue changes without an SDK release.
6
+ * plan and its policy, and the catalog changes without an SDK release.
7
7
  */
8
8
  export class BaseModels {
9
9
  http;
@@ -56,7 +56,7 @@ export declare class Inferences {
56
56
  /**
57
57
  * Poll a run until it finishes, and throw if it finished badly.
58
58
  *
59
- * The server says how often to ask, and that interval is honoured rather than guessed:
59
+ * The server says how often to ask, and that interval is honored rather than guessed:
60
60
  * it is how a busy deployment tells clients to back off.
61
61
  */
62
62
  wait(inferenceId: string, options?: WaitOptions): Promise<GetInferenceRunV2Output>;
@@ -60,7 +60,7 @@ export class Inferences {
60
60
  /**
61
61
  * Poll a run until it finishes, and throw if it finished badly.
62
62
  *
63
- * The server says how often to ask, and that interval is honoured rather than guessed:
63
+ * The server says how often to ask, and that interval is honored rather than guessed:
64
64
  * it is how a busy deployment tells clients to back off.
65
65
  */
66
66
  async wait(inferenceId, options = {}) {
package/dist/types.d.ts CHANGED
@@ -27,7 +27,7 @@ export type WorkspaceUsage = WorkspaceUsageOutput;
27
27
  export type Project = ProjectSummary;
28
28
  /** A single project, with everything a list omits. */
29
29
  export type ProjectWithDetail = ProjectDetail;
30
- /** A base model in the catalogue. */
30
+ /** A base model in the catalog. */
31
31
  export type BaseModel = BaseModelSummary;
32
32
  /** A single base model, with its full capabilities. */
33
33
  export type BaseModelWithDetail = BaseModelDetail;
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.0.70";
1
+ export const VERSION = "1.0.82";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layer_ai/sdk",
3
- "version": "1.0.70",
3
+ "version": "1.0.82",
4
4
  "description": "Official JavaScript and TypeScript SDK for Layer \u2014 AI asset creation for game studios.",
5
5
  "keywords": [
6
6
  "ai",