Skip to content
Get started

Train

Trigger
models.train.trigger(strmodel_id, TrainTriggerParams**kwargs) -> TrainTriggerResponse
PUT/models/{modelId}/train
Action
models.train.action(strmodel_id, TrainActionParams**kwargs) -> TrainActionResponse
POST/models/{modelId}/train/action
ModelsExpand Collapse
class TrainTriggerResponse:
job: Job
created_at: str

The job creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

job_id: str

The job ID (example: “job_ocZCnG1Df35XRL1QyCZSRxAG8”)

job_type: Literal["assets-download", "canvas-export", "caption", 36 more]

The type of job

One of the following:
"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"
"texture"
"translate"
"upload"
"upscale"
"upscale-skybox"
"upscale-texture"
"vectorize"
"workflow"
metadata: JobMetadata

Metadata of the job with some additional information

asset_ids: Optional[List[str]]

List of produced assets for this job

error: Optional[str]

Eventual error for the job

flow: Optional[List[JobMetadataFlow]]

The flow of the job. Only available for workflow jobs.

id: str

The id of the node.

status: Literal["failure", "pending", "processing", 2 more]

The status of the node. Only available for WorkflowJob nodes.

One of the following:
"failure"
"pending"
"processing"
"skipped"
"success"
type: Literal["custom-model", "for-each", "generate-prompt", 7 more]

The type of the job for the node.

One of the following:
"custom-model"
"for-each"
"generate-prompt"
"list"
"logic"
"model"
"remove-background"
"transform"
"user-approval"
"workflow"
assets: Optional[List[JobMetadataFlowAsset]]

List of produced assets for this node.

asset_id: str
url: str
count: Optional[float]

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.

depends_on: Optional[List[str]]

The nodes that this node depends on. Only available for nodes that have dependencies. Mainly used for user approval nodes.

include_outputs_in_workflow_job: Optional[Literal[true]]

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.

inputs: Optional[List[JobMetadataFlowInput]]

The inputs of the node.

name: str

The name that must be user to call the model through the API

type: Literal["boolean", "file", "file_array", 7 more]

The data type of the input

One of the following:
"boolean"
"file"
"file_array"
"inputs_array"
"model"
"model_array"
"number"
"number_array"
"string"
"string_array"
allowed_values: Optional[List[object]]

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.

background_behavior: Optional[Literal["opaque", "transparent"]]

Specifies the background behavior for the input. Only available for `file` and `file_array` input types with kind `image`.

One of the following:
"opaque"
"transparent"
color: Optional[bool]

Whether the input is a color or not. Only available for `string` input type.

cost_impact: Optional[bool]

Whether this input affects the model’s cost calculation

default: Optional[object]

The default value for the input

description: Optional[str]

Help text displayed in the UI to provide additional information about the input

group: Optional[str]

Used to visually group inputs together in the UI. Inputs with the same group value appear consecutively in the UI.

hint: Optional[str]

Hint text displayed in the UI as a tooltip to guide the user

inputs: Optional[List[Dict[str, object]]]

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.

items: Optional[List[List[JobMetadataFlowInputItem]]]

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.

name: str

The name that must be user to call the model through the API

type: Literal["boolean", "file", "file_array", 7 more]

The data type of the input

One of the following:
"boolean"
"file"
"file_array"
"inputs_array"
"model"
"model_array"
"number"
"number_array"
"string"
"string_array"
allowed_values: Optional[List[object]]

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.

background_behavior: Optional[Literal["opaque", "transparent"]]

Specifies the background behavior for the input. Only available for `file` and `file_array` input types with kind `image`.

One of the following:
"opaque"
"transparent"
color: Optional[bool]

Whether the input is a color or not. Only available for `string` input type.

cost_impact: Optional[bool]

Whether this input affects the model’s cost calculation

default: Optional[object]

The default value for the input

description: Optional[str]

Help text displayed in the UI to provide additional information about the input

group: Optional[str]

Used to visually group inputs together in the UI. Inputs with the same group value appear consecutively in the UI.

hint: Optional[str]

Hint text displayed in the UI as a tooltip to guide the user

inputs: Optional[List[Dict[str, object]]]

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.

kind: Optional[Literal["3d", "audio", "document", 4 more]]

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

One of the following:
"3d"
"audio"
"document"
"image"
"image-hdr"
"json"
"video"
label: Optional[str]

The label displayed in the UI for this input

mask_from: Optional[str]

The name of the file input field to use as the mask source

max: Optional[float]

The maximum allowed value. Only available for `number` and `array` input types.

max_length: Optional[float]

The maximum allowed length for `string` inputs. Also applies to each item in `string_array`.

max_size: Optional[float]

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.

min: Optional[float]

The minimum allowed value. Only available for `number` and array input types.

min_length: Optional[float]

The minimum allowed length for string inputs. Also applies to each item in `string_array`.

model_types: Optional[List[Literal["custom", "elevenlabs-voice", "flux.1", 34 more]]]

The allowed model types for this input. Example: `[“flux.1-lora”]`. Only available for `model_array` input type.

One of the following:
"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"
"sd-1_5"
"sd-1_5-composition"
"sd-1_5-lora"
"sd-xl"
"sd-xl-composition"
"sd-xl-lora"
"zimage-de-turbo-lora"
"zimage-lora"
"zimage-turbo-lora"
parent: Optional[bool]

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.

placeholder: Optional[str]

Placeholder text for the input. Only available for ‘string’ input type.

prompt: Optional[bool]

Whether the input is a prompt. When true, displays as a text area with prompt spark feature. Only available for `string` input type.

prompt_spark: Optional[bool]

Whether the input is used with prompt spark. Only available for `string` input type.

ref: Optional[JobMetadataFlowInputItemRef]

