@layer_ai/sdk 1.0.0

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.
@@ -0,0 +1,1443 @@
1
+ /**
2
+ * Wire types for the Layer REST API.
3
+ *
4
+ * Generated from the backend's OpenAPI description by `task -d apps/sdk-ts generate-types`.
5
+ * Do not edit: CI regenerates this file and fails on any difference.
6
+ */
7
+ export interface AddGroupMemberBody {
8
+ /** Id of the workspace member to add to the group. */
9
+ user_id: string;
10
+ }
11
+ export interface AddProjectMembersBody {
12
+ /** Ids of workspace members to add. All must already be active workspace members. */
13
+ user_ids: Array<string>;
14
+ }
15
+ /**
16
+ * Container for a delivered audio file.
17
+ *
18
+ * Providers name these their own way and Layer never re-encodes what one returns, so the
19
+ * format a caller asks for is only keepable on models whose capabilities list it. Members are
20
+ * named for their wire value: the frontend artifacts preserve enum *names*, and a name that
21
+ * differed from the value would hand clients a format string the request API rejects.
22
+ */
23
+ export type AudioOutputFormat = "mp3" | "wav" | "aac" | "flac";
24
+ /** ToolModelCapabilities without the MCP token-saving serializer — returns all fields for REST. */
25
+ export interface BaseModelCapabilitiesREST {
26
+ /** Supported modes: create, create_video, create_3_d, create_speech, create_sound_effect, prompt_edit_image, etc. */
27
+ session_modes?: Array<string>;
28
+ text_prompt?: boolean;
29
+ text_prompt_required?: boolean;
30
+ negative_prompt?: boolean;
31
+ seed?: boolean;
32
+ inpainting?: boolean;
33
+ outpainting?: boolean;
34
+ tileability?: boolean;
35
+ /** Supported guidance inputs and their per-type file limits. `init_image` is the source image an edit model modifies; `reference_image` supplies subjects to reproduce; `ip_adapter` is legacy IP-Adapter style-only transfer. */
36
+ guidance_file_types?: Array<ToolGuidanceFileTypeSupport>;
37
+ /** Supported video durations in seconds */
38
+ duration_seconds?: Array<number>;
39
+ /** Audio models: shortest clip this model generates, in seconds. */
40
+ duration_seconds_min?: number | null;
41
+ /** Audio models: longest clip this model generates, in seconds. Pass duration_seconds between the min and max; a request outside them is refused. */
42
+ duration_seconds_max?: number | null;
43
+ /** This model has no default clip length; without duration_seconds the shortest is used. */
44
+ duration_seconds_required?: boolean;
45
+ generate_audio?: boolean;
46
+ lipsync?: boolean;
47
+ textures?: boolean;
48
+ quad_mesh?: boolean;
49
+ pbr_materials?: boolean;
50
+ generate_parts?: boolean;
51
+ text_to_speech?: boolean;
52
+ sound_effect?: boolean;
53
+ /** Composes music. Distinguishes a music model from a sound-effect model, which the modality and the duration range alone do not. */
54
+ music?: boolean;
55
+ /** Takes sung words in a dedicated lyrics input, separate from the text prompt. This describes the input shape, not whether the model can sing: some families read lyrics written into the prompt instead, so a false value is not a reason to rule a model out for a song. */
56
+ lyrics?: boolean;
57
+ /** The model sets the output length itself, from the text or the input file. It has no duration control, so duration_seconds is ignored: do not promise a requested length. */
58
+ auto_duration?: boolean;
59
+ /** Takes a flag that guarantees no vocals. On other music models, asking for an instrumental in the prompt is only a suggestion. */
60
+ instrumental?: boolean;
61
+ /** Composes the clip to repeat with no audible seam when the `loop` parameter is set. */
62
+ loop?: boolean;
63
+ audio_inpaint?: boolean;
64
+ audio_outpaint?: boolean;
65
+ /** Scores a video stretch by stretch from a contiguous list of per-stretch briefs. */
66
+ audio_segments?: boolean;
67
+ /** Containers this model can be asked to deliver. Layer never re-encodes a clip, so an empty list means the model returns what it returns and the format cannot be promised. */
68
+ output_formats?: Array<string>;
69
+ /** Speaks only in a trained voice, so a generation needs a reference set holding one. Without it the provider falls back to its own default voice. */
70
+ voice_reference_set_required?: boolean;
71
+ camera_transform?: boolean;
72
+ voice_changer?: boolean;
73
+ audio_isolation?: boolean;
74
+ audio_denoise?: boolean;
75
+ audio_separation?: boolean;
76
+ output_aspect_ratios?: Array<string>;
77
+ output_size_envelope?: string | null;
78
+ }
79
+ /**
80
+ * Layer's curated recommendations, filtered to what this workspace may run.
81
+ *
82
+ * Both maps are ordered best-first, and entry ``[0]`` is the pick to use when the
83
+ * caller expresses no preference. Later entries are genuine fallbacks, so a client
84
+ * holding a stale copy can walk the list. Buckets left empty by workspace filtering
85
+ * are omitted rather than returned empty, so a present key always has a usable pick.
86
+ */
87
+ export interface BaseModelDefaultsOutput {
88
+ /** Recommended base models per output modality, best first. `[0]` is the default for a request that names only a modality. */
89
+ featured_by_modality: Record<string, Array<string>>;
90
+ /** Recommended base models per use case, best first. Finer-grained than modality — prefer this when the caller's intent is known. */
91
+ preferred_by_use_case: Record<string, Array<string>>;
92
+ /** Details for every base model named above, deduplicated, so a client can render a recommendation without a second request. */
93
+ base_models: Array<BaseModelSummary>;
94
+ }
95
+ export interface BaseModelDetail {
96
+ /** Base model identifier, e.g. flux-dev — pass it as `base_model_id`. */
97
+ base_model_id: string;
98
+ /** Display name. */
99
+ name: string;
100
+ /** Community nicknames this model is also known by. */
101
+ aliases?: Array<string>;
102
+ /** image, video, three_d, or audio. */
103
+ modality: Modality;
104
+ /** Short description. */
105
+ description?: string | null;
106
+ /** CU cost per measurement unit. */
107
+ price_per_unit?: number | null;
108
+ /** Measurement unit, e.g. megapixel, second, generation. */
109
+ price_unit?: string | null;
110
+ /** Typical generation time range, e.g. '5-15s'. */
111
+ inference_timing: string;
112
+ /** Supported inputs, sizes, and generation features. */
113
+ capabilities: BaseModelCapabilitiesREST;
114
+ }
115
+ export interface BaseModelSummary {
116
+ /** Base model identifier, e.g. flux-dev — pass it as `base_model_id`. */
117
+ base_model_id: string;
118
+ /** Display name. */
119
+ name: string;
120
+ /** Community nicknames this model is also known by. */
121
+ aliases?: Array<string>;
122
+ /** image, video, three_d, or audio. */
123
+ modality: Modality;
124
+ /** Short description. */
125
+ description?: string | null;
126
+ /** CU cost per measurement unit. */
127
+ price_per_unit?: number | null;
128
+ /** Measurement unit, e.g. megapixel, second, generation. */
129
+ price_unit?: string | null;
130
+ /** Typical generation time range, e.g. '5-15s'. */
131
+ inference_timing: string;
132
+ }
133
+ /** Enum representing the status of a blueprint run. */
134
+ export type BlueprintRunStatus = "pending" | "running" | "success" | "failure" | "cancelled";
135
+ export interface CancelTrainingRunResponse {
136
+ training_run_id: string;
137
+ state: "in_progress" | "terminal_success" | "terminal_failure";
138
+ raw_status: string;
139
+ }
140
+ /**
141
+ * Everything a command-line client needs to run an OAuth login against this deployment.
142
+ *
143
+ * A CLI is pointed at a deployment by URL alone, so it cannot carry a per-deployment
144
+ * client id or callback list of its own — it reads them from here. That also means the
145
+ * registered ports can be widened, or the client rotated, without a CLI release.
146
+ */
147
+ export interface CliAuthConfiguration {
148
+ /** Authorization server that issues tokens for this API. */
149
+ issuer: string;
150
+ /** Public OAuth client id to authenticate as. Not a secret. */
151
+ client_id: string;
152
+ /** Audience to request, so the token is accepted by this API. */
153
+ audience: string;
154
+ /** Scopes to request. `offline_access` is what keeps the login alive. */
155
+ scopes: Array<string>;
156
+ /** Grant types this client may use, most preferred first. */
157
+ grant_types: Array<string>;
158
+ /** Ports registered as loopback callbacks. Bind the first one that is free and redirect to `http://127.0.0.1:<port>{redirect_path}`. The authorization server does not accept a port outside this list, so fall back to the device-code grant when every one is taken. */
159
+ loopback_ports: Array<number>;
160
+ /** Path component of the registered loopback callback URLs. */
161
+ redirect_path: string;
162
+ }
163
+ export interface CreateGroupBody {
164
+ /** The group's name. Must be unique within the workspace. */
165
+ name: string;
166
+ /** Optional workspace role to grant members. */
167
+ role?: Role | null;
168
+ /** Id of a custom role to grant instead of a builtin `role`. */
169
+ role_id?: string | null;
170
+ }
171
+ export interface CreateProjectBody {
172
+ /** The project's display name. Must be unique within the workspace. */
173
+ name: string;
174
+ description?: string | null;
175
+ /** 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. */
176
+ instructions?: string | null;
177
+ }
178
+ export interface CreateReferenceSetRequest {
179
+ /** Display name for the reference set. */
180
+ name: string;
181
+ /** Training category: general (overall aesthetic), character (person/creature), object (specific item), scene (environment), or effect (visual effect). */
182
+ category: "general" | "character" | "object" | "scene" | "effect";
183
+ /** Ordered image or video file IDs to include. Must belong to the workspace. */
184
+ file_ids: Array<string>;
185
+ /** Optional description. */
186
+ description?: string | null;
187
+ /** Optional ordered image file IDs to show as cover thumbnails. Omit to auto-pick. */
188
+ cover_file_ids?: Array<string> | null;
189
+ }
190
+ export interface CreateReferenceSetResponse {
191
+ /** ID of the created reference set (train this with a training run). */
192
+ reference_set_id: string;
193
+ name: string;
194
+ /** Number of input files added to the reference set. */
195
+ asset_count: number;
196
+ /** Number of cover thumbnails set on the reference set. */
197
+ cover_count: number;
198
+ /** Files from file_ids that were not included, each with the reason. */
199
+ skipped?: Array<SkippedFile>;
200
+ }
201
+ export interface DailyUsage {
202
+ /** Calendar day (UTC), ISO format YYYY-MM-DD. */
203
+ date: string;
204
+ /** Creative Units consumed on this day across all models. */
205
+ creative_units: number;
206
+ }
207
+ export interface EstimateForgePriceOutput {
208
+ /** Total estimated Creative Units price for this run. */
209
+ estimated_price_creative_units: number;
210
+ /** Usable Creative Units balance (total balance minus reserved by in-progress generations). */
211
+ workspace_balance_creative_units: number;
212
+ /** Usable balance after subtracting the estimated price. Can be negative. */
213
+ estimated_remaining_balance_creative_units: number;
214
+ /** Whether the workspace has enough available Creative Units to cover the estimated price. */
215
+ has_sufficient_creative_units: boolean;
216
+ }
217
+ /** REST request body for estimating inference price. workspace_id comes from path. */
218
+ export interface EstimateInferencePriceRequest {
219
+ /** Model/style ID to use for generation. */
220
+ model_id: string;
221
+ /** Style/LoRA strength applied to the model. 1.0 = as trained; lower weakens, higher over-applies the style. Only affects LoRA/adapter-backed styles; ignored for models without a trainable adapter. */
222
+ weight?: number;
223
+ /** Text prompt. */
224
+ prompt?: string | null;
225
+ /** Output width in pixels. If not specified, a default resolution based on the model will be applied. */
226
+ width?: number | null;
227
+ /** Output height in pixels. If not specified, a default resolution based on the model will be applied. */
228
+ height?: number | null;
229
+ /** Number of outputs (1-16). */
230
+ batch_size?: number;
231
+ /** Number of diffusion steps. */
232
+ num_inference_steps?: number | null;
233
+ /** Guidance scale (CFG). */
234
+ guidance_scale?: number | null;
235
+ /** How closely the generated audio follows the text prompt (0-1); higher means less variation. Honored by ElevenLabs Sound Effects and the Sonilo video-to-music models, and ignored by every other model. */
236
+ prompt_strength?: number | null;
237
+ /** Quality level: low, medium, or high. */
238
+ quality?: "low" | "medium" | "high" | null;
239
+ /** Output sharpness. */
240
+ sharpness?: number | null;
241
+ /** Output length in seconds — a video clip's duration, or the clip length for audio models whose capabilities report duration_seconds_min and duration_seconds_max. A value outside a model's supported range is refused. */
242
+ duration_seconds?: number | null;
243
+ /** Generate audio with video. */
244
+ generate_audio?: boolean | null;
245
+ /** Keep audio from input video. */
246
+ keep_audio?: boolean | null;
247
+ /** Guarantee a track with no vocals, on models whose capabilities report instrumental. Asking for one in the prompt is only a suggestion. */
248
+ instrumental?: boolean | null;
249
+ /** Compose the clip to repeat with no audible seam, on models whose capabilities report loop. */
250
+ loop?: boolean | null;
251
+ /** Container for the delivered file, one of the values the model's capabilities list under output_formats. Layer never re-encodes a clip, so a model that lists none delivers what it delivers. */
252
+ output_format?: AudioOutputFormat | null;
253
+ /** Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself. */
254
+ lyrics?: string | null;
255
+ /** FPS for LTX video generation (e.g. 25 or 50). */
256
+ fps?: number | null;
257
+ /** Video effects to apply. */
258
+ video_effects?: Array<ForgeVideoEffectInput>;
259
+ /** Deprecated: use pose_mode. Legacy rig-ready-pose toggle for 3D. */
260
+ use_ta_pose?: boolean | null;
261
+ /** Rest pose for a character mesh: A_POSE or T_POSE. Support varies by model. */
262
+ pose_mode?: PoseMode | null;
263
+ /** Include textures in 3D output. */
264
+ include_textures?: boolean | null;
265
+ /** Denser, more detailed geometry (Meshy V7 ultra mode). Costs extra; support varies by model. */
266
+ detailed_geometry?: boolean | null;
267
+ /** Set false to skip the provider's remesh phase and keep its raw geometry. Support varies by model. */
268
+ remesh_geometry?: boolean | null;
269
+ /** Generate quad mesh. */
270
+ quad_mesh?: boolean | null;
271
+ /** Generate PBR materials. */
272
+ pbr_materials?: boolean | null;
273
+ /** Generate low-poly mesh. */
274
+ low_poly?: boolean | null;
275
+ /** Generate separate parts. */
276
+ generate_parts?: boolean | null;
277
+ /** Face/polygon limit for 3D mesh. */
278
+ face_limit?: number | null;
279
+ /** Audio stability (0-1). */
280
+ stability?: number | null;
281
+ /** Boost speaker clarity. */
282
+ use_speaker_boost?: boolean | null;
283
+ /** Voice similarity boost (0-1). */
284
+ similarity_boost?: number | null;
285
+ /** Style exaggeration (0-1). */
286
+ style_exaggeration?: number | null;
287
+ /** Speech speed multiplier. */
288
+ speed?: number | null;
289
+ /** Upscale factor (e.g. 2.0, 4.0). */
290
+ upscale_ratio?: number | null;
291
+ /** Creative variation strength for upscaling. */
292
+ creativity?: number | null;
293
+ /** Resemblance to original for upscaling. */
294
+ resemblance?: number | null;
295
+ /** Vectorize the output image. */
296
+ vectorize?: boolean | null;
297
+ /** Remove background from output. */
298
+ remove_background?: boolean | null;
299
+ /** Reframe/extend the image. */
300
+ reframe?: boolean | null;
301
+ /** Outpaint/refill transparent areas. */
302
+ refill?: boolean | null;
303
+ }
304
+ export interface EstimateInferencePriceV2Output {
305
+ /** Total estimated Creative Units price for this run. */
306
+ estimated_price_creative_units: number;
307
+ /** Usable Creative Units balance (total balance minus reserved by in-progress generations). */
308
+ workspace_balance_creative_units: number;
309
+ /** Usable balance after subtracting the estimated price. Can be negative. */
310
+ estimated_remaining_balance_creative_units: number;
311
+ /** Whether the workspace has enough available Creative Units to cover the estimated price. */
312
+ has_sufficient_creative_units: boolean;
313
+ /** Base model this price refers to, resolved or auto-picked. */
314
+ base_model_id: string;
315
+ /** True when no base_model_id was supplied — the base model was selected from the reference sets. */
316
+ auto_picked: boolean;
317
+ /** Per-set summary of what each reference set would contribute to this run. */
318
+ reference_set_contributions?: Array<ForgeReferenceSetContribution>;
319
+ /** True when at least one attached reference set would not meaningfully contribute on the selected model. */
320
+ reference_sets_degraded?: boolean;
321
+ /** Names each degraded reference set and why, or null when none is degraded. */
322
+ reference_sets_warning?: string | null;
323
+ }
324
+ /** REST request body for estimating inference price. workspace_id comes from path. */
325
+ export interface EstimateInferencePriceV2Request {
326
+ /** Base model to run, as an id (e.g. flux-dev), display name, or community alias. */
327
+ base_model_id?: string | null;
328
+ /** Reference sets to apply, up to 10. */
329
+ reference_sets?: Array<InferenceReferenceSetInput>;
330
+ /** Output modality: image, video, three_d, or audio. Only needed to disambiguate reference-set translation when no base_model_id is given. */
331
+ modality?: Modality | null;
332
+ /** Text prompt. */
333
+ prompt?: string | null;
334
+ /** What to steer the output away from. Honored by the models whose `inference-schema` lists `negative_prompt`, and ignored by the rest. */
335
+ negative_prompt?: string | null;
336
+ /** Output width in pixels. If not specified, a default resolution based on the model will be applied. */
337
+ width?: number | null;
338
+ /** Output height in pixels. If not specified, a default resolution based on the model will be applied. */
339
+ height?: number | null;
340
+ /** Number of outputs (1-16). */
341
+ batch_size?: number;
342
+ /** Number of diffusion steps. */
343
+ num_inference_steps?: number | null;
344
+ /** Guidance scale (CFG). */
345
+ guidance_scale?: number | null;
346
+ /** How closely the generated audio follows the text prompt (0-1); higher means less variation. Honored by ElevenLabs Sound Effects and the Sonilo video-to-music models, and ignored by every other model. To control how closely an image or video generation follows an input image, set guidance_files[].weight instead. */
347
+ prompt_strength?: number | null;
348
+ /** Quality level: low, medium, or high. */
349
+ quality?: "low" | "medium" | "high" | null;
350
+ /** Output sharpness. */
351
+ sharpness?: number | null;
352
+ /** Output length in seconds — a video clip's duration, or the clip length for audio models whose capabilities report duration_seconds_min and duration_seconds_max. A value outside a model's supported range is refused. */
353
+ duration_seconds?: number | null;
354
+ /** Generate audio with video. */
355
+ generate_audio?: boolean | null;
356
+ /** Keep audio from input video. */
357
+ keep_audio?: boolean | null;
358
+ /** Guarantee a track with no vocals, on models whose capabilities report instrumental. Asking for one in the prompt is only a suggestion. */
359
+ instrumental?: boolean | null;
360
+ /** Compose the clip to repeat with no audible seam, on models whose capabilities report loop. */
361
+ loop?: boolean | null;
362
+ /** Container for the delivered file, one of the values the model's capabilities list under output_formats. Layer never re-encodes a clip, so a model that lists none delivers what it delivers. */
363
+ output_format?: AudioOutputFormat | null;
364
+ /** Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself. */
365
+ lyrics?: string | null;
366
+ /** FPS for LTX video generation (e.g. 25 or 50). */
367
+ fps?: number | null;
368
+ /** Video effects to apply. */
369
+ video_effects?: Array<ForgeVideoEffectInput>;
370
+ /** Deprecated: use pose_mode. Legacy rig-ready-pose toggle for 3D. */
371
+ use_ta_pose?: boolean | null;
372
+ /** Rest pose for a character mesh: A_POSE or T_POSE. Support varies by model. */
373
+ pose_mode?: PoseMode | null;
374
+ /** Include textures in 3D output. */
375
+ include_textures?: boolean | null;
376
+ /** Denser, more detailed geometry (Meshy V7 ultra mode). Costs extra; support varies by model. */
377
+ detailed_geometry?: boolean | null;
378
+ /** Set false to skip the provider's remesh phase and keep its raw geometry. Support varies by model. */
379
+ remesh_geometry?: boolean | null;
380
+ /** Generate quad mesh. */
381
+ quad_mesh?: boolean | null;
382
+ /** Generate PBR materials. */
383
+ pbr_materials?: boolean | null;
384
+ /** Generate low-poly mesh. */
385
+ low_poly?: boolean | null;
386
+ /** Generate separate parts. */
387
+ generate_parts?: boolean | null;
388
+ /** Face/polygon limit for 3D mesh. */
389
+ face_limit?: number | null;
390
+ /** Audio stability (0-1). */
391
+ stability?: number | null;
392
+ /** Boost speaker clarity. */
393
+ use_speaker_boost?: boolean | null;
394
+ /** Voice similarity boost (0-1). */
395
+ similarity_boost?: number | null;
396
+ /** Style exaggeration (0-1). */
397
+ style_exaggeration?: number | null;
398
+ /** Speech speed multiplier. */
399
+ speed?: number | null;
400
+ /** Upscale factor (e.g. 2.0, 4.0). */
401
+ upscale_ratio?: number | null;
402
+ /** Creative variation strength for upscaling. */
403
+ creativity?: number | null;
404
+ /** Resemblance to original for upscaling. */
405
+ resemblance?: number | null;
406
+ /** Vectorize the output image. */
407
+ vectorize?: boolean | null;
408
+ /** Remove background from output. */
409
+ remove_background?: boolean | null;
410
+ /** Reframe/extend the image. */
411
+ reframe?: boolean | null;
412
+ /** Outpaint/refill transparent areas. */
413
+ refill?: boolean | null;
414
+ /** Reference images/files to guide generation. */
415
+ guidance_files?: Array<ForgeGuidanceFileInput>;
416
+ }
417
+ export interface EstimateTrainingPriceRequest {
418
+ /** The reference set to price training for. */
419
+ reference_set_id: string;
420
+ /** Base model to train. Omit to use the reference set's configured or workspace default model. */
421
+ base_model_id?: string | null;
422
+ /** Training framework override. Omit for the server default. */
423
+ training_framework?: "fal" | "ai-toolkit" | null;
424
+ }
425
+ export interface EstimateTrainingPriceResponse {
426
+ /** Estimated Creative Units to train this reference set. */
427
+ estimated_price_creative_units: number;
428
+ /** The base model the estimate was computed for. */
429
+ base_model_id: string;
430
+ /** Usable Creative Units balance (total minus reserved by in-progress work). */
431
+ workspace_balance_creative_units: number;
432
+ /** Usable balance after subtracting the estimated price. Can be negative. */
433
+ estimated_remaining_balance_creative_units: number;
434
+ /** Whether the workspace has enough available Creative Units to cover the estimate. */
435
+ has_sufficient_creative_units: boolean;
436
+ }
437
+ export interface EstimateWorkflowOutputCount {
438
+ /** The output parameter definition. */
439
+ output: WorkflowOutput;
440
+ /** The expected number of outputs */
441
+ count: number;
442
+ }
443
+ export interface EstimateWorkflowPriceOutput {
444
+ /** Total estimated Creative Units price for this run. */
445
+ estimated_price_creative_units: number;
446
+ /** Expected output count for each workflow output parameter. */
447
+ output_counts: Array<EstimateWorkflowOutputCount>;
448
+ /** Usable Creative Units balance (total balance minus reserved by in-progress generations). */
449
+ workspace_balance_creative_units: number;
450
+ /** Usable balance after subtracting the estimated price. Can be negative. */
451
+ estimated_remaining_balance_creative_units: number;
452
+ /** Whether the workspace has enough available Creative Units to cover the estimated price. */
453
+ has_sufficient_creative_units: boolean;
454
+ }
455
+ export interface EstimateWorkflowPriceRequest {
456
+ /** Workflow inputs matching the workflow's input schema. */
457
+ inputs: Record<string, unknown>;
458
+ }
459
+ export interface ExecuteForgeOutput {
460
+ /** Unique identifier for this forge run. */
461
+ inference_id: string;
462
+ /** Current status: IN_PROGRESS. */
463
+ status: InferenceStatus;
464
+ /** Estimated price in Creative Units. */
465
+ estimated_price_creative_units?: number | null;
466
+ /** Suggested polling interval in seconds. */
467
+ poll_interval_seconds: number;
468
+ /** Timestamp of when the run was created. */
469
+ created_at: string;
470
+ /** Session ID the run was added to, if a session was specified. */
471
+ session_id?: string | null;
472
+ /** Actual parameters used after model-specific normalization and defaults. */
473
+ normalized_parameters?: NormalizedInferenceParameters | null;
474
+ }
475
+ /** REST request body for executing an inference. workspace_id comes from path. */
476
+ export interface ExecuteInferenceRequest {
477
+ /** Model/style ID to use for generation. */
478
+ model_id: string;
479
+ /** Style/LoRA strength applied to the model. 1.0 = as trained; lower weakens, higher over-applies the style. Only affects LoRA/adapter-backed styles; ignored for models without a trainable adapter. */
480
+ weight?: number;
481
+ /** Text prompt. */
482
+ prompt?: string | null;
483
+ /** Output width in pixels. If not specified, a default resolution based on the model will be applied. */
484
+ width?: number | null;
485
+ /** Output height in pixels. If not specified, a default resolution based on the model will be applied. */
486
+ height?: number | null;
487
+ /** Number of outputs (1-16). */
488
+ batch_size?: number;
489
+ /** Number of diffusion steps. */
490
+ num_inference_steps?: number | null;
491
+ /** Guidance scale (CFG). */
492
+ guidance_scale?: number | null;
493
+ /** How closely the generated audio follows the text prompt (0-1); higher means less variation. Honored by ElevenLabs Sound Effects and the Sonilo video-to-music models, and ignored by every other model. To control how closely an image or video generation follows an input image, set guidance_files[].weight instead. */
494
+ prompt_strength?: number | null;
495
+ /** Quality level: low, medium, or high. */
496
+ quality?: "low" | "medium" | "high" | null;
497
+ /** Output sharpness. */
498
+ sharpness?: number | null;
499
+ /** Output length in seconds — a video clip's duration, or the clip length for audio models whose capabilities report duration_seconds_min and duration_seconds_max. A value outside a model's supported range is refused. */
500
+ duration_seconds?: number | null;
501
+ /** Generate audio with video. */
502
+ generate_audio?: boolean | null;
503
+ /** Keep audio from input video. */
504
+ keep_audio?: boolean | null;
505
+ /** Guarantee a track with no vocals, on models whose capabilities report instrumental. Asking for one in the prompt is only a suggestion. */
506
+ instrumental?: boolean | null;
507
+ /** Compose the clip to repeat with no audible seam, on models whose capabilities report loop. */
508
+ loop?: boolean | null;
509
+ /** Container for the delivered file, one of the values the model's capabilities list under output_formats. Layer never re-encodes a clip, so a model that lists none delivers what it delivers. */
510
+ output_format?: AudioOutputFormat | null;
511
+ /** Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself. */
512
+ lyrics?: string | null;
513
+ /** FPS for LTX video generation (e.g. 25 or 50). */
514
+ fps?: number | null;
515
+ /** Video effects to apply. */
516
+ video_effects?: Array<ForgeVideoEffectInput>;
517
+ /** Deprecated: use pose_mode. Legacy rig-ready-pose toggle for 3D. */
518
+ use_ta_pose?: boolean | null;
519
+ /** Rest pose for a character mesh: A_POSE or T_POSE. Support varies by model. */
520
+ pose_mode?: PoseMode | null;
521
+ /** Include textures in 3D output. */
522
+ include_textures?: boolean | null;
523
+ /** Denser, more detailed geometry (Meshy V7 ultra mode). Costs extra; support varies by model. */
524
+ detailed_geometry?: boolean | null;
525
+ /** Set false to skip the provider's remesh phase and keep its raw geometry. Support varies by model. */
526
+ remesh_geometry?: boolean | null;
527
+ /** Generate quad mesh. */
528
+ quad_mesh?: boolean | null;
529
+ /** Generate PBR materials. */
530
+ pbr_materials?: boolean | null;
531
+ /** Generate low-poly mesh. */
532
+ low_poly?: boolean | null;
533
+ /** Generate separate parts. */
534
+ generate_parts?: boolean | null;
535
+ /** Face/polygon limit for 3D mesh. */
536
+ face_limit?: number | null;
537
+ /** Audio stability (0-1). */
538
+ stability?: number | null;
539
+ /** Boost speaker clarity. */
540
+ use_speaker_boost?: boolean | null;
541
+ /** Voice similarity boost (0-1). */
542
+ similarity_boost?: number | null;
543
+ /** Style exaggeration (0-1). */
544
+ style_exaggeration?: number | null;
545
+ /** Speech speed multiplier. */
546
+ speed?: number | null;
547
+ /** Upscale factor (e.g. 2.0, 4.0). */
548
+ upscale_ratio?: number | null;
549
+ /** Creative variation strength for upscaling. */
550
+ creativity?: number | null;
551
+ /** Resemblance to original for upscaling. */
552
+ resemblance?: number | null;
553
+ /** Vectorize the output image. */
554
+ vectorize?: boolean | null;
555
+ /** Remove background from output. */
556
+ remove_background?: boolean | null;
557
+ /** Reframe/extend the image. */
558
+ reframe?: boolean | null;
559
+ /** Outpaint/refill transparent areas. */
560
+ refill?: boolean | null;
561
+ /** Random seed. -1 for random. */
562
+ seed?: number;
563
+ /** Reference images/files to guide generation. */
564
+ guidance_files?: Array<ForgeGuidanceFileInput>;
565
+ /** Mask for inpainting/outpainting. */
566
+ mask?: ForgeMaskInput | null;
567
+ /** Session name. */
568
+ session_name?: string | null;
569
+ }
570
+ export interface ExecuteInferenceV2Output {
571
+ /** Unique identifier for this inference run. */
572
+ inference_id: string;
573
+ /** Current status: IN_PROGRESS. */
574
+ status: InferenceStatus;
575
+ /** Estimated price in Creative Units. */
576
+ estimated_price_creative_units?: number | null;
577
+ /** Suggested polling interval in seconds. */
578
+ poll_interval_seconds: number;
579
+ /** Timestamp of when the run was created. */
580
+ created_at: string;
581
+ /** Session ID the run was added to, if a session was specified. */
582
+ session_id?: string | null;
583
+ /** Actual parameters used after model-specific normalization and defaults. */
584
+ normalized_parameters?: NormalizedInferenceParametersV2 | null;
585
+ /** Base model used for the run, resolved or auto-picked. */
586
+ base_model_id: string;
587
+ /** Per-set summary of what each reference set contributed. */
588
+ reference_set_contributions?: Array<ForgeReferenceSetContribution>;
589
+ /** True when at least one attached reference set did not meaningfully contribute. The run still costs Creative Units. */
590
+ reference_sets_degraded?: boolean;
591
+ /** Names each degraded reference set and why, or null when none is degraded. */
592
+ reference_sets_warning?: string | null;
593
+ }
594
+ /** REST request body for executing an inference. workspace_id comes from path. */
595
+ export interface ExecuteInferenceV2Request {
596
+ /** Base model to run, as an id (e.g. flux-dev), display name, or community alias. */
597
+ base_model_id?: string | null;
598
+ /** Reference sets to apply, up to 10. */
599
+ reference_sets?: Array<InferenceReferenceSetInput>;
600
+ /** Output modality: image, video, three_d, or audio. Only needed to disambiguate reference-set translation when no base_model_id is given. */
601
+ modality?: Modality | null;
602
+ /** Text prompt. */
603
+ prompt?: string | null;
604
+ /** What to steer the output away from. Honored by the models whose `inference-schema` lists `negative_prompt`, and ignored by the rest. */
605
+ negative_prompt?: string | null;
606
+ /** Output width in pixels. If not specified, a default resolution based on the model will be applied. */
607
+ width?: number | null;
608
+ /** Output height in pixels. If not specified, a default resolution based on the model will be applied. */
609
+ height?: number | null;
610
+ /** Number of outputs (1-16). */
611
+ batch_size?: number;
612
+ /** Number of diffusion steps. */
613
+ num_inference_steps?: number | null;
614
+ /** Guidance scale (CFG). */
615
+ guidance_scale?: number | null;
616
+ /** How closely the generated audio follows the text prompt (0-1); higher means less variation. Honored by ElevenLabs Sound Effects and the Sonilo video-to-music models, and ignored by every other model. To control how closely an image or video generation follows an input image, set guidance_files[].weight instead. */
617
+ prompt_strength?: number | null;
618
+ /** Quality level: low, medium, or high. */
619
+ quality?: "low" | "medium" | "high" | null;
620
+ /** Output sharpness. */
621
+ sharpness?: number | null;
622
+ /** Output length in seconds — a video clip's duration, or the clip length for audio models whose capabilities report duration_seconds_min and duration_seconds_max. A value outside a model's supported range is refused. */
623
+ duration_seconds?: number | null;
624
+ /** Generate audio with video. */
625
+ generate_audio?: boolean | null;
626
+ /** Keep audio from input video. */
627
+ keep_audio?: boolean | null;
628
+ /** Guarantee a track with no vocals, on models whose capabilities report instrumental. Asking for one in the prompt is only a suggestion. */
629
+ instrumental?: boolean | null;
630
+ /** Compose the clip to repeat with no audible seam, on models whose capabilities report loop. */
631
+ loop?: boolean | null;
632
+ /** Container for the delivered file, one of the values the model's capabilities list under output_formats. Layer never re-encodes a clip, so a model that lists none delivers what it delivers. */
633
+ output_format?: AudioOutputFormat | null;
634
+ /** Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself. */
635
+ lyrics?: string | null;
636
+ /** FPS for LTX video generation (e.g. 25 or 50). */
637
+ fps?: number | null;
638
+ /** Video effects to apply. */
639
+ video_effects?: Array<ForgeVideoEffectInput>;
640
+ /** Deprecated: use pose_mode. Legacy rig-ready-pose toggle for 3D. */
641
+ use_ta_pose?: boolean | null;
642
+ /** Rest pose for a character mesh: A_POSE or T_POSE. Support varies by model. */
643
+ pose_mode?: PoseMode | null;
644
+ /** Include textures in 3D output. */
645
+ include_textures?: boolean | null;
646
+ /** Denser, more detailed geometry (Meshy V7 ultra mode). Costs extra; support varies by model. */
647
+ detailed_geometry?: boolean | null;
648
+ /** Set false to skip the provider's remesh phase and keep its raw geometry. Support varies by model. */
649
+ remesh_geometry?: boolean | null;
650
+ /** Generate quad mesh. */
651
+ quad_mesh?: boolean | null;
652
+ /** Generate PBR materials. */
653
+ pbr_materials?: boolean | null;
654
+ /** Generate low-poly mesh. */
655
+ low_poly?: boolean | null;
656
+ /** Generate separate parts. */
657
+ generate_parts?: boolean | null;
658
+ /** Face/polygon limit for 3D mesh. */
659
+ face_limit?: number | null;
660
+ /** Audio stability (0-1). */
661
+ stability?: number | null;
662
+ /** Boost speaker clarity. */
663
+ use_speaker_boost?: boolean | null;
664
+ /** Voice similarity boost (0-1). */
665
+ similarity_boost?: number | null;
666
+ /** Style exaggeration (0-1). */
667
+ style_exaggeration?: number | null;
668
+ /** Speech speed multiplier. */
669
+ speed?: number | null;
670
+ /** Upscale factor (e.g. 2.0, 4.0). */
671
+ upscale_ratio?: number | null;
672
+ /** Creative variation strength for upscaling. */
673
+ creativity?: number | null;
674
+ /** Resemblance to original for upscaling. */
675
+ resemblance?: number | null;
676
+ /** Vectorize the output image. */
677
+ vectorize?: boolean | null;
678
+ /** Remove background from output. */
679
+ remove_background?: boolean | null;
680
+ /** Reframe/extend the image. */
681
+ reframe?: boolean | null;
682
+ /** Outpaint/refill transparent areas. */
683
+ refill?: boolean | null;
684
+ /** Reference images/files to guide generation. */
685
+ guidance_files?: Array<ForgeGuidanceFileInput>;
686
+ /** Random seed. -1 for random. */
687
+ seed?: number;
688
+ /** Mask for inpainting/outpainting. */
689
+ mask?: ForgeMaskInput | null;
690
+ /** Session name. */
691
+ session_name?: string | null;
692
+ }
693
+ export interface ExecuteWorkflowOutput {
694
+ /** Unique identifier for this workflow run. */
695
+ run_id: string;
696
+ /** Current run status: PENDING or RUNNING. */
697
+ status: BlueprintRunStatus;
698
+ /** Estimated price in Creative Units. */
699
+ estimated_price_creative_units: number;
700
+ /** Suggested polling interval in seconds. */
701
+ poll_interval_seconds: number;
702
+ /** Timestamp of when the run was created. */
703
+ created_at: string;
704
+ /** Session ID the run was added to, if a session was specified. */
705
+ session_id?: string | null;
706
+ }
707
+ export interface ExecuteWorkflowRequest {
708
+ /** Input values matching the workflow's input schema. */
709
+ inputs: Record<string, unknown>;
710
+ /** Existing session ID. Takes precedence over session_name if both are provided. */
711
+ session_id?: string | null;
712
+ /** Session name. Creates a new session if not found in the workspace. Ignored if session_id is set. */
713
+ session_name?: string | null;
714
+ }
715
+ export interface FileScore {
716
+ /** The rule that produced this verdict. */
717
+ rule_id: string;
718
+ /** The rule's name as it was when the file was judged. */
719
+ rule_name: string;
720
+ /** The verdict, 0-100. Higher is a closer match to what the rule asks for. */
721
+ score: number;
722
+ /** The judge's explanation of the score. */
723
+ rationale: string;
724
+ /** The model that judged it. */
725
+ judged_by_model: string;
726
+ /** When the verdict was recorded. */
727
+ judged_at: string;
728
+ }
729
+ export interface FileScoresOutput {
730
+ /** Echoes the requested file id. */
731
+ file_id: string;
732
+ /** The current verdict per rule — the newest one, where a file has been scored more than once. */
733
+ scores: Array<FileScore>;
734
+ /** The score stamped on the file itself, from the rule its scope nominated. Null when the file has not been judged by that rule. */
735
+ headline_score?: number | null;
736
+ /** The rule the stamped score came from. */
737
+ headline_rule_id?: string | null;
738
+ /** When the stamp was written. */
739
+ headline_scored_at?: string | null;
740
+ }
741
+ export type FileSourceType = "pose" | "reference" | "mask" | "composite" | "google_drive" | "miro" | "transformed_reference" | "skill_resource" | "skill_bundle";
742
+ export interface ForgeGuidanceFileInput {
743
+ /** File ID of an uploaded file. */
744
+ file_id: string;
745
+ /** Guidance type. See model capabilities for supported types per model. */
746
+ type: GuidanceFileType;
747
+ /** Influence weight (0-1). Defaults to 0.5 for init, 1 for others. */
748
+ weight?: number | null;
749
+ }
750
+ export interface ForgeMaskInput {
751
+ /** Mask image file ID. */
752
+ file_id?: string | null;
753
+ /** Use transparent areas as mask. */
754
+ for_transparency?: boolean | null;
755
+ /** Use non-transparent areas as mask. */
756
+ for_nontransparency?: boolean | null;
757
+ /** Mask edge blur radius in pixels. */
758
+ edge_radius?: number;
759
+ }
760
+ export interface ForgeReferenceSetContribution {
761
+ /** Reference Set ID this contribution belongs to, if any. */
762
+ set_id?: string | null;
763
+ /** True when a LoRA finetune was applied for this set. */
764
+ lora_applied?: boolean;
765
+ /** True when an animation (Meshy rigging action) finetune was applied for this set. */
766
+ animation_applied?: boolean;
767
+ /** True when a voice (ElevenLabs) finetune was applied for this set. */
768
+ voice_applied?: boolean;
769
+ /** Number of assets successfully mapped to guidance inputs. */
770
+ mapped_asset_count?: number;
771
+ /** True when the set fell back to prompt-only representation. */
772
+ prompt_fallback_applied?: boolean;
773
+ /** True when SBMC has a LoRA for this set on another base model but not the one used. */
774
+ lora_available_but_incompatible?: boolean;
775
+ /** True when the set isn't applicable to the chosen model (its modality / applicable base models exclude it) so no LoRA or assets were applied. */
776
+ skipped_not_applicable?: boolean;
777
+ }
778
+ export interface ForgeRunAsset {
779
+ /** File ID for the generated asset. */
780
+ file_id: string;
781
+ /** Download URL for the asset. */
782
+ url: string;
783
+ /** MIME type, e.g. image/png or video/mp4. */
784
+ content_type: string;
785
+ /** Thumbnail/preview URL. */
786
+ preview_url?: string | null;
787
+ /** Width in pixels. */
788
+ width?: number | null;
789
+ /** Height in pixels. */
790
+ height?: number | null;
791
+ /** Duration for video/audio assets. */
792
+ duration_seconds?: number | null;
793
+ /** File size in bytes. */
794
+ file_size_bytes?: number | null;
795
+ }
796
+ export interface ForgeVideoEffectInput {
797
+ /** Video effect type. See model capabilities for supported effects per model. */
798
+ type: VideoEffectType;
799
+ /** Effect strength (0-100). */
800
+ weight?: number | null;
801
+ }
802
+ export interface GetForgeRunOutput {
803
+ /** Unique identifier for this forge run. */
804
+ inference_id: string;
805
+ /** Current status: in_progress, complete, failed, cancelled, or deleted. */
806
+ status: InferenceStatus;
807
+ /** Suggested polling interval in seconds. Present while IN_PROGRESS. */
808
+ poll_interval_seconds?: number | null;
809
+ /** Completion timestamp. Present only on COMPLETE. */
810
+ completed_at?: string | null;
811
+ /** Generated assets. Present only on COMPLETE. */
812
+ outputs?: Array<ForgeRunAsset> | null;
813
+ /** Actual Creative Units charged. Present only on COMPLETE. */
814
+ actual_price_creative_units?: number | null;
815
+ /** Error message. Present only on FAILED. */
816
+ error?: string | null;
817
+ /** Machine-readable error code. Present only on FAILED. Balance-related values: `INSUFFICIENT_BALANCE` (the workspace ran out of Creative Units — top up and resubmit) and `BALANCE_UNAVAILABLE` (the balance could not be verified — retry later). */
818
+ error_code?: string | null;
819
+ }
820
+ export interface GetInferenceRunV2Output {
821
+ /** Unique identifier for this inference run. */
822
+ inference_id: string;
823
+ /** Current status: in_progress, complete, failed, cancelled, or deleted. */
824
+ status: InferenceStatus;
825
+ /** Suggested polling interval in seconds. Present while IN_PROGRESS. */
826
+ poll_interval_seconds?: number | null;
827
+ /** Completion timestamp. Present only on COMPLETE. */
828
+ completed_at?: string | null;
829
+ /** Generated assets. Present only on COMPLETE. */
830
+ outputs?: Array<ForgeRunAsset> | null;
831
+ /** Actual Creative Units charged. Present only on COMPLETE. */
832
+ actual_price_creative_units?: number | null;
833
+ /** Error message. Present only on FAILED. */
834
+ error?: string | null;
835
+ /** Machine-readable error code. Present only on FAILED. Balance-related values: `INSUFFICIENT_BALANCE` (the workspace ran out of Creative Units — top up and resubmit) and `BALANCE_UNAVAILABLE` (the balance could not be verified — retry later). */
836
+ error_code?: string | null;
837
+ /** Base model the run used, resolved or auto-picked. */
838
+ base_model_id?: string | null;
839
+ /** Per-set summary of what each reference set contributed. */
840
+ reference_set_contributions?: Array<ForgeReferenceSetContribution>;
841
+ /** True when at least one attached reference set did not meaningfully contribute. The run still costs Creative Units. */
842
+ reference_sets_degraded?: boolean;
843
+ /** Names each degraded reference set and why, or null when none is degraded. */
844
+ reference_sets_warning?: string | null;
845
+ }
846
+ export interface GetModelRESTOutput {
847
+ model: ModelDetailREST;
848
+ }
849
+ export interface GetReferenceSetOutput {
850
+ reference_set_id: string;
851
+ /** Display name of the reference set. */
852
+ name: string;
853
+ /** URL-safe slug of the reference set. */
854
+ slug: string;
855
+ /** Free-text description. */
856
+ description?: string | null;
857
+ /** Category, e.g. character or object. */
858
+ category?: StyleCategory | null;
859
+ /** Lifecycle status: draft, complete, or archived. */
860
+ status: "draft" | "complete" | "archived";
861
+ /** Number of files attached to the reference set. */
862
+ asset_count: number;
863
+ /** Attached files, ordered by index. */
864
+ files?: Array<ReferenceSetFile>;
865
+ }
866
+ export interface GetTrainingRunResponse {
867
+ training_run_id: string;
868
+ /** in_progress, terminal_success, or terminal_failure. */
869
+ state: "in_progress" | "terminal_success" | "terminal_failure";
870
+ /** Fine-grained run status. */
871
+ raw_status: string;
872
+ /** Training progress in [0, 1]; 1.0 when complete. */
873
+ progress: number;
874
+ /** Suggested polling interval in seconds. Present while in_progress. */
875
+ poll_interval_seconds?: number | null;
876
+ /** Estimated completion time, if known. */
877
+ eta_at?: string | null;
878
+ started_at?: string | null;
879
+ finished_at?: string | null;
880
+ /** Error message. Present only on terminal_failure. */
881
+ error?: string | null;
882
+ /** Machine-readable error code. Present on terminal_failure. */
883
+ error_code?: string | null;
884
+ }
885
+ export interface GetWorkflowRunOutput {
886
+ /** Unique identifier for this workflow run. */
887
+ run_id: string;
888
+ /** Current status: pending, running, success, failure, or cancelled. */
889
+ status: BlueprintRunStatus;
890
+ /** Suggested polling interval in seconds. Present while PENDING or RUNNING. */
891
+ poll_interval_seconds?: number | null;
892
+ /** Status of each step composing the workflow run. */
893
+ steps?: Array<GetWorkflowRunStep>;
894
+ /** Estimated Creative Units price. Present when available. */
895
+ estimated_price_creative_units?: number | null;
896
+ /** Completion timestamp. Present only on SUCCESS. */
897
+ completed_at?: string | null;
898
+ /** Actual Creative Units price charged. Present only on SUCCESS. */
899
+ actual_price_creative_units?: number | null;
900
+ /** Generated assets. Present only on SUCCESS. */
901
+ outputs?: Array<WorkflowRunAsset> | null;
902
+ /** Error message. Present only on FAILURE. */
903
+ error?: string | null;
904
+ /** Machine-readable error code. Present only on FAILURE. Balance-related values: `BlueprintInsufficientBalanceError` (the workspace ran out of Creative Units — top up and resubmit) and `BlueprintBalanceUnavailableError` (the balance could not be verified — retry later). */
905
+ error_code?: string | null;
906
+ }
907
+ export interface GetWorkflowRunStep {
908
+ /** The name of the workflow step */
909
+ name: string;
910
+ /** The execution status of the step: pending, running, success, failure, or cancelled. */
911
+ status: BlueprintRunStatus;
912
+ /** The error details if any */
913
+ error?: string | null;
914
+ /** Machine-readable error code if the step failed. */
915
+ error_code?: string | null;
916
+ }
917
+ export interface GroupMemberOut {
918
+ /** The member's user id. */
919
+ user_id: string;
920
+ /** The member's email address. */
921
+ email: string;
922
+ /** The member's display name, if set. */
923
+ name?: string | null;
924
+ /** Group membership status. */
925
+ status: GroupMembershipStatus;
926
+ }
927
+ export type GroupMembershipStatus = "active" | "suspended";
928
+ export interface GroupOut {
929
+ /** The group's unique identifier. */
930
+ group_id: string;
931
+ /** The group's name. */
932
+ name: string;
933
+ /** The workspace role this group grants its members, if any. */
934
+ role?: Role | null;
935
+ /** 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. */
936
+ role_id?: string | null;
937
+ }
938
+ /**
939
+ * What a guidance file *is*.
940
+ *
941
+ * The type names the medium and the slot the file occupies. Where a model conditions on a
942
+ * file through a different provider input — the legacy IP-adapter path — that is its own
943
+ * type, because it is not the same slot.
944
+ */
945
+ export type GuidanceFileType = "init_image" | "reference_image" | "scribble" | "color_sketch" | "pose" | "depth" | "canny" | "softedge_hed" | "segmentation" | "lineart" | "face" | "ip_adapter" | "first_frame" | "last_frame" | "init_video" | "reference_video" | "init_mesh" | "texture_image" | "element_frontal_image" | "element_reference_image" | "element_video" | "init_audio" | "reference_audio";
946
+ export interface InferenceReferenceSetInput {
947
+ /** Reference set ID from GET /v2/workspaces/{workspace_id}/reference-sets. */
948
+ set_id: string;
949
+ /** Weight for the set's LoRA adapter when one applies. Ignored for sets applied as reference images or prompt text. */
950
+ weight?: number;
951
+ }
952
+ export type InferenceStatus = "in_progress" | "complete" | "failed" | "cancelled" | "deleted";
953
+ export type InferenceUseCase = "text_to_image" | "image_editing" | "multi_angle" | "inpainting" | "reframing" | "split_into_layers" | "text_to_video" | "image_to_video" | "video_editing" | "video_extend" | "video_subtitle" | "video_lipsync" | "image_to_video_lipsync" | "text_to_3d" | "image_to_3d" | "remesh" | "retexture" | "uv_unwrap" | "animate" | "rig" | "segment" | "image_segment" | "text_to_speech" | "sound_effects" | "music" | "upscaling" | "video_interpolation" | "denoise_image" | "denoise_video" | "deblur_video" | "restore_image" | "sdr_to_hdr_video" | "background_removal" | "vectorization" | "virtual_try_on";
954
+ export interface InviteMemberBody {
955
+ /** Email of the person to invite. A Layer user is created if none exists. */
956
+ email: string;
957
+ /** Workspace role to grant. Defaults to member. */
958
+ role?: Role;
959
+ }
960
+ export type LibraryObjectType = "directory" | "file" | "asset" | "style" | "blueprint" | "skill";
961
+ export interface ListBaseModelsOutput {
962
+ base_models: Array<BaseModelSummary>;
963
+ pagination: PaginationOutput;
964
+ }
965
+ export interface ListGroupMembersOutput {
966
+ members: Array<GroupMemberOut>;
967
+ pagination: PaginationOutput;
968
+ }
969
+ export interface ListGroupsOutput {
970
+ groups: Array<GroupOut>;
971
+ pagination: PaginationOutput;
972
+ }
973
+ export interface ListMembersOutput {
974
+ members: Array<MemberOutput>;
975
+ pagination: PaginationOutput;
976
+ }
977
+ export interface ListModelsOutput {
978
+ models: Array<ModelSummary>;
979
+ pagination: PaginationOutput;
980
+ }
981
+ export interface ListProjectsOutput {
982
+ projects: Array<ProjectSummary>;
983
+ pagination: PaginationOutput;
984
+ }
985
+ export interface ListReferenceSetsOutput {
986
+ reference_sets: Array<ReferenceSetSummary>;
987
+ pagination: PaginationOutput;
988
+ }
989
+ export interface ListScoringRulesOutput {
990
+ /** Every rule in force for the scope, workspace-mandated rules first. */
991
+ rules: Array<ScoringRuleSummary>;
992
+ }
993
+ export interface ListTrainingRunsResponse {
994
+ runs: Array<TrainingRunSummary>;
995
+ pagination: PaginationOutput;
996
+ }
997
+ export interface ListWorkflowsOutput {
998
+ workflows: Array<WorkflowSummary>;
999
+ pagination: PaginationOutput;
1000
+ }
1001
+ export interface ListWorkspacesOutput {
1002
+ /** All workspaces the authenticated user belongs to, ordered by most recently active first. */
1003
+ workspaces: Array<WorkspaceInfo>;
1004
+ pagination: PaginationOutput;
1005
+ }
1006
+ export interface MemberOutput {
1007
+ /** The workspace membership's unique identifier. */
1008
+ membership_id: string;
1009
+ /** The member's user id. */
1010
+ user_id: string;
1011
+ /** The member's email address. */
1012
+ email: string;
1013
+ /** The member's display name, if set. */
1014
+ name?: string | null;
1015
+ /** The member's workspace role. */
1016
+ role: Role;
1017
+ /** Membership status: active or suspended. */
1018
+ status: WorkspaceMembershipStatus;
1019
+ }
1020
+ export type Modality = "text" | "image" | "audio" | "video" | "three_d" | "playable";
1021
+ /** ModelCapabilities without the MCP token-saving serializer — returns all fields. */
1022
+ export interface ModelCapabilitiesREST {
1023
+ /** Supported modes: create, create_video, create_3_d, create_speech, create_sound_effect, prompt_edit_image, etc. */
1024
+ session_modes?: Array<string>;
1025
+ text_prompt?: boolean;
1026
+ text_prompt_required?: boolean;
1027
+ negative_prompt?: boolean;
1028
+ seed?: boolean;
1029
+ inpainting?: boolean;
1030
+ outpainting?: boolean;
1031
+ tileability?: boolean;
1032
+ /** Supported reference image types: pose, depth, canny, lineart, prompt (style reference), init, reference_image, etc. */
1033
+ guidance_file_types?: Array<string>;
1034
+ /** Supported video durations in seconds */
1035
+ duration_seconds?: Array<number>;
1036
+ /** Audio models: shortest clip this model generates, in seconds. */
1037
+ duration_seconds_min?: number | null;
1038
+ /** Audio models: longest clip this model generates, in seconds. Pass duration_seconds between the min and max; a request outside them is refused. */
1039
+ duration_seconds_max?: number | null;
1040
+ /** This model has no default clip length; without duration_seconds the shortest is used. */
1041
+ duration_seconds_required?: boolean;
1042
+ auto_aspect_ratio?: boolean;
1043
+ generate_audio?: boolean;
1044
+ lipsync?: boolean;
1045
+ textures?: boolean;
1046
+ quad_mesh?: boolean;
1047
+ pbr_materials?: boolean;
1048
+ text_to_speech?: boolean;
1049
+ sound_effect?: boolean;
1050
+ music?: boolean;
1051
+ voice_changer?: boolean;
1052
+ text_to_dialogue?: boolean;
1053
+ audio_separation?: boolean;
1054
+ audio_isolation?: boolean;
1055
+ audio_inpaint?: boolean;
1056
+ audio_outpaint?: boolean;
1057
+ audio_denoise?: boolean;
1058
+ }
1059
+ export interface ModelDetailREST {
1060
+ model_id: string;
1061
+ name: string;
1062
+ modality: Modality;
1063
+ base_model_id?: string | null;
1064
+ base_model_name?: string | null;
1065
+ description?: string | null;
1066
+ inference_timing: string;
1067
+ capabilities: ModelCapabilitiesREST;
1068
+ prompt_format?: string | null;
1069
+ }
1070
+ export interface ModelSummary {
1071
+ /** Unique model identifier — use for generation or to fetch full details. */
1072
+ model_id: string;
1073
+ name: string;
1074
+ /** image, video, three_d, or audio */
1075
+ modality: Modality;
1076
+ /** Base model identifier, e.g. flux_2_pro, kling_v3_pro */
1077
+ base_model_id?: string | null;
1078
+ /** Model description */
1079
+ description?: string | null;
1080
+ /** Typical generation time range, e.g. '5-15s' */
1081
+ inference_timing: string;
1082
+ }
1083
+ /**
1084
+ * Inference parameters after model-specific normalization.
1085
+ *
1086
+ * These reflect the actual values used for generation, including
1087
+ * model defaults applied for any parameters not explicitly set.
1088
+ */
1089
+ export interface NormalizedInferenceParameters {
1090
+ /** Resolved output width in pixels. */
1091
+ width?: number | null;
1092
+ /** Resolved output height in pixels. */
1093
+ height?: number | null;
1094
+ /** Number of outputs to generate. */
1095
+ batch_size?: number | null;
1096
+ /** Resolved number of diffusion steps. */
1097
+ num_inference_steps?: number | null;
1098
+ /** Resolved guidance scale. */
1099
+ guidance_scale?: number | null;
1100
+ /** Resolved output length in seconds — video duration or audio clip length. */
1101
+ duration_seconds?: number | null;
1102
+ /** Resolved FPS. */
1103
+ fps?: number | null;
1104
+ }
1105
+ /**
1106
+ * Inference parameters after model-specific normalization.
1107
+ *
1108
+ * These reflect the actual values used for generation, including
1109
+ * model defaults applied for any parameters not explicitly set.
1110
+ */
1111
+ export interface NormalizedInferenceParametersV2 {
1112
+ /** Resolved output width in pixels. */
1113
+ width?: number | null;
1114
+ /** Resolved output height in pixels. */
1115
+ height?: number | null;
1116
+ /** Number of outputs to generate. */
1117
+ batch_size?: number | null;
1118
+ /** Resolved number of diffusion steps. */
1119
+ num_inference_steps?: number | null;
1120
+ /** Resolved guidance scale. */
1121
+ guidance_scale?: number | null;
1122
+ /** Resolved output length in seconds — video duration or audio clip length. */
1123
+ duration_seconds?: number | null;
1124
+ /** Resolved FPS. */
1125
+ fps?: number | null;
1126
+ }
1127
+ export interface PaginationOutput {
1128
+ /** Cursor to use to get the next page */
1129
+ next_cursor?: string | null;
1130
+ /** If there are more results to page through */
1131
+ has_more_results: boolean;
1132
+ /** Total number of results matching the query */
1133
+ total_count?: number | null;
1134
+ }
1135
+ /**
1136
+ * Canonical rest pose a character-mesh model is asked to generate in.
1137
+ * ``A_POSE`` places the arms angled down at roughly 45°; ``T_POSE`` holds them
1138
+ * straight out to the sides. Only meaningful for models that advertise the
1139
+ * ``pose_modes`` capability (e.g. Meshy V7).
1140
+ *
1141
+ * Deliberately a light top-level module (like ``base_model_id``), NOT under
1142
+ * ``pkg.models.inference``: the Blueprint definition layer registers this as a
1143
+ * BlueprintType and migrates legacy node ports, and must do so without pulling
1144
+ * in the heavy ``pkg.models.inference`` package, which would perturb the Temporal
1145
+ * workflow-sandbox import graph and split pydantic class identity.
1146
+ */
1147
+ export type PoseMode = "A_POSE" | "T_POSE";
1148
+ export interface ProjectDetail {
1149
+ /** The project's unique identifier. */
1150
+ project_id: string;
1151
+ /** The project's display name. */
1152
+ name: string;
1153
+ /** Project status: active or archived. */
1154
+ status: ProjectStatus;
1155
+ /** Number of library objects currently linked to this project. */
1156
+ object_count: number;
1157
+ /** The project's long-form description, if set. */
1158
+ description?: string | null;
1159
+ /** 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. */
1160
+ instructions?: string | null;
1161
+ }
1162
+ export interface ProjectMember {
1163
+ /** The member's user id. */
1164
+ user_id: string;
1165
+ }
1166
+ export interface ProjectMembersOutput {
1167
+ /** The project's members after the add (idempotent). */
1168
+ members: Array<ProjectMember>;
1169
+ }
1170
+ export type ProjectStatus = "active" | "archived" | "deleted";
1171
+ export interface ProjectSummary {
1172
+ /** The project's unique identifier. */
1173
+ project_id: string;
1174
+ /** The project's display name. */
1175
+ name: string;
1176
+ /** Project status: active or archived. */
1177
+ status: ProjectStatus;
1178
+ /** Number of library objects currently linked to this project. */
1179
+ object_count: number;
1180
+ }
1181
+ export interface ReferenceSetFile {
1182
+ /** ID of a file attached to the reference set. */
1183
+ file_id: string;
1184
+ /** Download URL for the file. */
1185
+ url: string;
1186
+ /** MIME type, e.g. image/png or video/mp4. */
1187
+ content_type: string;
1188
+ /** Ordinal position of the file within the reference set. */
1189
+ index: number;
1190
+ /** Training caption, or null when uncaptioned. */
1191
+ caption?: string | null;
1192
+ /** Multi-view tag when set: front_image, back_image, left_image, right_image, top_image, or bottom_image. */
1193
+ view_type?: string | null;
1194
+ }
1195
+ export interface ReferenceSetSummary {
1196
+ /** Reference set identifier — pass it in `reference_sets`. */
1197
+ reference_set_id: string;
1198
+ /** Display name of the reference set. */
1199
+ name: string;
1200
+ /** Category, e.g. character or object. */
1201
+ category?: StyleCategory | null;
1202
+ /** True when the set has a trained custom model. */
1203
+ has_active_finetune: boolean;
1204
+ }
1205
+ export interface RequestUploadUrlRequest {
1206
+ /** MIME type of the file to upload. */
1207
+ content_type: string;
1208
+ /** Optional file name. */
1209
+ file_name?: string | null;
1210
+ /** Expected file size in bytes. Used to enforce upload limits. */
1211
+ file_size_bytes: number;
1212
+ /** Optional source type for the file. Use 'mask' to upload a mask for inpainting/masked-edit, then pass the returned file_id as the mask in a generation request. Mask uploads must be image files. */
1213
+ source_type?: FileSourceType | null;
1214
+ }
1215
+ export interface RequestUploadUrlResponse {
1216
+ /** Unique identifier for the file. Use as input to generation endpoints after upload completes. */
1217
+ file_id: string;
1218
+ /** Signed upload URL. POST to this URL to initiate a resumable upload, then PUT file chunks to the session URI returned in the Location header. Expires in 15 minutes. */
1219
+ upload_url: string;
1220
+ /** MIME type to use when uploading. */
1221
+ content_type: string;
1222
+ /** Source type the file was created with, echoed from the request. */
1223
+ source_type?: FileSourceType | null;
1224
+ }
1225
+ export type Role = "admin" | "editor" | "settings_admin" | "art_director" | "artist" | "member";
1226
+ export interface ScoreFilesBody {
1227
+ /** The files to score. Images, video and 3D can be judged; audio and text cannot. */
1228
+ file_ids: Array<string>;
1229
+ /** Score under a project's policy as well as the workspace's. A project's rules are added to its workspace's, never replace them. */
1230
+ project_id?: string | null;
1231
+ /** Score against these rules only. Empty runs every rule in force for the scope. */
1232
+ rule_ids?: Array<string>;
1233
+ }
1234
+ export interface ScoreFilesOutput {
1235
+ /** How many (file, rule) judgements were queued — one model call each. */
1236
+ requested_pair_count: number;
1237
+ /** How many files were accepted for scoring. */
1238
+ file_count: number;
1239
+ /** The rules the files are being scored against. */
1240
+ rule_ids: Array<string>;
1241
+ }
1242
+ export interface ScoringRuleSummary {
1243
+ /** Pass this as a `rule_ids` entry to score against this rule alone. */
1244
+ rule_id: string;
1245
+ /** The rule's display name. */
1246
+ name: string;
1247
+ /** What the rule asks of an asset, in the scope's own words. */
1248
+ prompt: string;
1249
+ /** `always` scores every new output automatically; `on_demand` only when asked. */
1250
+ run_mode: ScoringRunMode;
1251
+ /** The line below which a score reads as a fail. Null leaves the score informational. */
1252
+ threshold?: number | null;
1253
+ /** The modalities the rule applies to. Null means every scoreable modality. */
1254
+ modalities?: Array<Modality> | null;
1255
+ /** How many reference images the judge is shown alongside the prompt. */
1256
+ reference_image_count: number;
1257
+ /** True when the rule belongs to the project rather than being inherited from the workspace. */
1258
+ is_project_rule: boolean;
1259
+ /** True for the one rule whose score is stamped on assets as their headline score. */
1260
+ is_nominated: boolean;
1261
+ }
1262
+ /** When a rule runs. */
1263
+ export type ScoringRunMode = "always" | "on_demand";
1264
+ export interface SetUsageLimitBody {
1265
+ /** Creative Units cap for the period. */
1266
+ cu_limit: number;
1267
+ /** Reset period for the cap (e.g. DAILY, MONTHLY). */
1268
+ period: UsageLimitPeriod;
1269
+ }
1270
+ export interface SkippedFile {
1271
+ file_id: string;
1272
+ /** 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). */
1273
+ reason: "not_found" | "foreign_workspace" | "already_member" | "duplicate_in_request";
1274
+ }
1275
+ export interface StartTrainingRequest {
1276
+ /** The reference set (Style) to train a LoRA for. */
1277
+ reference_set_id: string;
1278
+ /** Base model to train. Omit to use the reference set's configured or workspace default model. */
1279
+ base_model_id?: string | null;
1280
+ /** Training framework override. Omit for the server default. */
1281
+ training_framework?: "fal" | "ai-toolkit" | null;
1282
+ }
1283
+ export interface StartTrainingResponse {
1284
+ /** Unique identifier for this training run. */
1285
+ training_run_id: string;
1286
+ /** Coarse state; in_progress right after submission. */
1287
+ state: "in_progress" | "terminal_success" | "terminal_failure";
1288
+ /** Fine-grained run status (e.g. initializing). */
1289
+ raw_status: string;
1290
+ /** Base model the run trains with. */
1291
+ base_model_id?: string | null;
1292
+ /** Timestamp the run was created. */
1293
+ created_at: string;
1294
+ /** Suggested polling interval in seconds. */
1295
+ poll_interval_seconds: number;
1296
+ }
1297
+ export type StyleCategory = "general" | "character" | "object" | "scene" | "effect" | "animation";
1298
+ export interface ToolGuidanceFileTypeSupport {
1299
+ /** Guidance file type, such as init_image, reference_image, first_frame, pose, or depth. */
1300
+ type: string;
1301
+ /** Maximum number of files of this type accepted by the model. */
1302
+ max_count: number;
1303
+ }
1304
+ export interface TrainedModelResponse {
1305
+ /** ID of the trained finetune (LoRA) for the run. */
1306
+ finetune_id: string;
1307
+ reference_set_id: string;
1308
+ base_model_id: string;
1309
+ /** Whether this finetune is the active one for the run's base model. */
1310
+ is_active: boolean;
1311
+ }
1312
+ export interface TrainingRunSummary {
1313
+ training_run_id: string;
1314
+ reference_set_id: string;
1315
+ state: "in_progress" | "terminal_success" | "terminal_failure";
1316
+ raw_status: string;
1317
+ /** Training progress in [0, 1]; 1.0 when complete. */
1318
+ progress: number;
1319
+ started_at?: string | null;
1320
+ }
1321
+ export interface UpdateGroupBody {
1322
+ /** New builtin role to grant members. Send null with no role_id to clear the group's role. */
1323
+ role: Role | null;
1324
+ /** Id of a custom role to grant instead of a builtin `role`. */
1325
+ role_id?: string | null;
1326
+ }
1327
+ export interface UpdateMemberBody {
1328
+ /** New role, if changing. */
1329
+ role?: Role | null;
1330
+ /** New status (active to reactivate, suspended to suspend), if changing. */
1331
+ status?: WorkspaceMembershipStatus | null;
1332
+ }
1333
+ export interface UpdateProjectBody {
1334
+ name?: string | null;
1335
+ description?: string | null;
1336
+ /** 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. */
1337
+ instructions?: string | null;
1338
+ /** Set true to archive, false to unarchive. Omit to leave unchanged. */
1339
+ archived?: boolean | null;
1340
+ }
1341
+ export type UsageLimitPeriod = "daily" | "weekly" | "monthly";
1342
+ export type VideoEffectType = "general" | "orbit_360" | "action_run" | "agent_reveal" | "arc" | "arc_left" | "baseball_kick" | "basketball_dunks" | "boxing" | "buckle_up" | "building_explosion" | "bullet_time" | "car_chasing" | "car_explosion" | "car_grip" | "catch" | "catwalk" | "crane_down" | "crane_over_the_head" | "crane_up" | "crash_zoom_in" | "crash_zoom_out" | "dirty_lens" | "disintegration" | "dolly_in" | "dolly_left" | "dolly_out" | "dolly_right" | "dolly_zoom_in" | "dolly_zoom_out" | "double_dolly" | "downhill_pov" | "dutch_angle" | "eyes_in" | "face_punch" | "fisheye" | "flying" | "focus_change" | "fpv_drone" | "glam" | "handheld" | "head_tracking" | "hyperlapse" | "invisible" | "jib_down" | "jib_up" | "kiss" | "lazy_susan" | "lens_crack" | "lens_flare" | "levitation" | "low_shutter" | "melting" | "moonwalk_left" | "moonwalk_right" | "mouth_in" | "object_pov" | "overhead" | "push_to_glass" | "rap_flex" | "robo_arm" | "set_on_fire" | "skateboard_glide" | "skateboarding" | "skateboard_kickflip" | "skateboard_ollie" | "skate_cruise" | "ski_carving" | "ski_powder" | "snorricam" | "snowboard_carving" | "snowboard_powder" | "soul_jump" | "static" | "super_dolly_in" | "super_dolly_out" | "tentacles" | "through_object_in" | "through_object_out" | "thunder_god" | "tilt_down" | "tilt_up" | "timelapse_human" | "timelapse_landscape" | "turning_metal" | "whip_pan" | "wiggle" | "wind_to_face" | "yoyo_zoom" | "zoom_in" | "zoom_out";
1343
+ export interface WorkflowInput {
1344
+ /** Input parameter name (used as key in execute_workflow inputs) */
1345
+ name: string;
1346
+ /** Parameter type: string, number, boolean, file, prompt, etc. */
1347
+ type: string;
1348
+ /** JSON schema of the input value */
1349
+ value_schema?: Record<string, unknown> | null;
1350
+ /** Whether this input must be provided */
1351
+ required: boolean;
1352
+ /** What this input controls */
1353
+ description: string;
1354
+ /** Human-readable label */
1355
+ display_name?: string | null;
1356
+ /** Default value if not provided */
1357
+ default?: unknown;
1358
+ }
1359
+ export interface WorkflowOutput {
1360
+ /** Output parameter name */
1361
+ name: string;
1362
+ /** Output type: file, string, etc. */
1363
+ type: string;
1364
+ /** JSON schema of the output value */
1365
+ value_schema?: Record<string, unknown> | null;
1366
+ /** What this output contains */
1367
+ description: string;
1368
+ /** Human-readable label */
1369
+ display_name?: string | null;
1370
+ }
1371
+ export interface WorkflowRunAsset {
1372
+ /** Unique identifier of the generated object. */
1373
+ object_id: string;
1374
+ /** Type of generated object: file or asset. */
1375
+ object_type: LibraryObjectType;
1376
+ /** File ID — pass directly as input to forge or workflow runs without re-uploading. */
1377
+ file_id?: string | null;
1378
+ /** Download URL for the asset. */
1379
+ url: string;
1380
+ /** MIME type, e.g. image/png or video/mp4. */
1381
+ content_type: string;
1382
+ /** Image preview URL. */
1383
+ preview_url?: string | null;
1384
+ /** Width in pixels. */
1385
+ width?: number | null;
1386
+ /** Height in pixels. */
1387
+ height?: number | null;
1388
+ /** Duration in seconds for video assets. */
1389
+ duration_seconds?: number | null;
1390
+ /** File size in bytes. */
1391
+ file_size_bytes?: number | null;
1392
+ }
1393
+ export interface WorkflowSummary {
1394
+ /** Unique workflow identifier */
1395
+ workflow_id: string;
1396
+ /** Workflow display name */
1397
+ name: string;
1398
+ /** What this workflow generates */
1399
+ description: string;
1400
+ /** Primary output modality: image, video, three_d, audio */
1401
+ modality?: Modality | null;
1402
+ /** When this workflow version was created */
1403
+ created_at: string;
1404
+ /** When this workflow version was published */
1405
+ published_at?: string | null;
1406
+ /** Input parameters the workflow accepts */
1407
+ inputs: Array<WorkflowInput>;
1408
+ /** Output parameters the workflow produces */
1409
+ outputs: Array<WorkflowOutput>;
1410
+ }
1411
+ export interface WorkspaceInfo {
1412
+ /** The workspace's unique identifier. */
1413
+ workspace_id: string;
1414
+ /** The workspace slug (its representation in the app URL). */
1415
+ slug: string;
1416
+ /** The workspace display name. */
1417
+ name: string;
1418
+ /** Total Creative Units balance before reservations. */
1419
+ balance_creative_units: number;
1420
+ /** Creative Units reserved by in-progress generations. */
1421
+ reserved_creative_units: number;
1422
+ /** Usable balance (balance minus reserved). Can be negative. */
1423
+ available_creative_units: number;
1424
+ /** When the current user was last active in this workspace. */
1425
+ last_active_at: string | null;
1426
+ }
1427
+ export type WorkspaceMembershipStatus = "active" | "suspended";
1428
+ export interface WorkspaceUsageOutput {
1429
+ /** Current Creative Units balance. */
1430
+ balance_creative_units: number;
1431
+ /** Creative Units reserved by in-flight generations. */
1432
+ reserved_creative_units: number;
1433
+ /** Balance minus reserved: what's spendable right now. */
1434
+ available_creative_units: number;
1435
+ /** Start of the reported window (UTC date). */
1436
+ period_start: string;
1437
+ /** End of the reported window (UTC date). */
1438
+ period_end: string;
1439
+ /** Total Creative Units consumed over the window. */
1440
+ total_creative_units: number;
1441
+ /** Per-day Creative Units consumption over the window, oldest first. */
1442
+ daily: Array<DailyUsage>;
1443
+ }