import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class Train extends APIResource { /** * Trigger an action on a model training: cancel */ action(modelID: string, params: TrainActionParams, options?: RequestOptions): APIPromise; /** * Trigger the given `modelId` training */ trigger(modelID: string, params: TrainTriggerParams, options?: RequestOptions): APIPromise; } export interface TrainActionResponse { model: TrainActionResponse.Model; } export declare namespace TrainActionResponse { interface Model { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ id: string; /** * List of model capabilities (example: ["txt2img", "img2img", * "txt2img_ip_adapter", ...]) */ capabilities: Array<'3d23d' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'controlnet' | 'controlnet_img2img' | 'controlnet_inpaint' | 'controlnet_inpaint_ip_adapter' | 'controlnet_ip_adapter' | 'controlnet_reference' | 'controlnet_texture' | 'img23d' | 'img2img' | 'img2img_ip_adapter' | 'img2img_texture' | 'img2txt' | 'img2video' | 'inpaint' | 'inpaint_ip_adapter' | 'outpaint' | 'reference' | 'reference_texture' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2img_ip_adapter' | 'txt2img_texture' | 'txt2txt' | 'txt2video' | 'video23d' | 'video2audio' | 'video2img' | 'video2video'>; /** * A list of CollectionId this model belongs to */ collectionIds: Array; /** * The model creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * Whether the model is a custom model and can be used only with POST * /generate/custom/{modelId} endpoint */ custom: boolean; /** * List of all example asset IDs setup by the model owner */ exampleAssetIds: Array; /** * The privacy of the model (default: private) */ privacy: 'private' | 'public' | 'unlisted'; /** * The source of the model */ source: 'civitai' | 'huggingface' | 'other' | 'scenario'; /** * The model status */ status: 'copying' | 'failed' | 'new' | 'trained' | 'training' | 'training-canceled'; /** * The associated tags (example: ["sci-fi", "landscape"]) */ tags: Array; /** * The total number of training images */ trainingImagesNumber: number; /** * The model type (example: "flux.1-lora") */ type: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'; /** * The model last update date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan * 75: Team plan 100: Enterprise plan */ accessRestrictions?: 0 | 100 | 25 | 50 | 75; /** * The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q") */ authorId?: string; /** * The class of the model */ class?: Model.Class; /** * List of base model IDs compliant with the model (example: ["flux.1-dev", * "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models */ compliantModelIds?: Array; /** * The concepts is required for the type model: composition */ concepts?: Array; /** * When true, credits spent on a generation with this model are not automatically * refunded if the generation fails. Absent or false means failed generations are * refunded as usual. */ disableRefund?: boolean; /** * The epoch of the model. Only available for Flux Lora Trained models. If not set, * uses the final model epoch (latest) */ epoch?: string; /** * The epochs of the model. Only available for Flux Lora Trained models. */ epochs?: Array; /** * The inputs of the model. Only used for custom models. To retrieve this list, get * it by modelId with GET /models/{modelId} */ inputs?: Array; /** * The model keyword, this is a legacy parameter, please use conceptPrompt in * parameters */ modelKeyword?: string; /** * The model name (example: "Cinematic Realism") */ name?: string; /** * Fine-tune the model's inferences with negative prompt embedding */ negativePromptEmbedding?: string; /** * The owner ID (example: "team_VFhihHKMRZyDDnZAJwLb2Q") */ ownerId?: string; /** * The parameters of the model */ parameters?: Model.Parameters; /** * The id of the parent model */ parentModelId?: string; /** * Aggregated performance stats */ performanceStats?: Model.PerformanceStats; /** * Fine-tune the model's inferences with prompt embedding */ promptEmbedding?: string; /** * The model short description (example: "This model generates highly detailed * cinematic scenes.") */ shortDescription?: string; /** * The date when the model will be soft deleted (only for Free plan) */ softDeletionOn?: string; /** * A thumbnail for your model */ thumbnail?: Model.Thumbnail; /** * Array of training image pairs */ trainingImagePairs?: Array; /** * The URLs of the first 3 training images of the model. To retrieve the full set * of images, get it by modelId */ trainingImages?: Array; /** * Additional information about the training progress of the model */ trainingProgress?: Model.TrainingProgress; /** * Additional information about the model's training */ trainingStats?: Model.TrainingStats; /** * The UI configuration for the model */ uiConfig?: Model.UiConfig; /** * (Deprecated) The user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q") */ userId?: string; } namespace Model { /** * The class of the model */ interface Class { /** * The category slug of the class (example: "art-style") */ category: string; /** * The concept prompt of the class (example: "a sks character design") */ conceptPrompt: string; /** * The model ID of the class. Only available for legacy models. */ modelId: string; /** * The class name (example: "Character Design") */ name: string; /** * The class prompt (example: "a character design") */ prompt: string; /** * The class slug (example: "art-style-character-design") */ slug: string; /** * The class status (only published classes are listed, but unpublished classes can * still appear in existing models) */ status: 'published' | 'unpublished'; /** * Some example images URLs to showcase the class */ thumbnails: Array; } interface Concept { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ modelId: string; /** * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale * is between 0 and 2. */ scale: number; /** * The epoch of the model (example: "000001") Only available for Flux Lora Trained * models */ modelEpoch?: string; } interface Epoch { /** * The epoch hash to identify the epoch */ epoch: string; /** * The assets of the epoch if sample prompts as been supplied during training */ assets?: Array; } namespace Epoch { interface Asset { /** * The AssetId of the image during training (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the asset */ url: string; } } /** * Defines the input parameters for a model. Use this to understand the available * input parameters for a given `modelId` when calling * `POST /generate/custom/{modelId}`. See {@link * https://docs.scenario.com/get-started/generation/video-generation} for examples. */ interface Input { /** * The name that must be user to call the model through the API */ name: string; /** * The data type of the input */ type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array'; /** * The allowed values for the input. For \`string\` or \`number\` types, creates a * single-select dropdown. For \`string_array\` type, creates a multi-select * dropdown. */ allowedValues?: Array; /** * Specifies the background behavior for the input. Only available for \`file\` and * \`file_array\` input types with kind \`image\`. */ backgroundBehavior?: 'opaque' | 'transparent'; /** * Whether the input is a color or not. Only available for \`string\` input type. */ color?: boolean; /** * Whether this input affects the model's cost calculation */ costImpact?: boolean; /** * The default value for the input */ default?: unknown; /** * Help text displayed in the UI to provide additional information about the input */ description?: string; /** * Used to visually group inputs together in the UI. Inputs with the same group * value appear consecutively in the UI. */ group?: string; /** * Hint text displayed in the UI as a tooltip to guide the user */ hint?: string; /** * The list of inputs which form an object within a container array. All inputs are * the same as the current object. This is only available for type inputs_array * inputs. */ inputs?: Array<{ [key: string]: unknown; }>; /** * The asset kind of the input. Only taken into account for \`file\` and * \`file_array\` input types. If model provides multiple kinds, the input will be * not able to create the asset on the flight on API side with dataurl without * data:kind, prefix */ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The label displayed in the UI for this input */ label?: string; /** * The name of the file input field to use as the mask source */ maskFrom?: string; /** * The maximum allowed value. Only available for \`number\` and \`array\` input * types. */ max?: number; /** * The maximum allowed media duration in seconds. Only applies to \`file\` and * \`file_array\` input types for video and audio assets. Validated against * \`asset.properties.duration\` at job creation time. */ maxDuration?: number; /** * The maximum allowed length for \`string\` inputs. Also applies to each item in * \`string_array\`. */ maxLength?: number; /** * The maximum allowed file size in bytes. Only applies to \`file\` and * \`file_array\` input types. Validated against \`asset.properties.size\` at job * creation time. */ maxSize?: number; /** * The minimum allowed value. Only available for \`number\` and array input types. */ min?: number; /** * The minimum allowed length for string inputs. Also applies to each item in * \`string_array\`. */ minLength?: number; /** * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only * available for \`model_array\` input type. */ modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>; /** * Whether this input represents a parent asset to assign to the produced assets. * Only available for \`file\` and \`file_array\` input types. * * For \`file_array\`, the parent asset is the first item in the array. */ parent?: boolean; /** * Placeholder text for the input. Only available for 'string' input type. */ placeholder?: string; /** * Whether the input is a prompt. When true, displays as a text area with prompt * spark feature. Only available for \`string\` input type. */ prompt?: boolean; /** * Whether the input is used with prompt spark. Only available for \`string\` input * type. */ promptSpark?: boolean; /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ required?: Input.Required; /** * The step increment for numeric inputs. Only available for \`number\` input type. */ step?: number; } namespace Input { /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ interface Required { /** * Whether the input is always required */ always?: boolean; /** * Makes this input required when another input has a specific value: * * - Key: name of the input to check * - Value: operation and allowed values that trigger the requirement */ conditionalValues?: unknown; /** * Makes this input required when another input is defined: * * - Key: name of the input that must be defined * - Value: message to display when this input is required */ ifDefined?: unknown; /** * Makes this input required when another input is not defined: * * - Key: name of the input that must be undefined * - Value: message to display when this input is required */ ifNotDefined?: unknown; } } /** * The parameters of the model */ interface Parameters { /** * Age group of the voice (for professional cloning) * * Only available for ElevenLabs voice training */ age?: string; /** * The batch size Less steps, and will increase the learning rate * * Only available for Flux LoRA training */ batchSize?: number; /** * The prompt to specify images in the same class as provided instance images * * Deprecated legacy training parameter. */ classPrompt?: string; /** * Type of voice cloning: "instant" (fast) or "professional" (higher quality, * requires captcha) * * Only available for ElevenLabs voice training */ cloneType?: string; /** * The prompt with identifier specifying the instance (or subject) of the class * (example: "a daiton dog") * * Default value varies depending on the model type. For Flux LoRA, the default is * an empty string. */ conceptPrompt?: string; /** * Gender of the voice (for professional cloning) * * Only available for ElevenLabs voice training */ gender?: string; /** * Language of the audio samples (ISO 639-1 code) * * Only available for ElevenLabs voice training */ language?: string; /** * Initial learning rate (after the potential warmup period) * * Default value varies depending on the model type. For Flux LoRA, the default is * 0.0001. */ learningRate?: number; /** * Initial learning rate (after the potential warmup period) for the text encoder * * Maximum [Flux LoRA: 0.001] Default [Flux LoRA: 0.00001] Minimum [Flux LoRA: * 0.000001] */ learningRateTextEncoder?: number; /** * Initial learning rate (after the potential warmup period) for the UNet * * Deprecated legacy training parameter. */ learningRateUnet?: number; /** * The scheduler type to use (default: "constant") * * Deprecated legacy training parameter. */ lrScheduler?: 'constant' | 'constant-with-warmup' | 'cosine' | 'cosine-with-restarts' | 'linear' | 'polynomial'; /** * Maximum number of training steps to execute (default: varies depending on the * model type) * * Default value varies depending on the model type: * * - For Flux: number of training images \* 100 * * Maximum value varies depending on the model type: * * - For Flux: [0, 10000] */ maxTrainSteps?: number; /** * The number of epochs to train for * * Only available for Flux LoRA training */ nbEpochs?: number; /** * The number of times to repeat the training * * Only available for Flux LoRA training */ nbRepeats?: number; /** * The number of training steps for the text encoder * * Deprecated legacy training parameter. */ numTextTrainSteps?: number; /** * The number of training steps for the UNet * * Deprecated legacy training parameter. */ numUNetTrainSteps?: number; /** * Optimize the model training task for a specific type of input images. The * available values are: * * - "likeness": optimize training for likeness or portrait (targets specific * transformer blocks) * - "all": train all transformer blocks * - "none": train no specific transformer blocks * * This parameter controls which double and single transformer blocks are trained * during the LoRA training process. * * Only available for Flux LoRA training */ optimizeFor?: 'likeness'; /** * The weight of prior preservation loss * * Deprecated legacy training parameter. */ priorLossWeight?: number; /** * Whether to random crop or center crop images before resizing to the working * resolution * * Deprecated legacy training parameter. */ randomCrop?: boolean; /** * Ratio of random crops * * Deprecated legacy training parameter. */ randomCropRatio?: number; /** * Scale of random crops * * Deprecated legacy training parameter. */ randomCropScale?: number; /** * The dimension of the LoRA update matrices * * Only available for Flux LoRA and Musubi training * * Default value varies depending on the model type: * * - For Flux: 16 * - For Musubi: 64 * * Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2; * 128]) */ rank?: number; /** * Whether to remove background noise from audio samples before cloning. When * enabled, each sample must be at least 5 seconds long. * * Only available for ElevenLabs voice training */ removeBackgroundNoise?: boolean; /** * The prompts to use for each epoch Only available for Flux LoRA training */ samplePrompts?: Array; /** * The sample prompt images (AssetIds) paired with samplePrompts Only available for * Flux LoRA training Must be the same length as samplePrompts */ sampleSourceImages?: Array; /** * Whether to scale the learning rate * * Note: Legacy parameter, will be ignored * * Deprecated legacy training parameter. */ scaleLr?: boolean; /** * Used to reproduce previous results. Default: randomly generated number. * * Deprecated legacy training parameter. */ seed?: number; /** * Whether to train the text encoder or not * * Example: For 100 steps and a value of 0.2, it means that the text encoder will * be trained for 20 steps and then the UNet for 80 steps * * Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps` * * Deprecated legacy training parameter. */ textEncoderTrainingRatio?: number; /** * Validation frequency. Cannot be greater than maxTrainSteps value * * Deprecated legacy training parameter. */ validationFrequency?: number; /** * Validation prompt * * Deprecated legacy training parameter. */ validationPrompt?: string; /** * Description of the voice characteristics * * Only available for ElevenLabs voice training */ voiceDescription?: string; /** * The Weights And Bias key to use for logging. The maximum length is 40 characters */ wandbKey?: string; } /** * Aggregated performance stats */ interface PerformanceStats { /** * Performance metrics per variant */ variants: Array; /** * Default variant key for quick model comparison */ default?: string; } namespace PerformanceStats { /** * Performance stats for a model variant */ interface Variant { /** * The generation capability (example: "txt2img", "img2video", "txt2audio") */ capability: string; /** * When these stats were last computed (ISO date) */ computedAt: string; /** * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio") */ variantKey: string; /** * External quality score from arena.ai leaderboard */ arenaScore?: Variant.ArenaScore; /** * Maximum cost per output asset (CU) */ costPerAssetMaxCU?: number; /** * Minimum cost per output asset (CU) */ costPerAssetMinCU?: number; /** * Median cost per output asset (CU) */ costPerAssetP50CU?: number; /** * Inference latency P50 per output asset (seconds) */ inferenceLatencyP50Sec?: number; /** * Inference latency P75 per output asset (seconds) */ inferenceLatencyP75Sec?: number; /** * The resolution bucket (example: "0.5K", "1K", "2K", "4K") */ resolution?: string; /** * Total latency P50 per output asset, including queue time (seconds) */ totalLatencyP50Sec?: number; /** * Total latency P75 per output asset, including queue time (seconds) */ totalLatencyP75Sec?: number; } namespace Variant { /** * External quality score from arena.ai leaderboard */ interface ArenaScore { /** * Arena category (example: "text_to_image", "image_to_video") */ arenaCategory: string; /** * Model name on arena.ai */ arenaModelName: string; /** * When this score was last fetched (ISO date) */ fetchedAt: string; /** * Rank in the arena category */ rank: number; /** * ELO rating */ rating: number; /** * ELO rating confidence interval lower bound */ ratingLower: number; /** * ELO rating confidence interval upper bound */ ratingUpper: number; /** * Number of human votes */ votes: number; } } } /** * A thumbnail for your model */ interface Thumbnail { /** * The AssetId of the image used as a thumbnail for your model (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the image used as a thumbnail for your model */ url: string; } interface TrainingImagePair { /** * The instruction for the image pair, source to target */ instruction?: string; /** * The source asset ID (must be a training asset) */ sourceId?: string; /** * The target asset ID (must be a training asset) */ targetId?: string; } interface TrainingImage { /** * The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * Automatic captioning of the image */ automaticCaptioning: string; /** * The training image upload date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * Description for the image */ description: string; /** * The URL of the image */ downloadUrl: string; /** * The original file name of the image (example: "my-training-image.jpg") */ name: string; } /** * Additional information about the training progress of the model */ interface TrainingProgress { /** * The stage of the request */ stage: 'pending' | 'pending-captcha' | 'queued-for-train' | 'ready-for-captcha' | 'running-train' | 'starting-train'; /** * Timestamp in milliseconds of the last time the training progress was updated */ updatedAt: number; /** * Signed URL of the captcha image to read aloud during PVC voice cloning. Only * present when stage === 'pending-captcha'. Overwritten on each retry. */ captchaImageUrl?: string; /** * Position of the job in the queue (ie. the number of job in the queue before this * one) */ position?: number; /** * The progress of the job */ progress?: number; /** * The remaining time in milliseconds */ remainingTimeMs?: number; /** * Last recoverable failure message during PVC. Present when the model has bounced * back to stage === 'ready-for-captcha' after a step 2 or step 3 failure (e.g. * captcha rejected, time limit exceeded). Surface above the retry button so the * user understands why they're back here. */ retryableError?: string; /** * Number of consecutive PVC step 2 / step 3 failures on this voice model. The * model is marked Failed when this reaches the platform's max retries. */ retryCount?: number; /** * The timestamp in millisecond marking the start of the process */ startedAt?: number; } /** * Additional information about the model's training */ interface TrainingStats { /** * The training end time as an ISO date string */ endedAt?: string; /** * The training queued duration in seconds */ queueDuration?: number; /** * The training start time as an ISO date string */ startedAt?: string; /** * The training duration in seconds */ trainDuration?: number; } /** * The UI configuration for the model */ interface UiConfig { /** * Configuration for the input properties */ inputProperties?: { [key: string]: UiConfig.InputProperties; }; /** * Configuration for the loras component */ lorasComponent?: UiConfig.LorasComponent; /** * Configuration for the presets */ presets?: Array; /** * Configuration for the resolution component */ resolutionComponent?: UiConfig.ResolutionComponent; /** * Configuration for the selects */ selects?: { [key: string]: unknown; }; /** * Configuration for the trigger generate button */ triggerGenerate?: UiConfig.TriggerGenerate; } namespace UiConfig { interface InputProperties { collapsed?: boolean; } /** * Configuration for the loras component */ interface LorasComponent { /** * The label of the component */ label: string; /** * The input name of the model (model_array) */ modelInput: string; /** * The input name of the scale (number_array) */ scaleInput: string; /** * The input model id (example: a composition or a single LoRA modelId) If * specified, the model id will be attached to the output asset as a metadata If * the model-decomposer parser is specified on it, modelInput and scaleInput will * be automatically populated */ modelIdInput?: string; } interface Preset { fields: Array; presets: unknown; } /** * Configuration for the resolution component */ interface ResolutionComponent { /** * The input name of the height */ heightInput: string; /** * The label of the component */ label: string; /** * The resolution presets */ presets: Array; /** * The input name of the width */ widthInput: string; } namespace ResolutionComponent { interface Preset { height: number; label: string; width: number; } } /** * Configuration for the trigger generate button */ interface TriggerGenerate { label: string; /** * The 'name' of the input where the trigger generate button will be displayed * (after the input). Do not specify both position and after. */ after?: string; /** * The position of the trigger generate button. If position specified, the button * will be displayed at the specified position. Do not specify both position and * after. */ position?: 'bottom' | 'top'; } } } } export interface TrainTriggerResponse { job: TrainTriggerResponse.Job; model: TrainTriggerResponse.Model; /** * Compute Units cost per billing action for this request, after discount. Values * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero * charge appear. Lets clients split the total (e.g. generation vs * `slop-detection`) — including on dryRun estimates. */ costDetails?: TrainTriggerResponse.CostDetails; /** * The Compute Units cost for the request billed */ creativeUnitsCost?: number; /** * The Compute Units discount for the request billed */ creativeUnitsDiscount?: number; /** * IP detection findings, when detection ran for this request. */ ipDetection?: TrainTriggerResponse.IPDetection; } export declare namespace TrainTriggerResponse { interface Job { /** * The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8") */ jobId: string; /** * The type of job */ jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'musubi-model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'splat' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow'; /** * Metadata of the job with some additional information */ metadata: Job.Metadata; /** * Progress of the job (between 0 and 1) */ progress: number; /** * The current status of the job */ status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up'; /** * The history of the different statuses the job went through with the ISO string * date of when the job reached each statuses. */ statusHistory: Array; /** * The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") */ authorId?: string; /** * The billing of the job */ billing?: Job.Billing; /** * The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D") */ ownerId?: string; } namespace Job { /** * Metadata of the job with some additional information */ interface Metadata { /** * List of produced assets for this job */ assetIds?: Array; /** * Eventual error for the job */ error?: string | null; /** * The flow of the job. Only available for workflow jobs. */ flow?: Array; /** * Actionable hint for the user explaining what went wrong and how to resolve it. */ hint?: string; /** * The inputs for the job */ input?: { [key: string]: unknown; }; /** * May contain the output of the job for specific custom models jobs. Only * available for custom models which generate non-assets outputs. Example: LLM text * results. */ output?: { [key: string]: unknown; }; /** * For voice-clone jobs: the ID of the model being trained. */ outputModelId?: string; /** * The workflow ID of the job if job is part of a workflow. */ workflowId?: string; /** * The workflow job ID of the job if job is part of a workflow job. */ workflowJobId?: string; } namespace Metadata { interface Flow { /** * The id of the node. */ id: string; /** * The status of the node. Only available for WorkflowJob nodes. */ status: 'failure' | 'pending' | 'processing' | 'rejected' | 'skipped' | 'success'; /** * The type of the job for the node. */ type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow'; /** * List of produced assets for this node. */ assets?: Array; /** * Fixed number of iterations for a ForEach node. When set, the loop runs exactly * `count` times regardless of array input. When not set, the loop iterates over * the resolved array input. Only available for ForEach nodes. */ count?: number; /** * The nodes that this node depends on. Only available for nodes that have * dependencies. Mainly used for user approval nodes. */ dependsOn?: Array; /** * If true, the outputs of this node will be included in the workflow job's final * output. Only applicable to producing nodes (custom-model, inference, etc.). By * default, only last nodes (nodes not referenced by other nodes) contribute to * outputs. Set this to true to also include intermediate nodes in the final * output. Note: This should only be set to `true` or left undefined. */ includeOutputsInWorkflowJob?: true; /** * The inputs of the node. */ inputs?: Array; /** * Statically-configured items for a List node. The node outputs this array as-is * when executed. Only available for List nodes. The values can be strings, * numbers, or asset IDs. */ items?: Array; /** * Zero-based index of the iteration this node copy belongs to. Set on * dynamically-created copies of loop body nodes. */ iterationIndex?: number; /** * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is * only available for nodes started. A node "Pending" for a running workflow job is * not started. */ jobId?: string; /** * The logic of the node. Only available for logic nodes. */ logic?: Flow.Logic; /** * The type of the logic for the node. Only available for logic nodes. */ logicType?: 'if-else'; /** * IDs of the body template nodes that belong to this ForEach loop. At runtime * these templates are cloned once per iteration and marked Skipped. Only available * for ForEach nodes. */ loopBodyNodeIds?: Array; /** * ID of the ForEach node that spawned this iteration copy. Set on * dynamically-created copies of loop body nodes. */ loopNodeId?: string; /** * The model id for the node. Mainly used for custom model tasks. */ modelId?: string; /** * The output of the node. Only available for logic nodes. */ output?: unknown; /** * The workflow id for the node. Mainly used for workflow tasks. */ workflowId?: string; } namespace Flow { interface Asset { assetId: string; url: string; } /** * This is used to run the flow. */ interface Input { /** * The name that must be user to call the model through the API */ name: string; /** * The data type of the input */ type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array'; /** * The allowed values for the input. For \`string\` or \`number\` types, creates a * single-select dropdown. For \`string_array\` type, creates a multi-select * dropdown. */ allowedValues?: Array; /** * Specifies the background behavior for the input. Only available for \`file\` and * \`file_array\` input types with kind \`image\`. */ backgroundBehavior?: 'opaque' | 'transparent'; /** * Whether the input is a color or not. Only available for \`string\` input type. */ color?: boolean; /** * Whether this input affects the model's cost calculation */ costImpact?: boolean; /** * The default value for the input */ default?: unknown; /** * Help text displayed in the UI to provide additional information about the input */ description?: string; /** * Used to visually group inputs together in the UI. Inputs with the same group * value appear consecutively in the UI. */ group?: string; /** * Hint text displayed in the UI as a tooltip to guide the user */ hint?: string; /** * The list of inputs which form an object within a container array. All inputs are * the same as the current object. This is only available for type inputs_array * inputs. */ inputs?: Array<{ [key: string]: unknown; }>; /** * The configured items for inputs_array type inputs. Each item is an array of * SubNodeInput that need ref/value resolution. Only available for inputs_array * type. */ items?: Array>; /** * The asset kind of the input. Only taken into account for \`file\` and * \`file_array\` input types. If model provides multiple kinds, the input will be * not able to create the asset on the flight on API side with dataurl without * data:kind, prefix */ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The label displayed in the UI for this input */ label?: string; /** * The name of the file input field to use as the mask source */ maskFrom?: string; /** * The maximum allowed value. Only available for \`number\` and \`array\` input * types. */ max?: number; /** * The maximum allowed media duration in seconds. Only applies to \`file\` and * \`file_array\` input types for video and audio assets. Validated against * \`asset.properties.duration\` at job creation time. */ maxDuration?: number; /** * The maximum allowed length for \`string\` inputs. Also applies to each item in * \`string_array\`. */ maxLength?: number; /** * The maximum allowed file size in bytes. Only applies to \`file\` and * \`file_array\` input types. Validated against \`asset.properties.size\` at job * creation time. */ maxSize?: number; /** * The minimum allowed value. Only available for \`number\` and array input types. */ min?: number; /** * The minimum allowed length for string inputs. Also applies to each item in * \`string_array\`. */ minLength?: number; /** * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only * available for \`model_array\` input type. */ modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>; /** * Whether this input represents a parent asset to assign to the produced assets. * Only available for \`file\` and \`file_array\` input types. * * For \`file_array\`, the parent asset is the first item in the array. */ parent?: boolean; /** * Placeholder text for the input. Only available for 'string' input type. */ placeholder?: string; /** * Whether the input is a prompt. When true, displays as a text area with prompt * spark feature. Only available for \`string\` input type. */ prompt?: boolean; /** * Whether the input is used with prompt spark. Only available for \`string\` input * type. */ promptSpark?: boolean; /** * The reference to another input or output of the same workflow. Must have at * least one of node or conditional. */ ref?: Input.Ref; /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ required?: Input.Required; /** * The step increment for numeric inputs. Only available for \`number\` input type. */ step?: number; /** * The value of the input. This is the value of the input that will be used to run * the node. Only available for flows managed by a WorkflowJob. */ value?: unknown; } namespace Input { /** * A sub-input within an inputs_array item. Same as NodeInput but without the * recursive items field. */ interface Item { /** * The name that must be user to call the model through the API */ name: string; /** * The data type of the input */ type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array'; /** * The allowed values for the input. For \`string\` or \`number\` types, creates a * single-select dropdown. For \`string_array\` type, creates a multi-select * dropdown. */ allowedValues?: Array; /** * Specifies the background behavior for the input. Only available for \`file\` and * \`file_array\` input types with kind \`image\`. */ backgroundBehavior?: 'opaque' | 'transparent'; /** * Whether the input is a color or not. Only available for \`string\` input type. */ color?: boolean; /** * Whether this input affects the model's cost calculation */ costImpact?: boolean; /** * The default value for the input */ default?: unknown; /** * Help text displayed in the UI to provide additional information about the input */ description?: string; /** * Used to visually group inputs together in the UI. Inputs with the same group * value appear consecutively in the UI. */ group?: string; /** * Hint text displayed in the UI as a tooltip to guide the user */ hint?: string; /** * The list of inputs which form an object within a container array. All inputs are * the same as the current object. This is only available for type inputs_array * inputs. */ inputs?: Array<{ [key: string]: unknown; }>; /** * The asset kind of the input. Only taken into account for \`file\` and * \`file_array\` input types. If model provides multiple kinds, the input will be * not able to create the asset on the flight on API side with dataurl without * data:kind, prefix */ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The label displayed in the UI for this input */ label?: string; /** * The name of the file input field to use as the mask source */ maskFrom?: string; /** * The maximum allowed value. Only available for \`number\` and \`array\` input * types. */ max?: number; /** * The maximum allowed media duration in seconds. Only applies to \`file\` and * \`file_array\` input types for video and audio assets. Validated against * \`asset.properties.duration\` at job creation time. */ maxDuration?: number; /** * The maximum allowed length for \`string\` inputs. Also applies to each item in * \`string_array\`. */ maxLength?: number; /** * The maximum allowed file size in bytes. Only applies to \`file\` and * \`file_array\` input types. Validated against \`asset.properties.size\` at job * creation time. */ maxSize?: number; /** * The minimum allowed value. Only available for \`number\` and array input types. */ min?: number; /** * The minimum allowed length for string inputs. Also applies to each item in * \`string_array\`. */ minLength?: number; /** * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only * available for \`model_array\` input type. */ modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>; /** * Whether this input represents a parent asset to assign to the produced assets. * Only available for \`file\` and \`file_array\` input types. * * For \`file_array\`, the parent asset is the first item in the array. */ parent?: boolean; /** * Placeholder text for the input. Only available for 'string' input type. */ placeholder?: string; /** * Whether the input is a prompt. When true, displays as a text area with prompt * spark feature. Only available for \`string\` input type. */ prompt?: boolean; /** * Whether the input is used with prompt spark. Only available for \`string\` input * type. */ promptSpark?: boolean; /** * The reference to another input or output of the same workflow. Must have at * least one of node or conditional. */ ref?: Item.Ref; /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ required?: Item.Required; /** * The step increment for numeric inputs. Only available for \`number\` input type. */ step?: number; /** * The value of the input. This is the value of the input that will be used to run * the node. Only available for flows managed by a WorkflowJob. */ value?: unknown; } namespace Item { /** * The reference to another input or output of the same workflow. Must have at * least one of node or conditional. */ interface Ref { /** * The conditional nodes to reference. If the conditional nodes are successful, the * node will be successful. If the conditional nodes are skipped, the node will be * skipped. Contains an array of node ids used to check the status of the nodes. */ conditional?: Array; /** * This is the desired node output value if ref is an if/else node. */ equal?: string; /** * The name of the input or output to reference. If the type is 'workflow', the * name is the name of the input of the workflow is required If the type is 'node', * the name is not mandatory, except if you want all outputs of the node. To get * all outputs of a node, you can use the name 'all'. */ name?: string; /** * The node id or 'workflow' if the source is a workflow input. */ node?: string; } /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ interface Required { /** * Whether the input is always required */ always?: boolean; /** * Makes this input required when another input has a specific value: * * - Key: name of the input to check * - Value: operation and allowed values that trigger the requirement */ conditionalValues?: unknown; /** * Makes this input required when another input is defined: * * - Key: name of the input that must be defined * - Value: message to display when this input is required */ ifDefined?: unknown; /** * Makes this input required when another input is not defined: * * - Key: name of the input that must be undefined * - Value: message to display when this input is required */ ifNotDefined?: unknown; } } /** * The reference to another input or output of the same workflow. Must have at * least one of node or conditional. */ interface Ref { /** * The conditional nodes to reference. If the conditional nodes are successful, the * node will be successful. If the conditional nodes are skipped, the node will be * skipped. Contains an array of node ids used to check the status of the nodes. */ conditional?: Array; /** * This is the desired node output value if ref is an if/else node. */ equal?: string; /** * The name of the input or output to reference. If the type is 'workflow', the * name is the name of the input of the workflow is required If the type is 'node', * the name is not mandatory, except if you want all outputs of the node. To get * all outputs of a node, you can use the name 'all'. */ name?: string; /** * The node id or 'workflow' if the source is a workflow input. */ node?: string; } /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ interface Required { /** * Whether the input is always required */ always?: boolean; /** * Makes this input required when another input has a specific value: * * - Key: name of the input to check * - Value: operation and allowed values that trigger the requirement */ conditionalValues?: unknown; /** * Makes this input required when another input is defined: * * - Key: name of the input that must be defined * - Value: message to display when this input is required */ ifDefined?: unknown; /** * Makes this input required when another input is not defined: * * - Key: name of the input that must be undefined * - Value: message to display when this input is required */ ifNotDefined?: unknown; } } /** * The logic of the node. Only available for logic nodes. */ interface Logic { /** * The cases of the logic. Only available for if/else nodes. */ cases?: Array; /** * The default case of the logic. Contains the id/output of the node to execute if * no case is matched. Only available for if/else nodes. */ default?: string; /** * The transform of the logic. Only available for transform nodes. */ transform?: string; } namespace Logic { interface Case { condition: string; value: string; } } } } interface StatusHistory { date: string; status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up'; } /** * The billing of the job */ interface Billing { cuCost: number; cuDiscount: number; /** * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on * top of the generation itself, such as `slop-detection`. * * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the * values here. * * Two caveats when displaying it: * * - These are a remaining refundable balance, not a receipt: a job that failed or * was cancelled has had its add-ons refunded, so they read 0 while `cuCost` * still shows the main action's original charge. * - `ip-detection` is part of the shape but is never populated today: that fee is * charged outside the job and reported once, as * `ipDetection.creativeUnitsCharged`, in the response of the request that ran * it. * * Absent when the job paid for no add-on. */ cuCostDetails?: Billing.CuCostDetails; /** * When true, the credits charged for this job are not automatically refunded if * the generation fails, because the model used does not support refund-on-failure. * Absent or false means a failed generation is refunded as usual. */ disableRefund?: boolean; } namespace Billing { /** * Compute Units charged for the ADD-ONS of this job, per action — the fees paid on * top of the generation itself, such as `slop-detection`. * * `cuCost` above is the main action alone, so the job's total is `cuCost` plus the * values here. * * Two caveats when displaying it: * * - These are a remaining refundable balance, not a receipt: a job that failed or * was cancelled has had its add-ons refunded, so they read 0 while `cuCost` * still shows the main action's original charge. * - `ip-detection` is part of the shape but is never populated today: that fee is * charged outside the job and reported once, as * `ipDetection.creativeUnitsCharged`, in the response of the request that ran * it. * * Absent when the job paid for no add-on. */ interface CuCostDetails { 'ip-detection'?: number; 'slop-detection'?: number; } } } interface Model { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ id: string; /** * List of model capabilities (example: ["txt2img", "img2img", * "txt2img_ip_adapter", ...]) */ capabilities: Array<'3d23d' | 'audio2audio' | 'audio2txt' | 'audio2video' | 'controlnet' | 'controlnet_img2img' | 'controlnet_inpaint' | 'controlnet_inpaint_ip_adapter' | 'controlnet_ip_adapter' | 'controlnet_reference' | 'controlnet_texture' | 'img23d' | 'img2img' | 'img2img_ip_adapter' | 'img2img_texture' | 'img2txt' | 'img2video' | 'inpaint' | 'inpaint_ip_adapter' | 'outpaint' | 'reference' | 'reference_texture' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2img_ip_adapter' | 'txt2img_texture' | 'txt2txt' | 'txt2video' | 'video23d' | 'video2audio' | 'video2img' | 'video2video'>; /** * A list of CollectionId this model belongs to */ collectionIds: Array; /** * The model creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * Whether the model is a custom model and can be used only with POST * /generate/custom/{modelId} endpoint */ custom: boolean; /** * List of all example asset IDs setup by the model owner */ exampleAssetIds: Array; /** * The privacy of the model (default: private) */ privacy: 'private' | 'public' | 'unlisted'; /** * The source of the model */ source: 'civitai' | 'huggingface' | 'other' | 'scenario'; /** * The model status */ status: 'copying' | 'failed' | 'new' | 'trained' | 'training' | 'training-canceled'; /** * The associated tags (example: ["sci-fi", "landscape"]) */ tags: Array; /** * The total number of training images */ trainingImagesNumber: number; /** * The model type (example: "flux.1-lora") */ type: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'; /** * The model last update date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ updatedAt: string; /** * The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan * 75: Team plan 100: Enterprise plan */ accessRestrictions?: 0 | 100 | 25 | 50 | 75; /** * The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q") */ authorId?: string; /** * The class of the model */ class?: Model.Class; /** * List of base model IDs compliant with the model (example: ["flux.1-dev", * "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models */ compliantModelIds?: Array; /** * The concepts is required for the type model: composition */ concepts?: Array; /** * When true, credits spent on a generation with this model are not automatically * refunded if the generation fails. Absent or false means failed generations are * refunded as usual. */ disableRefund?: boolean; /** * The epoch of the model. Only available for Flux Lora Trained models. If not set, * uses the final model epoch (latest) */ epoch?: string; /** * The epochs of the model. Only available for Flux Lora Trained models. */ epochs?: Array; /** * The inputs of the model. Only used for custom models. To retrieve this list, get * it by modelId with GET /models/{modelId} */ inputs?: Array; /** * The model keyword, this is a legacy parameter, please use conceptPrompt in * parameters */ modelKeyword?: string; /** * The model name (example: "Cinematic Realism") */ name?: string; /** * Fine-tune the model's inferences with negative prompt embedding */ negativePromptEmbedding?: string; /** * The owner ID (example: "team_VFhihHKMRZyDDnZAJwLb2Q") */ ownerId?: string; /** * The parameters of the model */ parameters?: Model.Parameters; /** * The id of the parent model */ parentModelId?: string; /** * Aggregated performance stats */ performanceStats?: Model.PerformanceStats; /** * Fine-tune the model's inferences with prompt embedding */ promptEmbedding?: string; /** * The model short description (example: "This model generates highly detailed * cinematic scenes.") */ shortDescription?: string; /** * The date when the model will be soft deleted (only for Free plan) */ softDeletionOn?: string; /** * A thumbnail for your model */ thumbnail?: Model.Thumbnail; /** * Array of training image pairs */ trainingImagePairs?: Array; /** * The URLs of the first 3 training images of the model. To retrieve the full set * of images, get it by modelId */ trainingImages?: Array; /** * Additional information about the training progress of the model */ trainingProgress?: Model.TrainingProgress; /** * Additional information about the model's training */ trainingStats?: Model.TrainingStats; /** * The UI configuration for the model */ uiConfig?: Model.UiConfig; /** * (Deprecated) The user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q") */ userId?: string; } namespace Model { /** * The class of the model */ interface Class { /** * The category slug of the class (example: "art-style") */ category: string; /** * The concept prompt of the class (example: "a sks character design") */ conceptPrompt: string; /** * The model ID of the class. Only available for legacy models. */ modelId: string; /** * The class name (example: "Character Design") */ name: string; /** * The class prompt (example: "a character design") */ prompt: string; /** * The class slug (example: "art-style-character-design") */ slug: string; /** * The class status (only published classes are listed, but unpublished classes can * still appear in existing models) */ status: 'published' | 'unpublished'; /** * Some example images URLs to showcase the class */ thumbnails: Array; } interface Concept { /** * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w") */ modelId: string; /** * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale * is between 0 and 2. */ scale: number; /** * The epoch of the model (example: "000001") Only available for Flux Lora Trained * models */ modelEpoch?: string; } interface Epoch { /** * The epoch hash to identify the epoch */ epoch: string; /** * The assets of the epoch if sample prompts as been supplied during training */ assets?: Array; } namespace Epoch { interface Asset { /** * The AssetId of the image during training (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the asset */ url: string; } } /** * Defines the input parameters for a model. Use this to understand the available * input parameters for a given `modelId` when calling * `POST /generate/custom/{modelId}`. See {@link * https://docs.scenario.com/get-started/generation/video-generation} for examples. */ interface Input { /** * The name that must be user to call the model through the API */ name: string; /** * The data type of the input */ type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array'; /** * The allowed values for the input. For \`string\` or \`number\` types, creates a * single-select dropdown. For \`string_array\` type, creates a multi-select * dropdown. */ allowedValues?: Array; /** * Specifies the background behavior for the input. Only available for \`file\` and * \`file_array\` input types with kind \`image\`. */ backgroundBehavior?: 'opaque' | 'transparent'; /** * Whether the input is a color or not. Only available for \`string\` input type. */ color?: boolean; /** * Whether this input affects the model's cost calculation */ costImpact?: boolean; /** * The default value for the input */ default?: unknown; /** * Help text displayed in the UI to provide additional information about the input */ description?: string; /** * Used to visually group inputs together in the UI. Inputs with the same group * value appear consecutively in the UI. */ group?: string; /** * Hint text displayed in the UI as a tooltip to guide the user */ hint?: string; /** * The list of inputs which form an object within a container array. All inputs are * the same as the current object. This is only available for type inputs_array * inputs. */ inputs?: Array<{ [key: string]: unknown; }>; /** * The asset kind of the input. Only taken into account for \`file\` and * \`file_array\` input types. If model provides multiple kinds, the input will be * not able to create the asset on the flight on API side with dataurl without * data:kind, prefix */ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'; /** * The label displayed in the UI for this input */ label?: string; /** * The name of the file input field to use as the mask source */ maskFrom?: string; /** * The maximum allowed value. Only available for \`number\` and \`array\` input * types. */ max?: number; /** * The maximum allowed media duration in seconds. Only applies to \`file\` and * \`file_array\` input types for video and audio assets. Validated against * \`asset.properties.duration\` at job creation time. */ maxDuration?: number; /** * The maximum allowed length for \`string\` inputs. Also applies to each item in * \`string_array\`. */ maxLength?: number; /** * The maximum allowed file size in bytes. Only applies to \`file\` and * \`file_array\` input types. Validated against \`asset.properties.size\` at job * creation time. */ maxSize?: number; /** * The minimum allowed value. Only available for \`number\` and array input types. */ min?: number; /** * The minimum allowed length for string inputs. Also applies to each item in * \`string_array\`. */ minLength?: number; /** * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only * available for \`model_array\` input type. */ modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>; /** * Whether this input represents a parent asset to assign to the produced assets. * Only available for \`file\` and \`file_array\` input types. * * For \`file_array\`, the parent asset is the first item in the array. */ parent?: boolean; /** * Placeholder text for the input. Only available for 'string' input type. */ placeholder?: string; /** * Whether the input is a prompt. When true, displays as a text area with prompt * spark feature. Only available for \`string\` input type. */ prompt?: boolean; /** * Whether the input is used with prompt spark. Only available for \`string\` input * type. */ promptSpark?: boolean; /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ required?: Input.Required; /** * The step increment for numeric inputs. Only available for \`number\` input type. */ step?: number; } namespace Input { /** * Set of rules that describes when this input is required: * * - \`always\`: Input is always required * - \`ifNotDefined\`: Input is required when another specified input is not * defined * - \`ifDefined\`: Input is required when another specified input is defined * - \`conditionalValues\`: Input is required when another input has a specific * value * * By default, the input is not required. */ interface Required { /** * Whether the input is always required */ always?: boolean; /** * Makes this input required when another input has a specific value: * * - Key: name of the input to check * - Value: operation and allowed values that trigger the requirement */ conditionalValues?: unknown; /** * Makes this input required when another input is defined: * * - Key: name of the input that must be defined * - Value: message to display when this input is required */ ifDefined?: unknown; /** * Makes this input required when another input is not defined: * * - Key: name of the input that must be undefined * - Value: message to display when this input is required */ ifNotDefined?: unknown; } } /** * The parameters of the model */ interface Parameters { /** * Age group of the voice (for professional cloning) * * Only available for ElevenLabs voice training */ age?: string; /** * The batch size Less steps, and will increase the learning rate * * Only available for Flux LoRA training */ batchSize?: number; /** * The prompt to specify images in the same class as provided instance images * * Deprecated legacy training parameter. */ classPrompt?: string; /** * Type of voice cloning: "instant" (fast) or "professional" (higher quality, * requires captcha) * * Only available for ElevenLabs voice training */ cloneType?: string; /** * The prompt with identifier specifying the instance (or subject) of the class * (example: "a daiton dog") * * Default value varies depending on the model type. For Flux LoRA, the default is * an empty string. */ conceptPrompt?: string; /** * Gender of the voice (for professional cloning) * * Only available for ElevenLabs voice training */ gender?: string; /** * Language of the audio samples (ISO 639-1 code) * * Only available for ElevenLabs voice training */ language?: string; /** * Initial learning rate (after the potential warmup period) * * Default value varies depending on the model type. For Flux LoRA, the default is * 0.0001. */ learningRate?: number; /** * Initial learning rate (after the potential warmup period) for the text encoder * * Maximum [Flux LoRA: 0.001] Default [Flux LoRA: 0.00001] Minimum [Flux LoRA: * 0.000001] */ learningRateTextEncoder?: number; /** * Initial learning rate (after the potential warmup period) for the UNet * * Deprecated legacy training parameter. */ learningRateUnet?: number; /** * The scheduler type to use (default: "constant") * * Deprecated legacy training parameter. */ lrScheduler?: 'constant' | 'constant-with-warmup' | 'cosine' | 'cosine-with-restarts' | 'linear' | 'polynomial'; /** * Maximum number of training steps to execute (default: varies depending on the * model type) * * Default value varies depending on the model type: * * - For Flux: number of training images \* 100 * * Maximum value varies depending on the model type: * * - For Flux: [0, 10000] */ maxTrainSteps?: number; /** * The number of epochs to train for * * Only available for Flux LoRA training */ nbEpochs?: number; /** * The number of times to repeat the training * * Only available for Flux LoRA training */ nbRepeats?: number; /** * The number of training steps for the text encoder * * Deprecated legacy training parameter. */ numTextTrainSteps?: number; /** * The number of training steps for the UNet * * Deprecated legacy training parameter. */ numUNetTrainSteps?: number; /** * Optimize the model training task for a specific type of input images. The * available values are: * * - "likeness": optimize training for likeness or portrait (targets specific * transformer blocks) * - "all": train all transformer blocks * - "none": train no specific transformer blocks * * This parameter controls which double and single transformer blocks are trained * during the LoRA training process. * * Only available for Flux LoRA training */ optimizeFor?: 'likeness'; /** * The weight of prior preservation loss * * Deprecated legacy training parameter. */ priorLossWeight?: number; /** * Whether to random crop or center crop images before resizing to the working * resolution * * Deprecated legacy training parameter. */ randomCrop?: boolean; /** * Ratio of random crops * * Deprecated legacy training parameter. */ randomCropRatio?: number; /** * Scale of random crops * * Deprecated legacy training parameter. */ randomCropScale?: number; /** * The dimension of the LoRA update matrices * * Only available for Flux LoRA and Musubi training * * Default value varies depending on the model type: * * - For Flux: 16 * - For Musubi: 64 * * Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2; * 128]) */ rank?: number; /** * Whether to remove background noise from audio samples before cloning. When * enabled, each sample must be at least 5 seconds long. * * Only available for ElevenLabs voice training */ removeBackgroundNoise?: boolean; /** * The prompts to use for each epoch Only available for Flux LoRA training */ samplePrompts?: Array; /** * The sample prompt images (AssetIds) paired with samplePrompts Only available for * Flux LoRA training Must be the same length as samplePrompts */ sampleSourceImages?: Array; /** * Whether to scale the learning rate * * Note: Legacy parameter, will be ignored * * Deprecated legacy training parameter. */ scaleLr?: boolean; /** * Used to reproduce previous results. Default: randomly generated number. * * Deprecated legacy training parameter. */ seed?: number; /** * Whether to train the text encoder or not * * Example: For 100 steps and a value of 0.2, it means that the text encoder will * be trained for 20 steps and then the UNet for 80 steps * * Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps` * * Deprecated legacy training parameter. */ textEncoderTrainingRatio?: number; /** * Validation frequency. Cannot be greater than maxTrainSteps value * * Deprecated legacy training parameter. */ validationFrequency?: number; /** * Validation prompt * * Deprecated legacy training parameter. */ validationPrompt?: string; /** * Description of the voice characteristics * * Only available for ElevenLabs voice training */ voiceDescription?: string; /** * The Weights And Bias key to use for logging. The maximum length is 40 characters */ wandbKey?: string; } /** * Aggregated performance stats */ interface PerformanceStats { /** * Performance metrics per variant */ variants: Array; /** * Default variant key for quick model comparison */ default?: string; } namespace PerformanceStats { /** * Performance stats for a model variant */ interface Variant { /** * The generation capability (example: "txt2img", "img2video", "txt2audio") */ capability: string; /** * When these stats were last computed (ISO date) */ computedAt: string; /** * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio") */ variantKey: string; /** * External quality score from arena.ai leaderboard */ arenaScore?: Variant.ArenaScore; /** * Maximum cost per output asset (CU) */ costPerAssetMaxCU?: number; /** * Minimum cost per output asset (CU) */ costPerAssetMinCU?: number; /** * Median cost per output asset (CU) */ costPerAssetP50CU?: number; /** * Inference latency P50 per output asset (seconds) */ inferenceLatencyP50Sec?: number; /** * Inference latency P75 per output asset (seconds) */ inferenceLatencyP75Sec?: number; /** * The resolution bucket (example: "0.5K", "1K", "2K", "4K") */ resolution?: string; /** * Total latency P50 per output asset, including queue time (seconds) */ totalLatencyP50Sec?: number; /** * Total latency P75 per output asset, including queue time (seconds) */ totalLatencyP75Sec?: number; } namespace Variant { /** * External quality score from arena.ai leaderboard */ interface ArenaScore { /** * Arena category (example: "text_to_image", "image_to_video") */ arenaCategory: string; /** * Model name on arena.ai */ arenaModelName: string; /** * When this score was last fetched (ISO date) */ fetchedAt: string; /** * Rank in the arena category */ rank: number; /** * ELO rating */ rating: number; /** * ELO rating confidence interval lower bound */ ratingLower: number; /** * ELO rating confidence interval upper bound */ ratingUpper: number; /** * Number of human votes */ votes: number; } } } /** * A thumbnail for your model */ interface Thumbnail { /** * The AssetId of the image used as a thumbnail for your model (example: * "asset_GTrL3mq4SXWyMxkOHRxlpw") */ assetId: string; /** * The url of the image used as a thumbnail for your model */ url: string; } interface TrainingImagePair { /** * The instruction for the image pair, source to target */ instruction?: string; /** * The source asset ID (must be a training asset) */ sourceId?: string; /** * The target asset ID (must be a training asset) */ targetId?: string; } interface TrainingImage { /** * The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") */ id: string; /** * Automatic captioning of the image */ automaticCaptioning: string; /** * The training image upload date as an ISO string (example: * "2023-02-03T11:19:41.579Z") */ createdAt: string; /** * Description for the image */ description: string; /** * The URL of the image */ downloadUrl: string; /** * The original file name of the image (example: "my-training-image.jpg") */ name: string; } /** * Additional information about the training progress of the model */ interface TrainingProgress { /** * The stage of the request */ stage: 'pending' | 'pending-captcha' | 'queued-for-train' | 'ready-for-captcha' | 'running-train' | 'starting-train'; /** * Timestamp in milliseconds of the last time the training progress was updated */ updatedAt: number; /** * Signed URL of the captcha image to read aloud during PVC voice cloning. Only * present when stage === 'pending-captcha'. Overwritten on each retry. */ captchaImageUrl?: string; /** * Position of the job in the queue (ie. the number of job in the queue before this * one) */ position?: number; /** * The progress of the job */ progress?: number; /** * The remaining time in milliseconds */ remainingTimeMs?: number; /** * Last recoverable failure message during PVC. Present when the model has bounced * back to stage === 'ready-for-captcha' after a step 2 or step 3 failure (e.g. * captcha rejected, time limit exceeded). Surface above the retry button so the * user understands why they're back here. */ retryableError?: string; /** * Number of consecutive PVC step 2 / step 3 failures on this voice model. The * model is marked Failed when this reaches the platform's max retries. */ retryCount?: number; /** * The timestamp in millisecond marking the start of the process */ startedAt?: number; } /** * Additional information about the model's training */ interface TrainingStats { /** * The training end time as an ISO date string */ endedAt?: string; /** * The training queued duration in seconds */ queueDuration?: number; /** * The training start time as an ISO date string */ startedAt?: string; /** * The training duration in seconds */ trainDuration?: number; } /** * The UI configuration for the model */ interface UiConfig { /** * Configuration for the input properties */ inputProperties?: { [key: string]: UiConfig.InputProperties; }; /** * Configuration for the loras component */ lorasComponent?: UiConfig.LorasComponent; /** * Configuration for the presets */ presets?: Array; /** * Configuration for the resolution component */ resolutionComponent?: UiConfig.ResolutionComponent; /** * Configuration for the selects */ selects?: { [key: string]: unknown; }; /** * Configuration for the trigger generate button */ triggerGenerate?: UiConfig.TriggerGenerate; } namespace UiConfig { interface InputProperties { collapsed?: boolean; } /** * Configuration for the loras component */ interface LorasComponent { /** * The label of the component */ label: string; /** * The input name of the model (model_array) */ modelInput: string; /** * The input name of the scale (number_array) */ scaleInput: string; /** * The input model id (example: a composition or a single LoRA modelId) If * specified, the model id will be attached to the output asset as a metadata If * the model-decomposer parser is specified on it, modelInput and scaleInput will * be automatically populated */ modelIdInput?: string; } interface Preset { fields: Array; presets: unknown; } /** * Configuration for the resolution component */ interface ResolutionComponent { /** * The input name of the height */ heightInput: string; /** * The label of the component */ label: string; /** * The resolution presets */ presets: Array; /** * The input name of the width */ widthInput: string; } namespace ResolutionComponent { interface Preset { height: number; label: string; width: number; } } /** * Configuration for the trigger generate button */ interface TriggerGenerate { label: string; /** * The 'name' of the input where the trigger generate button will be displayed * (after the input). Do not specify both position and after. */ after?: string; /** * The position of the trigger generate button. If position specified, the button * will be displayed at the specified position. Do not specify both position and * after. */ position?: 'bottom' | 'top'; } } } /** * Compute Units cost per billing action for this request, after discount. Values * sum to `creativeUnitsCost`. Only Compute-Units-consuming actions with a non-zero * charge appear. Lets clients split the total (e.g. generation vs * `slop-detection`) — including on dryRun estimates. */ interface CostDetails { 'assistant-message'?: number; caption?: number; 'custom-generation'?: number; 'describe-style'?: number; detection?: number; embed?: number; 'image-prompt-editing'?: number; 'inference-images'?: number; 'ip-detection'?: number; pixelate?: number; prompt?: number; 'remove-background'?: number; repaint?: number; restyle?: number; segmentation?: number; 'skybox-base-360'?: number; 'skybox-upscale-360'?: number; 'slop-detection'?: number; texture?: number; 'train-model'?: number; translate?: number; upscale?: number; vectorization?: number; } /** * IP detection findings, when detection ran for this request. */ interface IPDetection { /** * Whether and how detection affected the request. */ action: 'allowed' | 'blocked' | 'flagged'; /** * IP-detection CU fee, separate from creativeUnitsCost: a fixed base fee plus a * per-image fee for each analyzed input image. */ creativeUnitsCharged: number; /** * Number of enabled filters evaluated for this request. */ evaluatedFilters: number; /** * Per-filter verdicts gathered for this request. */ findings: Array; /** * Convenience flag; always true when action is not 'allowed'. */ flagged: boolean; /** * True if one or more detectors errored while evaluating this request. */ hasDetectorError?: boolean; } namespace IPDetection { /** * A single filter's verdict. */ interface Finding { /** * Category of the filter that produced this verdict. */ category: 'artist-style' | 'brand-trademark' | 'celebrity-likeness' | 'custom' | 'fictional-character'; /** * Confidence score from 0 (low) to 1 (high). */ confidence: number; /** * Identifier of the filter that produced this verdict. */ filterId: string; /** * Display name of the filter that produced this verdict. */ filterName: string; /** * Whether this filter considered the request an IP risk. */ flagged: boolean; /** * Short, user-facing explanation of the verdict. */ reason: string; /** * Named entities the filter recognized (e.g. characters, brands, people). */ entities?: Array; } } } export interface TrainActionParams { /** * Body param: The action to perform on the model training */ action: 'cancel'; /** * Query param: If set to true, returns the original asset without transformation */ originalAssets?: boolean; /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; } export interface TrainTriggerParams { /** * Query param */ dryRun?: unknown; /** * Query param: If set to true, returns the original asset without transformation */ originalAssets?: boolean; /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; /** * Query param: Simulate the number of training images, used for dryRun purpose */ trainingImagesCount?: number; /** * Body param */ parameters?: TrainTriggerParams.Parameters; } export declare namespace TrainTriggerParams { interface Parameters { /** * Age group of the voice (for professional cloning) * * Only available for ElevenLabs voice training */ age?: string; /** * The batch size Less steps, and will increase the learning rate * * Only available for Flux LoRA training */ batchSize?: number; /** * The prompt to specify images in the same class as provided instance images * * Deprecated legacy training parameter. */ classPrompt?: string; /** * Type of voice cloning: "instant" (fast) or "professional" (higher quality, * requires captcha) * * Only available for ElevenLabs voice training */ cloneType?: string; /** * The prompt with identifier specifying the instance (or subject) of the class * (example: "a daiton dog") * * Default value varies depending on the model type. For Flux LoRA, the default is * an empty string. */ conceptPrompt?: string; /** * Gender of the voice (for professional cloning) * * Only available for ElevenLabs voice training */ gender?: string; /** * Language of the audio samples (ISO 639-1 code) * * Only available for ElevenLabs voice training */ language?: string; /** * Initial learning rate (after the potential warmup period) * * Default value varies depending on the model type. For Flux LoRA, the default is * 0.0001. */ learningRate?: number; /** * Initial learning rate (after the potential warmup period) for the text encoder * * Maximum [Flux LoRA: 0.001] Default [Flux LoRA: 0.00001] Minimum [Flux LoRA: * 0.000001] */ learningRateTextEncoder?: number; /** * Initial learning rate (after the potential warmup period) for the UNet * * Deprecated legacy training parameter. */ learningRateUnet?: number; /** * The scheduler type to use (default: "constant") * * Deprecated legacy training parameter. */ lrScheduler?: 'constant' | 'constant-with-warmup' | 'cosine' | 'cosine-with-restarts' | 'linear' | 'polynomial'; /** * Maximum number of training steps to execute (default: varies depending on the * model type) * * Default value varies depending on the model type: * * - For Flux: number of training images \* 100 * * Maximum value varies depending on the model type: * * - For Flux: [0, 10000] */ maxTrainSteps?: number; /** * The number of epochs to train for * * Only available for Flux LoRA training */ nbEpochs?: number; /** * The number of times to repeat the training * * Only available for Flux LoRA training */ nbRepeats?: number; /** * The number of training steps for the text encoder * * Deprecated legacy training parameter. */ numTextTrainSteps?: number; /** * The number of training steps for the UNet * * Deprecated legacy training parameter. */ numUNetTrainSteps?: number; /** * Optimize the model training task for a specific type of input images. The * available values are: * * - "likeness": optimize training for likeness or portrait (targets specific * transformer blocks) * - "all": train all transformer blocks * - "none": train no specific transformer blocks * * This parameter controls which double and single transformer blocks are trained * during the LoRA training process. * * Only available for Flux LoRA training */ optimizeFor?: 'likeness'; /** * The weight of prior preservation loss * * Deprecated legacy training parameter. */ priorLossWeight?: number; /** * Whether to random crop or center crop images before resizing to the working * resolution * * Deprecated legacy training parameter. */ randomCrop?: boolean; /** * Ratio of random crops * * Deprecated legacy training parameter. */ randomCropRatio?: number; /** * Scale of random crops * * Deprecated legacy training parameter. */ randomCropScale?: number; /** * The dimension of the LoRA update matrices * * Only available for Flux LoRA and Musubi training * * Default value varies depending on the model type: * * - For Flux: 16 * - For Musubi: 64 * * Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2; * 128]) */ rank?: number; /** * Whether to remove background noise from audio samples before cloning. When * enabled, each sample must be at least 5 seconds long. * * Only available for ElevenLabs voice training */ removeBackgroundNoise?: boolean; /** * The prompts to use for each epoch Only available for Flux LoRA training */ samplePrompts?: Array; /** * The sample prompt images (AssetIds) paired with samplePrompts Only available for * Flux LoRA training Must be the same length as samplePrompts */ sampleSourceImages?: Array; /** * Whether to scale the learning rate * * Note: Legacy parameter, will be ignored * * Deprecated legacy training parameter. */ scaleLr?: boolean; /** * Used to reproduce previous results. Default: randomly generated number. * * Deprecated legacy training parameter. */ seed?: number; /** * Whether to train the text encoder or not * * Example: For 100 steps and a value of 0.2, it means that the text encoder will * be trained for 20 steps and then the UNet for 80 steps * * Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps` * * Deprecated legacy training parameter. */ textEncoderTrainingRatio?: number; /** * Validation frequency. Cannot be greater than maxTrainSteps value * * Deprecated legacy training parameter. */ validationFrequency?: number; /** * Validation prompt * * Deprecated legacy training parameter. */ validationPrompt?: string; /** * Description of the voice characteristics * * Only available for ElevenLabs voice training */ voiceDescription?: string; /** * The Weights And Bias key to use for logging. The maximum length is 40 characters */ wandbKey?: string; } } export declare namespace Train { export { type TrainActionResponse as TrainActionResponse, type TrainTriggerResponse as TrainTriggerResponse, type TrainActionParams as TrainActionParams, type TrainTriggerParams as TrainTriggerParams, }; } //# sourceMappingURL=train.d.ts.map