The reference to another input or output of the same workflow. Must have at least one of node or conditional.

conditional: Optional[List[str]]

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.

equal: Optional[str]

This is the desired node output value if ref is an if/else node.

name: Optional[str]

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’.

node: Optional[str]

The node id or ‘workflow’ if the source is a workflow input.

required: Optional[JobMetadataFlowInputItemRequired]

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.

always: Optional[bool]

Whether the input is always required

conditional_values: Optional[object]

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
if_defined: Optional[object]

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
if_not_defined: Optional[object]

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
step: Optional[float]

The step increment for numeric inputs. Only available for `number` input type.

minimum1
value: Optional[object]

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.

kind: Optional[Literal["3d", "audio", "document", 4 more]]

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

One of the following:
"3d"
"audio"
"document"
"image"
"image-hdr"
"json"
"video"
label: Optional[str]

The label displayed in the UI for this input

mask_from: Optional[str]

The name of the file input field to use as the mask source

max: Optional[float]

The maximum allowed value. Only available for `number` and `array` input types.

max_length: Optional[float]

The maximum allowed length for `string` inputs. Also applies to each item in `string_array`.

max_size: Optional[float]

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.

min: Optional[float]

The minimum allowed value. Only available for `number` and array input types.

min_length: Optional[float]

The minimum allowed length for string inputs. Also applies to each item in `string_array`.

model_types: Optional[List[Literal["custom", "elevenlabs-voice", "flux.1", 34 more]]]

The allowed model types for this input. Example: `[“flux.1-lora”]`. Only available for `model_array` input type.

One of the following:
"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"
"sd-1_5"
"sd-1_5-composition"
"sd-1_5-lora"
"sd-xl"
"sd-xl-composition"
"sd-xl-lora"
"zimage-de-turbo-lora"
"zimage-lora"
"zimage-turbo-lora"
parent: Optional[bool]

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.

placeholder: Optional[str]

Placeholder text for the input. Only available for ‘string’ input type.

prompt: Optional[bool]

Whether the input is a prompt. When true, displays as a text area with prompt spark feature. Only available for `string` input type.

prompt_spark: Optional[bool]

Whether the input is used with prompt spark. Only available for `string` input type.

ref: Optional[JobMetadataFlowInputRef]

The reference to another input or output of the same workflow. Must have at least one of node or conditional.

conditional: Optional[List[str]]

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.

equal: Optional[str]

This is the desired node output value if ref is an if/else node.

name: Optional[str]

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’.

node: Optional[str]

The node id or ‘workflow’ if the source is a workflow input.

required: Optional[JobMetadataFlowInputRequired]

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.

always: Optional[bool]

Whether the input is always required

conditional_values: Optional[object]

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
if_defined: Optional[object]

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
if_not_defined: Optional[object]

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
step: Optional[float]

The step increment for numeric inputs. Only available for `number` input type.

minimum1
value: Optional[object]

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.

items: Optional[List[str]]

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.

iteration_index: Optional[float]

Zero-based index of the iteration this node copy belongs to. Set on dynamically-created copies of loop body nodes.

job_id: Optional[str]

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.

logic: Optional[JobMetadataFlowLogic]

The logic of the node. Only available for logic nodes.

cases: Optional[List[JobMetadataFlowLogicCase]]

The cases of the logic. Only available for if/else nodes.

condition: str
value: str
default: Optional[str]

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.

transform: Optional[str]

The transform of the logic. Only available for transform nodes.

logic_type: Optional[Literal["if-else"]]

The type of the logic for the node. Only available for logic nodes.

loop_body_node_ids: Optional[List[str]]

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.

loop_node_id: Optional[str]

ID of the ForEach node that spawned this iteration copy. Set on dynamically-created copies of loop body nodes.

model_id: Optional[str]

The model id for the node. Mainly used for custom model tasks.

output: Optional[object]

The output of the node. Only available for logic nodes.

workflow_id: Optional[str]

The workflow id for the node. Mainly used for workflow tasks.

hint: Optional[str]

Actionable hint for the user explaining what went wrong and how to resolve it.

input: Optional[Dict[str, object]]

The inputs for the job

output: Optional[Dict[str, object]]

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_model_id: Optional[str]

For voice-clone jobs: the ID of the model being trained.

workflow_id: Optional[str]

The workflow ID of the job if job is part of a workflow.

workflow_job_id: Optional[str]

The workflow job ID of the job if job is part of a workflow job.

progress: float

Progress of the job (between 0 and 1)

status: Literal["canceled", "failure", "finalizing", 5 more]

The current status of the job

One of the following:
"canceled"
"failure"
"finalizing"
"in-progress"
"pending"
"queued"
"success"
"warming-up"
status_history: List[JobStatusHistory]

The history of the different statuses the job went through with the ISO string date of when the job reached each statuses.

date: str
status: Literal["canceled", "failure", "finalizing", 5 more]
One of the following:
"canceled"
"failure"
"finalizing"
"in-progress"
"pending"
"queued"
"success"
"warming-up"
updated_at: str

The job last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

author_id: Optional[str]

The author user ID (example: “dcf121faaa1a0a0bbbd9ca1b73d62aea”)

billing: Optional[JobBilling]

The billing of the job

cu_cost: float
cu_discount: float
owner_id: Optional[str]

The owner ID (example: “team_U3Qmc8PCdWXwAQJ4Dvw4tV6D”)

model: Model
id: str

The model ID (example: “model_eyVcnFJcR92BxBkz7N6g5w”)

capabilities: List[Literal["3d23d", "audio2audio", "audio2video", 29 more]]

List of model capabilities (example: [“txt2img”, “img2img”, “txt2img_ip_adapter”, …])

One of the following:
"3d23d"
"audio2audio"
"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"
collection_ids: List[str]

A list of CollectionId this model belongs to

created_at: str

The model creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

custom: bool

Whether the model is a custom model and can be used only with POST /generate/custom/{modelId} endpoint

example_asset_ids: List[str]

List of all example asset IDs setup by the model owner

privacy: Literal["private", "public", "unlisted"]

The privacy of the model (default: private)

One of the following:
"private"
"public"
"unlisted"
source: Literal["civitai", "huggingface", "other", "scenario"]

The source of the model

One of the following:
"civitai"
"huggingface"
"other"
"scenario"
status: Literal["copying", "failed", "new", 3 more]

The model status

One of the following:
"copying"
"failed"
"new"
"trained"
"training"
"training-canceled"
tags: List[str]

The associated tags (example: [“sci-fi”, “landscape”])

training_images_number: float

The total number of training images

type: Literal["custom", "elevenlabs-voice", "flux.1", 34 more]

The model type (example: “flux.1-lora”)

One of the following:
"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"
"sd-1_5"
"sd-1_5-composition"
"sd-1_5-lora"
"sd-xl"
"sd-xl-composition"
"sd-xl-lora"
"zimage-de-turbo-lora"
"zimage-lora"
"zimage-turbo-lora"
updated_at: str

The model last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

access_restrictions: Optional[Literal[0, 100, 25, 2 more]]

The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan 75: Team plan 100: Enterprise plan

One of the following:
0
100
25
50
75
author_id: Optional[str]

The author user ID (example: “user_VFhihHKMRZyDDnZAJwLb2Q”)

class_: Optional[ModelClass]

The class of the model

category: str

The category slug of the class (example: “art-style”)

concept_prompt: str

The concept prompt of the class (example: “a sks character design”)

model_id: str

The model ID of the class (example: “stable-diffusion-v1-5”)

name: str

The class name (example: “Character Design”)

prompt: str

The class prompt (example: “a character design”)

slug: str

The class slug (example: “art-style-character-design”)

status: Literal["published", "unpublished"]

The class status (only published classes are listed, but unpublished classes can still appear in existing models)

One of the following:
"published"
"unpublished"
thumbnails: List[str]

Some example images URLs to showcase the class

compliant_model_ids: Optional[List[str]]

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

concepts: Optional[List[ModelConcept]]

The concepts is required for the type model: composition

model_id: str

The model ID (example: “model_eyVcnFJcR92BxBkz7N6g5w”)

scale: float

The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale is between 0 and 2.

maximum2
minimum-2
model_epoch: Optional[str]

The epoch of the model (example: “000001”) Only available for Flux Lora Trained models

epoch: Optional[str]

The epoch of the model. Only available for Flux Lora Trained models. If not set, uses the final model epoch (latest)

epochs: Optional[List[ModelEpoch]]

The epochs of the model. Only available for Flux Lora Trained models.

epoch: str

The epoch hash to identify the epoch

assets: Optional[List[ModelEpochAsset]]

The assets of the epoch if sample prompts as been supplied during training

asset_id: str

The AssetId of the image during training (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

url: str

The url of the asset

inputs: Optional[List[ModelInput]]

The inputs of the model. Only used for custom models. To retrieve this list, get it by modelId with GET /models/{modelId}

name: str

The name that must be user to call the model through the API

type: Literal["boolean", "file", "file_array", 7 more]

The data type of the input

One of the following:
"boolean"
"file"
"file_array"
"inputs_array"
"model"
"model_array"
"number"
"number_array"
"string"
"string_array"
allowed_values: Optional[List[object]]

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.

background_behavior: Optional[Literal["opaque", "transparent"]]

Specifies the background behavior for the input. Only available for `file` and `file_array` input types with kind `image`.

One of the following:
"opaque"
"transparent"
color: Optional[bool]

Whether the input is a color or not. Only available for `string` input type.

cost_impact: Optional[bool]

Whether this input affects the model’s cost calculation

default: Optional[object]

The default value for the input

description: Optional[str]

Help text displayed in the UI to provide additional information about the input

group: Optional[str]

Used to visually group inputs together in the UI. Inputs with the same group value appear consecutively in the UI.

hint: Optional[str]

Hint text displayed in the UI as a tooltip to guide the user

inputs: Optional[List[Dict[str, object]]]

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.

kind: Optional[Literal["3d", "audio", "document", 4 more]]

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

One of the following:
"3d"
"audio"
"document"
"image"
"image-hdr"
"json"
"video"
label: Optional[str]

The label displayed in the UI for this input

mask_from: Optional[str]

The name of the file input field to use as the mask source

max: Optional[float]

The maximum allowed value. Only available for `number` and `array` input types.

max_length: Optional[float]

The maximum allowed length for `string` inputs. Also applies to each item in `string_array`.

max_size: Optional[float]

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.

min: Optional[float]

The minimum allowed value. Only available for `number` and array input types.

min_length: Optional[float]

The minimum allowed length for string inputs. Also applies to each item in `string_array`.

model_types: Optional[List[Literal["custom", "elevenlabs-voice", "flux.1", 34 more]]]

The allowed model types for this input. Example: `[“flux.1-lora”]`. Only available for `model_array` input type.

One of the following:
"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"
"sd-1_5"
"sd-1_5-composition"
"sd-1_5-lora"
"sd-xl"
"sd-xl-composition"
"sd-xl-lora"
"zimage-de-turbo-lora"
"zimage-lora"
"zimage-turbo-lora"
parent: Optional[bool]

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.

placeholder: Optional[str]

Placeholder text for the input. Only available for ‘string’ input type.

prompt: Optional[bool]

Whether the input is a prompt. When true, displays as a text area with prompt spark feature. Only available for `string` input type.

prompt_spark: Optional[bool]

Whether the input is used with prompt spark. Only available for `string` input type.

required: Optional[ModelInputRequired]

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.

always: Optional[bool]

Whether the input is always required

conditional_values: Optional[object]

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
if_defined: Optional[object]

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
if_not_defined: Optional[object]

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
step: Optional[float]

The step increment for numeric inputs. Only available for `number` input type.

minimum1
model_keyword: Optional[str]

The model keyword, this is a legacy parameter, please use conceptPrompt in parameters

name: Optional[str]

The model name (example: “Cinematic Realism”)

negative_prompt_embedding: Optional[str]

Fine-tune the model’s inferences with negative prompt embedding

owner_id: Optional[str]

The owner ID (example: “team_VFhihHKMRZyDDnZAJwLb2Q”)

parameters: Optional[ModelParameters]

The parameters of the model

age: Optional[str]

Age group of the voice (for professional cloning)

Only available for ElevenLabs voice training

batch_size: Optional[float]

The batch size Less steps, and will increase the learning rate

Only available for Flux LoRA training

maximum4
minimum1
class_prompt: Optional[str]

The prompt to specify images in the same class as provided instance images

Only available for SD15 training

clone_type: Optional[str]

Type of voice cloning: “instant” (fast) or “professional” (higher quality, requires captcha)

Only available for ElevenLabs voice training

concept_prompt: Optional[str]

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 SD1.5: “daiton” if no class is associated with the model
  • For SDXL: “daiton”
  • For Flux: ""
gender: Optional[str]

Gender of the voice (for professional cloning)

Only available for ElevenLabs voice training

language: Optional[str]

Language of the audio samples (ISO 639-1 code)

Only available for ElevenLabs voice training

learning_rate: Optional[float]

Initial learning rate (after the potential warmup period)

Default value varies depending on the model type:

  • For SD1.5 and SDXL: 0.000005
  • For Flux: 0.0001
exclusiveMinimum
minimum0
learning_rate_text_encoder: Optional[float]

Initial learning rate (after the potential warmup period) for the text encoder

Maximum [Flux LoRA: 0.001] Default [SDXL: 0.00005 | Flux LoRA: 0.00001] Minimum [SDXL: 0 | Flux LoRA: 0.000001]

exclusiveMinimum
maximum0.001
minimum0
learning_rate_unet: Optional[float]

Initial learning rate (after the potential warmup period) for the UNet

Only available for SDXL LoRA training

exclusiveMinimum
minimum0
lr_scheduler: Optional[Literal["constant", "constant-with-warmup", "cosine", 3 more]]

The scheduler type to use (default: “constant”)

Only available for SD15 and SDXL LoRA training

One of the following:
"constant"
"constant-with-warmup"
"cosine"
"cosine-with-restarts"
"linear"
"polynomial"
max_train_steps: Optional[float]

Maximum number of training steps to execute (default: varies depending on the model type)

For SDXL LoRA training, please use numTextTrainSteps and numUNetTrainSteps instead

Default value varies depending on the model type:

  • For SD1.5: round((number of training images * 225) / 3)
  • For SDXL: number of training images * 175
  • For Flux: number of training images * 100

Maximum value varies depending on the model type:

  • For SD1.5 and SDXL: [0, 40000]
  • For Flux: [0, 10000]
maximum40000
minimum0
nb_epochs: Optional[float]

The number of epochs to train for

Only available for Flux LoRA training

maximum30
minimum1
nb_repeats: Optional[float]

The number of times to repeat the training

Only available for Flux LoRA training

maximum30
minimum1
num_text_train_steps: Optional[float]

The number of training steps for the text encoder

Only available for SDXL LoRA training

maximum40000
minimum0
num_u_net_train_steps: Optional[float]

The number of training steps for the UNet

Only available for SDXL LoRA training

maximum40000
minimum0
optimize_for: Optional[Literal["likeness"]]

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

prior_loss_weight: Optional[float]

The weight of prior preservation loss

Only available for SD15 and SDXL LoRA training

exclusiveMinimum
maximum1.7976931348623157
minimum0
random_crop: Optional[bool]

Whether to random crop or center crop images before resizing to the working resolution

Only available for SD15 and SDXL LoRA training

random_crop_ratio: Optional[float]

Ratio of random crops

Only available for SD15 and SDXL LoRA training

maximum1
minimum0
random_crop_scale: Optional[float]

Scale of random crops

Only available for SD15 and SDXL LoRA training

maximum1
minimum0
rank: Optional[float]

The dimension of the LoRA update matrices

Only available for SDXL (deprecated), Flux LoRA and Musubi training

Default value varies depending on the model type:

  • For SDXL (deprecated): 64
  • For Flux: 16
  • For Musubi: 64

Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2; 128])

maximum128
minimum2
remove_background_noise: Optional[bool]

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

sample_prompts: Optional[List[str]]

The prompts to use for each epoch Only available for Flux LoRA training

sample_source_images: Optional[List[str]]

The sample prompt images (AssetIds) paired with samplePrompts Only available for Flux LoRA training Must be the same length as samplePrompts

scale_lr: Optional[bool]

Whether to scale the learning rate

Note: Legacy parameter, will be ignored

Only available for SD15 and SDXL LoRA training

seed: Optional[float]

Used to reproduce previous results. Default: randomly generated number.

Only available for SD15 and SDXL LoRA training

maximum9007199254740991
minimum0
text_encoder_training_ratio: Optional[float]

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

Only available for SD15 and SDXL LoRA training

maximum0.99
minimum0
validation_frequency: Optional[float]

Validation frequency. Cannot be greater than maxTrainSteps value

Only available for SD15 and SDXL LoRA training

minimum0
validation_prompt: Optional[str]

Validation prompt

Only available for SD15 and SDXL LoRA training

voice_description: Optional[str]

Description of the voice characteristics

Only available for ElevenLabs voice training

wandb_key: Optional[str]

The Weights And Bias key to use for logging. The maximum length is 40 characters

parent_model_id: Optional[str]

The id of the parent model

performance_stats: Optional[ModelPerformanceStats]

Aggregated performance stats

variants: List[ModelPerformanceStatsVariant]

Performance metrics per variant

capability: str

The generation capability (example: “txt2img”, “img2video”, “txt2audio”)

computed_at: str

When these stats were last computed (ISO date)

variant_key: str

Unique variant identifier (example: “txt2img:1K”, “img2video:2K”, “txt2audio”)

arena_score: Optional[ModelPerformanceStatsVariantArenaScore]

External quality score from arena.ai leaderboard

arena_category: str

Arena category (example: “text_to_image”, “image_to_video”)

arena_model_name: str

Model name on arena.ai

fetched_at: str

When this score was last fetched (ISO date)

rank: float

Rank in the arena category

rating: float

ELO rating

rating_lower: float

ELO rating confidence interval lower bound

rating_upper: float

ELO rating confidence interval upper bound

votes: float

Number of human votes

cost_per_asset_max_cu: Optional[float]

Maximum cost per output asset (CU)

cost_per_asset_min_cu: Optional[float]

Minimum cost per output asset (CU)

cost_per_asset_p50_cu: Optional[float]

Median cost per output asset (CU)

inference_latency_p50_sec: Optional[float]

Inference latency P50 per output asset (seconds)

inference_latency_p75_sec: Optional[float]

Inference latency P75 per output asset (seconds)

resolution: Optional[str]

The resolution bucket (example: “0.5K”, “1K”, “2K”, “4K”)

total_latency_p50_sec: Optional[float]

Total latency P50 per output asset, including queue time (seconds)

total_latency_p75_sec: Optional[float]

Total latency P75 per output asset, including queue time (seconds)

default: Optional[str]

Default variant key for quick model comparison

prompt_embedding: Optional[str]

Fine-tune the model’s inferences with prompt embedding

short_description: Optional[str]

The model short description (example: “This model generates highly detailed cinematic scenes.”)

soft_deletion_on: Optional[str]

The date when the model will be soft deleted (only for Free plan)

thumbnail: Optional[ModelThumbnail]

A thumbnail for your model

asset_id: str

The AssetId of the image used as a thumbnail for your model (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

url: str

The url of the image used as a thumbnail for your model

training_image_pairs: Optional[List[ModelTrainingImagePair]]

Array of training image pairs

instruction: Optional[str]

The instruction for the image pair, source to target

source_id: Optional[str]

The source asset ID (must be a training asset)

target_id: Optional[str]

The target asset ID (must be a training asset)

training_images: Optional[List[ModelTrainingImage]]

The URLs of the first 3 training images of the model. To retrieve the full set of images, get it by modelId

id: str

The training image ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

automatic_captioning: str

Automatic captioning of the image

created_at: str

The training image upload date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

description: str

Description for the image

download_url: str

The URL of the image

name: str

The original file name of the image (example: “my-training-image.jpg”)

training_progress: Optional[ModelTrainingProgress]

Additional information about the training progress of the model

stage: Literal["pending", "pending-captcha", "queued-for-train", 2 more]

The stage of the request

One of the following:
"pending"
"pending-captcha"
"queued-for-train"
"running-train"
"starting-train"
updated_at: float

Timestamp in milliseconds of the last time the training progress was updated

position: Optional[float]

Position of the job in the queue (ie. the number of job in the queue before this one)

progress: Optional[float]

The progress of the job

maximum1
minimum0
remaining_time_ms: Optional[float]

The remaining time in milliseconds

started_at: Optional[float]

The timestamp in millisecond marking the start of the process

training_stats: Optional[ModelTrainingStats]

Additional information about the model’s training

ended_at: Optional[str]

The training end time as an ISO date string

queue_duration: Optional[float]

The training queued duration in seconds

started_at: Optional[str]

The training start time as an ISO date string

train_duration: Optional[float]

The training duration in seconds

ui_config: Optional[ModelUiConfig]

The UI configuration for the model

input_properties: Optional[Dict[str, ModelUiConfigInputProperties]]

Configuration for the input properties

collapsed: Optional[bool]
loras_component: Optional[ModelUiConfigLorasComponent]

Configuration for the loras component

label: str

The label of the component

model_input: str

The input name of the model (model_array)

scale_input: str

The input name of the scale (number_array)

model_id_input: Optional[str]

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

presets: Optional[List[ModelUiConfigPreset]]

Configuration for the presets

fields: List[str]
presets: object
resolution_component: Optional[ModelUiConfigResolutionComponent]

Configuration for the resolution component

height_input: str

The input name of the height

label: str

The label of the component

presets: List[ModelUiConfigResolutionComponentPreset]

The resolution presets

height: float
label: str
width: float
width_input: str

The input name of the width

selects: Optional[Dict[str, object]]

Configuration for the selects

trigger_generate: Optional[ModelUiConfigTriggerGenerate]

Configuration for the trigger generate button

label: str
after: Optional[str]

The ‘name’ of the input where the trigger generate button will be displayed (after the input). Do not specify both position and after.

position: Optional[Literal["bottom", "top"]]

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.

One of the following:
"bottom"
"top"
user_id: Optional[str]

(Deprecated) The user ID (example: “user_VFhihHKMRZyDDnZAJwLb2Q”)

creative_units_cost: Optional[float]

The Creative Units cost for the request billed

creative_units_discount: Optional[float]

The Creative Units discount for the request billed

class TrainActionResponse:
model: Model
id: str

The model ID (example: “model_eyVcnFJcR92BxBkz7N6g5w”)

capabilities: List[Literal["3d23d", "audio2audio", "audio2video", 29 more]]

List of model capabilities (example: [“txt2img”, “img2img”, “txt2img_ip_adapter”, …])

One of the following:
"3d23d"
"audio2audio"
"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"
collection_ids: List[str]

A list of CollectionId this model belongs to

created_at: str

The model creation date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

custom: bool

Whether the model is a custom model and can be used only with POST /generate/custom/{modelId} endpoint

example_asset_ids: List[str]

List of all example asset IDs setup by the model owner

privacy: Literal["private", "public", "unlisted"]

The privacy of the model (default: private)

One of the following:
"private"
"public"
"unlisted"
source: Literal["civitai", "huggingface", "other", "scenario"]

The source of the model

One of the following:
"civitai"
"huggingface"
"other"
"scenario"
status: Literal["copying", "failed", "new", 3 more]

The model status

One of the following:
"copying"
"failed"
"new"
"trained"
"training"
"training-canceled"
tags: List[str]

The associated tags (example: [“sci-fi”, “landscape”])

training_images_number: float

The total number of training images

type: Literal["custom", "elevenlabs-voice", "flux.1", 34 more]

The model type (example: “flux.1-lora”)

One of the following:
"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"
"sd-1_5"
"sd-1_5-composition"
"sd-1_5-lora"
"sd-xl"
"sd-xl-composition"
"sd-xl-lora"
"zimage-de-turbo-lora"
"zimage-lora"
"zimage-turbo-lora"
updated_at: str

The model last update date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

access_restrictions: Optional[Literal[0, 100, 25, 2 more]]

The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan 75: Team plan 100: Enterprise plan

One of the following:
0
100
25
50
75
author_id: Optional[str]

The author user ID (example: “user_VFhihHKMRZyDDnZAJwLb2Q”)

class_: Optional[ModelClass]

The class of the model

category: str

The category slug of the class (example: “art-style”)

concept_prompt: str

The concept prompt of the class (example: “a sks character design”)

model_id: str

The model ID of the class (example: “stable-diffusion-v1-5”)

name: str

The class name (example: “Character Design”)

prompt: str

The class prompt (example: “a character design”)

slug: str

The class slug (example: “art-style-character-design”)

status: Literal["published", "unpublished"]

The class status (only published classes are listed, but unpublished classes can still appear in existing models)

One of the following:
"published"
"unpublished"
thumbnails: List[str]

Some example images URLs to showcase the class

compliant_model_ids: Optional[List[str]]

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

concepts: Optional[List[ModelConcept]]

The concepts is required for the type model: composition

model_id: str

The model ID (example: “model_eyVcnFJcR92BxBkz7N6g5w”)

scale: float

The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale is between 0 and 2.

maximum2
minimum-2
model_epoch: Optional[str]

The epoch of the model (example: “000001”) Only available for Flux Lora Trained models

epoch: Optional[str]

The epoch of the model. Only available for Flux Lora Trained models. If not set, uses the final model epoch (latest)

epochs: Optional[List[ModelEpoch]]

The epochs of the model. Only available for Flux Lora Trained models.

epoch: str

The epoch hash to identify the epoch

assets: Optional[List[ModelEpochAsset]]

The assets of the epoch if sample prompts as been supplied during training

asset_id: str

The AssetId of the image during training (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

url: str

The url of the asset

inputs: Optional[List[ModelInput]]

The inputs of the model. Only used for custom models. To retrieve this list, get it by modelId with GET /models/{modelId}

name: str

The name that must be user to call the model through the API

type: Literal["boolean", "file", "file_array", 7 more]

The data type of the input

One of the following:
"boolean"
"file"
"file_array"
"inputs_array"
"model"
"model_array"
"number"
"number_array"
"string"
"string_array"
allowed_values: Optional[List[object]]

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.

background_behavior: Optional[Literal["opaque", "transparent"]]

Specifies the background behavior for the input. Only available for `file` and `file_array` input types with kind `image`.

One of the following:
"opaque"
"transparent"
color: Optional[bool]

Whether the input is a color or not. Only available for `string` input type.

cost_impact: Optional[bool]

Whether this input affects the model’s cost calculation

default: Optional[object]

The default value for the input

description: Optional[str]

Help text displayed in the UI to provide additional information about the input

group: Optional[str]

Used to visually group inputs together in the UI. Inputs with the same group value appear consecutively in the UI.

hint: Optional[str]

Hint text displayed in the UI as a tooltip to guide the user

inputs: Optional[List[Dict[str, object]]]

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.

kind: Optional[Literal["3d", "audio", "document", 4 more]]

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

One of the following:
"3d"
"audio"
"document"
"image"
"image-hdr"
"json"
"video"
label: Optional[str]

The label displayed in the UI for this input

mask_from: Optional[str]

The name of the file input field to use as the mask source

max: Optional[float]

The maximum allowed value. Only available for `number` and `array` input types.

max_length: Optional[float]

The maximum allowed length for `string` inputs. Also applies to each item in `string_array`.

max_size: Optional[float]

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.

min: Optional[float]

The minimum allowed value. Only available for `number` and array input types.

min_length: Optional[float]

The minimum allowed length for string inputs. Also applies to each item in `string_array`.

model_types: Optional[List[Literal["custom", "elevenlabs-voice", "flux.1", 34 more]]]

The allowed model types for this input. Example: `[“flux.1-lora”]`. Only available for `model_array` input type.

One of the following:
"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"
"sd-1_5"
"sd-1_5-composition"
"sd-1_5-lora"
"sd-xl"
"sd-xl-composition"
"sd-xl-lora"
"zimage-de-turbo-lora"
"zimage-lora"
"zimage-turbo-lora"
parent: Optional[bool]

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.

placeholder: Optional[str]

Placeholder text for the input. Only available for ‘string’ input type.

prompt: Optional[bool]

Whether the input is a prompt. When true, displays as a text area with prompt spark feature. Only available for `string` input type.

prompt_spark: Optional[bool]

Whether the input is used with prompt spark. Only available for `string` input type.

required: Optional[ModelInputRequired]

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.

always: Optional[bool]

Whether the input is always required

conditional_values: Optional[object]

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
if_defined: Optional[object]

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
if_not_defined: Optional[object]

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
step: Optional[float]

The step increment for numeric inputs. Only available for `number` input type.

minimum1
model_keyword: Optional[str]

The model keyword, this is a legacy parameter, please use conceptPrompt in parameters

name: Optional[str]

The model name (example: “Cinematic Realism”)

negative_prompt_embedding: Optional[str]

Fine-tune the model’s inferences with negative prompt embedding

owner_id: Optional[str]

The owner ID (example: “team_VFhihHKMRZyDDnZAJwLb2Q”)

parameters: Optional[ModelParameters]

The parameters of the model

age: Optional[str]

Age group of the voice (for professional cloning)

Only available for ElevenLabs voice training

batch_size: Optional[float]

The batch size Less steps, and will increase the learning rate

Only available for Flux LoRA training

maximum4
minimum1
class_prompt: Optional[str]

The prompt to specify images in the same class as provided instance images

Only available for SD15 training

clone_type: Optional[str]

Type of voice cloning: “instant” (fast) or “professional” (higher quality, requires captcha)

Only available for ElevenLabs voice training

concept_prompt: Optional[str]

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 SD1.5: “daiton” if no class is associated with the model
  • For SDXL: “daiton”
  • For Flux: ""
gender: Optional[str]

Gender of the voice (for professional cloning)

Only available for ElevenLabs voice training

language: Optional[str]

Language of the audio samples (ISO 639-1 code)

Only available for ElevenLabs voice training

learning_rate: Optional[float]

Initial learning rate (after the potential warmup period)

Default value varies depending on the model type:

  • For SD1.5 and SDXL: 0.000005
  • For Flux: 0.0001
exclusiveMinimum
minimum0
learning_rate_text_encoder: Optional[float]

Initial learning rate (after the potential warmup period) for the text encoder

Maximum [Flux LoRA: 0.001] Default [SDXL: 0.00005 | Flux LoRA: 0.00001] Minimum [SDXL: 0 | Flux LoRA: 0.000001]

exclusiveMinimum
maximum0.001
minimum0
learning_rate_unet: Optional[float]

Initial learning rate (after the potential warmup period) for the UNet

Only available for SDXL LoRA training

exclusiveMinimum
minimum0
lr_scheduler: Optional[Literal["constant", "constant-with-warmup", "cosine", 3 more]]

The scheduler type to use (default: “constant”)

Only available for SD15 and SDXL LoRA training

One of the following:
"constant"
"constant-with-warmup"
"cosine"
"cosine-with-restarts"
"linear"
"polynomial"
max_train_steps: Optional[float]

Maximum number of training steps to execute (default: varies depending on the model type)

For SDXL LoRA training, please use numTextTrainSteps and numUNetTrainSteps instead

Default value varies depending on the model type:

  • For SD1.5: round((number of training images * 225) / 3)
  • For SDXL: number of training images * 175
  • For Flux: number of training images * 100

Maximum value varies depending on the model type:

  • For SD1.5 and SDXL: [0, 40000]
  • For Flux: [0, 10000]
maximum40000
minimum0
nb_epochs: Optional[float]

The number of epochs to train for

Only available for Flux LoRA training

maximum30
minimum1
nb_repeats: Optional[float]

The number of times to repeat the training

Only available for Flux LoRA training

maximum30
minimum1
num_text_train_steps: Optional[float]

The number of training steps for the text encoder

Only available for SDXL LoRA training

maximum40000
minimum0
num_u_net_train_steps: Optional[float]

The number of training steps for the UNet

Only available for SDXL LoRA training

maximum40000
minimum0
optimize_for: Optional[Literal["likeness"]]

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

prior_loss_weight: Optional[float]

The weight of prior preservation loss

Only available for SD15 and SDXL LoRA training

exclusiveMinimum
maximum1.7976931348623157
minimum0
random_crop: Optional[bool]

Whether to random crop or center crop images before resizing to the working resolution

Only available for SD15 and SDXL LoRA training

random_crop_ratio: Optional[float]

Ratio of random crops

Only available for SD15 and SDXL LoRA training

maximum1
minimum0
random_crop_scale: Optional[float]

Scale of random crops

Only available for SD15 and SDXL LoRA training

maximum1
minimum0
rank: Optional[float]

The dimension of the LoRA update matrices

Only available for SDXL (deprecated), Flux LoRA and Musubi training

Default value varies depending on the model type:

  • For SDXL (deprecated): 64
  • For Flux: 16
  • For Musubi: 64

Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2; 128])

maximum128
minimum2
remove_background_noise: Optional[bool]

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

sample_prompts: Optional[List[str]]

The prompts to use for each epoch Only available for Flux LoRA training

sample_source_images: Optional[List[str]]

The sample prompt images (AssetIds) paired with samplePrompts Only available for Flux LoRA training Must be the same length as samplePrompts

scale_lr: Optional[bool]

Whether to scale the learning rate

Note: Legacy parameter, will be ignored

Only available for SD15 and SDXL LoRA training

seed: Optional[float]

Used to reproduce previous results. Default: randomly generated number.

Only available for SD15 and SDXL LoRA training

maximum9007199254740991
minimum0
text_encoder_training_ratio: Optional[float]

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

Only available for SD15 and SDXL LoRA training

maximum0.99
minimum0
validation_frequency: Optional[float]

Validation frequency. Cannot be greater than maxTrainSteps value

Only available for SD15 and SDXL LoRA training

minimum0
validation_prompt: Optional[str]

Validation prompt

Only available for SD15 and SDXL LoRA training

voice_description: Optional[str]

Description of the voice characteristics

Only available for ElevenLabs voice training

wandb_key: Optional[str]

The Weights And Bias key to use for logging. The maximum length is 40 characters

parent_model_id: Optional[str]

The id of the parent model

performance_stats: Optional[ModelPerformanceStats]

Aggregated performance stats

variants: List[ModelPerformanceStatsVariant]

Performance metrics per variant

capability: str

The generation capability (example: “txt2img”, “img2video”, “txt2audio”)

computed_at: str

When these stats were last computed (ISO date)

variant_key: str

Unique variant identifier (example: “txt2img:1K”, “img2video:2K”, “txt2audio”)

arena_score: Optional[ModelPerformanceStatsVariantArenaScore]

External quality score from arena.ai leaderboard

arena_category: str

Arena category (example: “text_to_image”, “image_to_video”)

arena_model_name: str

Model name on arena.ai

fetched_at: str

When this score was last fetched (ISO date)

rank: float

Rank in the arena category

rating: float

ELO rating

rating_lower: float

ELO rating confidence interval lower bound

rating_upper: float

ELO rating confidence interval upper bound

votes: float

Number of human votes

cost_per_asset_max_cu: Optional[float]

Maximum cost per output asset (CU)

cost_per_asset_min_cu: Optional[float]

Minimum cost per output asset (CU)

cost_per_asset_p50_cu: Optional[float]

Median cost per output asset (CU)

inference_latency_p50_sec: Optional[float]

Inference latency P50 per output asset (seconds)

inference_latency_p75_sec: Optional[float]

Inference latency P75 per output asset (seconds)

resolution: Optional[str]

The resolution bucket (example: “0.5K”, “1K”, “2K”, “4K”)

total_latency_p50_sec: Optional[float]

Total latency P50 per output asset, including queue time (seconds)

total_latency_p75_sec: Optional[float]

Total latency P75 per output asset, including queue time (seconds)

default: Optional[str]

Default variant key for quick model comparison

prompt_embedding: Optional[str]

Fine-tune the model’s inferences with prompt embedding

short_description: Optional[str]

The model short description (example: “This model generates highly detailed cinematic scenes.”)

soft_deletion_on: Optional[str]

The date when the model will be soft deleted (only for Free plan)

thumbnail: Optional[ModelThumbnail]

A thumbnail for your model

asset_id: str

The AssetId of the image used as a thumbnail for your model (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

url: str

The url of the image used as a thumbnail for your model

training_image_pairs: Optional[List[ModelTrainingImagePair]]

Array of training image pairs

instruction: Optional[str]

The instruction for the image pair, source to target

source_id: Optional[str]

The source asset ID (must be a training asset)

target_id: Optional[str]

The target asset ID (must be a training asset)

training_images: Optional[List[ModelTrainingImage]]

The URLs of the first 3 training images of the model. To retrieve the full set of images, get it by modelId

id: str

The training image ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

automatic_captioning: str

Automatic captioning of the image

created_at: str

The training image upload date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

description: str

Description for the image

download_url: str

The URL of the image

name: str

The original file name of the image (example: “my-training-image.jpg”)

training_progress: Optional[ModelTrainingProgress]

Additional information about the training progress of the model

stage: Literal["pending", "pending-captcha", "queued-for-train", 2 more]

The stage of the request

One of the following:
"pending"
"pending-captcha"
"queued-for-train"
"running-train"
"starting-train"
updated_at: float

Timestamp in milliseconds of the last time the training progress was updated

position: Optional[float]

Position of the job in the queue (ie. the number of job in the queue before this one)

progress: Optional[float]

The progress of the job

maximum1
minimum0
remaining_time_ms: Optional[float]

The remaining time in milliseconds

started_at: Optional[float]

The timestamp in millisecond marking the start of the process

training_stats: Optional[ModelTrainingStats]

Additional information about the model’s training

ended_at: Optional[str]

The training end time as an ISO date string

queue_duration: Optional[float]

The training queued duration in seconds

started_at: Optional[str]

The training start time as an ISO date string

train_duration: Optional[float]

The training duration in seconds

ui_config: Optional[ModelUiConfig]

The UI configuration for the model

input_properties: Optional[Dict[str, ModelUiConfigInputProperties]]

Configuration for the input properties

collapsed: Optional[bool]
loras_component: Optional[ModelUiConfigLorasComponent]

Configuration for the loras component

label: str

The label of the component

model_input: str

The input name of the model (model_array)

scale_input: str

The input name of the scale (number_array)

model_id_input: Optional[str]

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

presets: Optional[List[ModelUiConfigPreset]]

Configuration for the presets

fields: List[str]
presets: object
resolution_component: Optional[ModelUiConfigResolutionComponent]

Configuration for the resolution component

height_input: str

The input name of the height

label: str

The label of the component

presets: List[ModelUiConfigResolutionComponentPreset]

The resolution presets

height: float
label: str
width: float
width_input: str

The input name of the width

selects: Optional[Dict[str, object]]

Configuration for the selects

trigger_generate: Optional[ModelUiConfigTriggerGenerate]

Configuration for the trigger generate button

label: str
after: Optional[str]

The ‘name’ of the input where the trigger generate button will be displayed (after the input). Do not specify both position and after.

position: Optional[Literal["bottom", "top"]]

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.

One of the following:
"bottom"
"top"
user_id: Optional[str]

(Deprecated) The user ID (example: “user_VFhihHKMRZyDDnZAJwLb2Q”)