{
  "swagger": "2.0",
  "info": {
    "title": "TAMS API",
    "version": "v1"
  },
  "tags": [
    {
      "name": "TamsApiV1Service"
    }
  ],
  "host": "｛endpoint}",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1/jobs": {
      "post": {
        "summary": "v1/jobs",
        "description": "create diffusion job",
        "operationId": "TamsApiV1Service_CreateJob",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiCreateJobResponse"
            }
          },
          "400": {
            "description": "Bad Request: general error for invalid parameters\nMore specific errors:\n- invalid_samples: Sample count may only be greater then 1\n- invalid_height_or_width: Height and width must be specified in increments of 64\n",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/tams_apiCreateJobRequest"
            }
          }
        ],
        "tags": [
          "jobs"
        ]
      }
    },
    "/v1/jobs/credits": {
      "post": {
        "summary": "v1/jobs/credits",
        "description": "check job",
        "operationId": "TamsApiV1Service_CalcCreditsJob",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiCalcCreditsJobResponse"
            }
          },
          "400": {
            "description": "Bad Request: general error for invalid parameters\nMore specific errors:\n- invalid_samples: Sample count may only be greater then 1\n- invalid_height_or_width: Height and width must be specified in increments of 64\n",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/tams_apiCalcCreditsJobRequest"
            }
          }
        ],
        "tags": [
          "jobs"
        ]
      }
    },
    "/v1/jobs/workflow": {
      "post": {
        "summary": "v1/jobs/workflow",
        "description": "create workflow job",
        "operationId": "TamsApiV1Service_WorkflowJobCreate",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiWorkflowJobCreateResponse"
            }
          },
          "400": {
            "description": "Bad Request: general error for invalid parameters\nMore specific errors:\n- invalid_samples: Sample count may only be greater then 1\n- invalid_height_or_width: Height and width must be specified in increments of 64\n",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/tams_apiWorkflowJobCreateRequest"
            }
          }
        ],
        "tags": [
          "jobs"
        ]
      }
    },
    "/v1/jobs/workflow/params/check": {
      "post": {
        "summary": "v1/jobs/workflow/params/check",
        "description": "check workflow request params",
        "operationId": "TamsApiV1Service_WorkflowParamsCheck",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiWorkflowParamsCheckResponse"
            }
          },
          "400": {
            "description": "Bad Request: general error for invalid parameters\nMore specific errors:\n- invalid_samples: Sample count may only be greater then 1\n- invalid_height_or_width: Height and width must be specified in increments of 64\n",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/tams_apiWorkflowParamsCheckRequest"
            }
          }
        ],
        "tags": [
          "jobs"
        ]
      }
    },
    "/v1/jobs/workflow/template": {
      "post": {
        "summary": "v1/jobs/workflow/template",
        "description": "create workflow job from template",
        "operationId": "TamsApiV1Service_WorkflowTemplateJobCreate",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiWorkflowTemplateJobCreateResponse"
            }
          },
          "404": {
            "description": "Not Found: template not found",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/tams_apiWorkflowTemplateJobCreateRequest"
            }
          }
        ],
        "tags": [
          "workflow"
        ]
      }
    },
    "/v1/jobs/{jobId}": {
      "get": {
        "summary": "v1/jobs",
        "description": "get job",
        "operationId": "TamsApiV1Service_GetJob",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiGetJobResponse"
            }
          },
          "404": {
            "description": "Not Found: job not found",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "jobs"
        ]
      },
      "delete": {
        "summary": "v1/jobs",
        "description": "cancel job",
        "operationId": "TamsApiV1Service_CancelJob",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiCancelJobResponse"
            }
          },
          "404": {
            "description": "Not Found: job not found",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "jobs"
        ]
      }
    },
    "/v1/models/{modelId}": {
      "get": {
        "summary": "v1/models/{model_id}",
        "description": "cancel job",
        "operationId": "TamsApiV1Service_GetModel",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiGetModelResponse"
            }
          },
          "404": {
            "description": "Not Found: model not found",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "modelId",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "models"
        ]
      }
    },
    "/v1/resource/image": {
      "post": {
        "summary": "v1/resource/image",
        "description": "create resource image",
        "operationId": "TamsApiV1Service_CreateResourceImage",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiCreateResourceImageResponse"
            }
          },
          "404": {
            "description": "Not Found: job not found",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/tams_apiCreateResourceImageRequest"
            }
          }
        ],
        "tags": [
          "resource"
        ]
      }
    },
    "/v1/resource/image/sts": {
      "post": {
        "summary": "v1/resource/image/sts",
        "description": "create resource image sts",
        "operationId": "TamsApiV1Service_CreateResourceImageSTS",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiCreateResourceImageSTSResponse"
            }
          },
          "404": {
            "description": "Not Found: job not found",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/tams_apiCreateResourceImageSTSRequest"
            }
          }
        ],
        "tags": [
          "resource"
        ]
      }
    },
    "/v1/workflows/template/check": {
      "post": {
        "summary": "v1/workflows/template/check",
        "description": "check workflow template params",
        "operationId": "TamsApiV1Service_WorkflowTemplateCheck",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiWorkflowTemplateCheckResponse"
            }
          },
          "404": {
            "description": "Not Found: template not found",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/tams_apiWorkflowTemplateCheckRequest"
            }
          }
        ],
        "tags": [
          "workflow"
        ]
      }
    },
    "/v1/workflows/{templateId}": {
      "get": {
        "summary": "v1/workflows/{template_id}",
        "description": "get workflow template info",
        "operationId": "TamsApiV1Service_GetWorkflowTemplate",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/tams_apiGetWorkflowTemplateResponse"
            }
          },
          "404": {
            "description": "Not Found: template not found",
            "schema": {}
          },
          "default": {
            "description": "Default",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "workflow"
        ]
      }
    }
  },
  "definitions": {
    "ArgsControlModeT": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "BALANCED",
        "MY_PROMPT_IS_MORE_IMPORTANT",
        "CONTROLNET_IS_MORE_IMPORTANT"
      ],
      "default": "DEFAULT"
    },
    "ControlnetArgsResizeModeT": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "JUST_RESIZE",
        "CROP_AND_RESIZE",
        "RESIZE_AND_FILL"
      ],
      "default": "DEFAULT"
    },
    "ImageToInpaintInputInpaintFillT": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "FILL",
        "ORIGINAL",
        "LATENT_NOISE",
        "LATENT_NOTHING"
      ],
      "default": "DEFAULT"
    },
    "ImageToInpaintInputResizeModeT": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "JUST_RESIZE",
        "CROP_AND_RESIZE",
        "RESIZE_AND_FILL",
        "JUST_RESIZE_LATENT_UPSCALE"
      ],
      "default": "DEFAULT"
    },
    "NodeOutputUI": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "images": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/NodeOutputUIImage"
          }
        }
      }
    },
    "NodeOutputUIImage": {
      "type": "object",
      "properties": {
        "filename": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "height": {
          "type": "integer",
          "format": "int32"
        },
        "width": {
          "type": "integer",
          "format": "int32"
        },
        "format": {
          "type": "string"
        },
        "imageResourceId": {
          "type": "string"
        }
      }
    },
    "ProjectModelTypeT": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "CHECKPOINT",
        "TEXTUAL_INVERSION",
        "HYPERNETWORK",
        "AESTHETIC_GRADIENT",
        "LORA",
        "LOCON",
        "CONTROLNET",
        "POSES",
        "WILDCARDS",
        "OTHER",
        "LYCORIS",
        "EMBEDDING",
        "VAE",
        "SVD",
        "MOTION_LORA"
      ],
      "default": "DEFAULT",
      "title": "- TEXTUAL_INVERSION: DEPRECATED"
    },
    "googlerpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "protobufNullValue": {
      "type": "string",
      "enum": [
        "NULL_VALUE"
      ],
      "default": "NULL_VALUE",
      "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
    },
    "tams_apiAdetailerArg": {
      "type": "object",
      "properties": {
        "adModel": {
          "type": "string",
          "description": "The model to use for the adetailer\n[Support list](/docs/api/guide/list-of-constants#model)"
        },
        "adPrompt": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiPrompt"
          }
        },
        "adNegativePrompt": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiPrompt"
          }
        },
        "adConfidence": {
          "type": "number",
          "format": "float"
        },
        "adDilateErode": {
          "type": "integer",
          "format": "int32",
          "default": "4"
        },
        "adMaskMergeInvert": {
          "type": "string",
          "default": "None"
        },
        "adDenoisingStrength": {
          "type": "number",
          "format": "float",
          "default": "0.4"
        },
        "adInpaintOnlyMasked": {
          "type": "boolean",
          "default": "true"
        },
        "adInpaintOnlyMaskedPadding": {
          "type": "number",
          "format": "float",
          "default": "32"
        },
        "adUseInpaintWidthHeight": {
          "type": "boolean",
          "default": "false"
        },
        "adInpaintWidth": {
          "type": "integer",
          "format": "int32",
          "default": "512"
        },
        "adInpaintHeight": {
          "type": "integer",
          "format": "int32",
          "default": "512"
        },
        "adUseSteps": {
          "type": "boolean",
          "default": "false"
        },
        "adSteps": {
          "type": "integer",
          "format": "int32",
          "default": "20"
        },
        "adUseCfgScale": {
          "type": "boolean",
          "default": "false"
        },
        "adCfgScale": {
          "type": "number",
          "format": "float",
          "default": "7"
        },
        "lora": {
          "$ref": "#/definitions/tams_apiLora"
        },
        "adUseCheckpoint": {
          "type": "boolean"
        },
        "adCheckpoint": {
          "type": "string"
        },
        "adUseSampler": {
          "type": "boolean"
        },
        "adUseNoiseMultiplier": {
          "type": "boolean"
        },
        "adNoiseMultiplier": {
          "type": "number",
          "format": "float"
        },
        "adUseClipSkip": {
          "type": "boolean"
        },
        "adClipSkip": {
          "type": "integer",
          "format": "int32"
        },
        "adSampler": {
          "type": "string"
        }
      }
    },
    "tams_apiAnimateDiff": {
      "type": "object",
      "properties": {
        "args": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiAnimateDiffArg"
          }
        }
      }
    },
    "tams_apiAnimateDiffArg": {
      "type": "object",
      "properties": {
        "videoLength": {
          "type": "integer",
          "format": "int32"
        },
        "fps": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "tams_apiCalcCreditsJobRequest": {
      "type": "object",
      "properties": {
        "stages": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiStage"
          },
          "description": "stages to be executed"
        }
      },
      "required": [
        "stages"
      ]
    },
    "tams_apiCalcCreditsJobResponse": {
      "type": "object",
      "properties": {
        "credits": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "tams_apiCancelJobResponse": {
      "type": "object",
      "properties": {
        "jobId": {
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "tams_apiControlnet": {
      "type": "object",
      "properties": {
        "args": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiControlnetArgs"
          }
        }
      }
    },
    "tams_apiControlnetArgs": {
      "type": "object",
      "properties": {
        "inputImageResourceId": {
          "type": "string"
        },
        "maskResourceId": {
          "type": "string"
        },
        "preprocessor": {
          "type": "string",
          "example": {},
          "description": "The model to use for the controlnet preprocessor\n[Support list](/docs/api/guide/list-of-constants#preprocessor)"
        },
        "model": {
          "type": "string",
          "example": {},
          "description": "The model to use for the controlnet\n[Support list](/docs/api/guide/list-of-constants#model-1)"
        },
        "weight": {
          "type": "number",
          "format": "float"
        },
        "resizeMode": {
          "$ref": "#/definitions/ControlnetArgsResizeModeT"
        },
        "guidance": {
          "type": "number",
          "format": "float"
        },
        "guidanceStart": {
          "type": "number",
          "format": "float"
        },
        "guidanceEnd": {
          "type": "number",
          "format": "float"
        },
        "controlMode": {
          "$ref": "#/definitions/ArgsControlModeT"
        },
        "pixelPerfect": {
          "type": "boolean"
        },
        "preprocessorParams": {
          "type": "object"
        }
      },
      "required": [
        "preprocessor",
        "model"
      ]
    },
    "tams_apiCreateJobRequest": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string",
          "description": "ensure request idempotence, should be unique"
        },
        "stages": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiStage"
          },
          "description": "stages to be executed"
        },
        "notifyUrl": {
          "type": "string"
        }
      },
      "required": [
        "requestId",
        "stages"
      ]
    },
    "tams_apiCreateJobResponse": {
      "type": "object",
      "properties": {
        "job": {
          "$ref": "#/definitions/tams_apiJobInfoForClient"
        }
      }
    },
    "tams_apiCreateResourceImageRequest": {
      "type": "object",
      "properties": {
        "expireSec": {
          "type": "string",
          "format": "int64",
          "title": "int32 term = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {\n    description: \"term of resource, 1-short(keep 7days) 2-long(keep forever)\"\n  }];"
        }
      }
    },
    "tams_apiCreateResourceImageResponse": {
      "type": "object",
      "properties": {
        "resourceId": {
          "type": "string"
        },
        "putUrl": {
          "type": "string"
        },
        "headers": {
          "type": "object"
        }
      }
    },
    "tams_apiCreateResourceImageSTSRequest": {
      "type": "object",
      "properties": {
        "expireSec": {
          "type": "string",
          "format": "int64",
          "title": "int32 term = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {\n    description: \"term of resource, 1-short(keep 7days) 2-long(keep forever)\"\n  }];"
        }
      }
    },
    "tams_apiCreateResourceImageSTSResponse": {
      "type": "object",
      "properties": {
        "resourceId": {
          "type": "string"
        },
        "accessId": {
          "type": "string"
        },
        "signature": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "expire": {
          "type": "string"
        },
        "callback": {
          "type": "string"
        },
        "filePath": {
          "type": "string"
        },
        "policy": {
          "type": "string"
        },
        "securityToken": {
          "type": "string"
        }
      }
    },
    "tams_apiDiffusionInput": {
      "type": "object",
      "properties": {
        "width": {
          "type": "integer",
          "format": "int64",
          "default": "512",
          "description": "Height of the image in pixels. Must be in increments of 64 and pass the following validation: \n- For 512 engines: 262,144 ≤ height * width ≤ 1,048,576, Maximum 1024 \n- For 768 engines: 589,824 ≤ height * width ≤ 1,048,576, Maximum 1024 \n- For SDXL v1.0: 262,144 ≤ height * width ≤ 2,073,600, Maximum 1536",
          "maximum": 1536,
          "minimum": 512
        },
        "height": {
          "type": "integer",
          "format": "int64",
          "default": "512",
          "description": "Height of the image in pixels. Must be in increments of 64 and pass the following validation: \n- For 512 engines: 262,144 ≤ height * width ≤ 1,048,576, Maximum 1024\n- For 768 engines: 589,824 ≤ height * width ≤ 1,048,576, Maximum 1024\n- For SDXL v1.0: 262,144 ≤ height * width ≤ 2,073,600, Maximum 1536",
          "maximum": 1536,
          "minimum": 512
        },
        "prompts": {
          "type": "array",
          "example": {},
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiPrompt",
            "maximum": 150
          },
          "description": "An array of text prompts to use for generation. Given a text prompt with the text A lighthouse on a cliff and a weight of 0.5, it would be represented as:\n"
        },
        "negativePrompts": {
          "type": "array",
          "example": {},
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiPrompt",
            "maximum": 150
          },
          "description": "An array of text negative prompts to use for generation. Given a text prompt with the text A lighthouse on a cliff and a weight of 0.5, it would be represented as:\n"
        },
        "sdModel": {
          "type": "string",
          "example": {},
          "description": "The model to use for the diffusion\n, [How to get the model id](/docs/api/guide/how-to-get-the-model-id)"
        },
        "sdVae": {
          "type": "string",
          "example": {},
          "description": "The vae to use for the diffusion\n[Support list](/docs/api/guide/list-of-constants#vae)"
        },
        "sampler": {
          "type": "string",
          "description": "Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you.\n[Support list](/docs/api/guide/list-of-constants#sampler)"
        },
        "steps": {
          "type": "integer",
          "format": "int32",
          "default": "0",
          "description": "Number of diffusion steps to run.",
          "maximum": 60,
          "minimum": 1
        },
        "cfgScale": {
          "type": "number",
          "format": "float",
          "default": "7",
          "description": "How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt)",
          "maximum": 30
        },
        "clipSkip": {
          "type": "integer",
          "format": "int32"
        },
        "denoisingStrength": {
          "type": "number",
          "format": "float"
        },
        "etaNoiseSeedDelta": {
          "type": "integer",
          "format": "int32"
        },
        "controlnet": {
          "$ref": "#/definitions/tams_apiControlnet"
        },
        "lora": {
          "$ref": "#/definitions/tams_apiLora"
        },
        "animateDiff": {
          "$ref": "#/definitions/tams_apiAnimateDiff"
        },
        "embedding": {
          "$ref": "#/definitions/tams_apiEmbedding"
        },
        "v1Clip": {
          "type": "boolean"
        }
      },
      "required": [
        "width",
        "height",
        "prompts",
        "negativePrompts"
      ]
    },
    "tams_apiEmbedding": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiEmbeddingItem"
          }
        }
      }
    },
    "tams_apiEmbeddingItem": {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "example": {},
          "description": "The model to use for the negative prompts embedding\n, [How to get the model id](/docs/api/guide/how-to-get-the-model-id)"
        },
        "weight": {
          "type": "number",
          "format": "float"
        }
      }
    },
    "tams_apiFailedInfo": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string"
        }
      }
    },
    "tams_apiField": {
      "type": "object",
      "properties": {
        "nodeId": {
          "type": "string"
        },
        "fieldName": {
          "type": "string"
        },
        "fieldValue": {}
      }
    },
    "tams_apiFields": {
      "type": "object",
      "properties": {
        "fieldAttrs": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiField"
          }
        }
      }
    },
    "tams_apiGetJobResponse": {
      "type": "object",
      "properties": {
        "job": {
          "$ref": "#/definitions/tams_apiJobInfoForClient"
        }
      }
    },
    "tams_apiGetModelResponse": {
      "type": "object",
      "properties": {
        "model": {
          "$ref": "#/definitions/tams_apiModel"
        }
      }
    },
    "tams_apiGetWorkflowTemplateResponse": {
      "type": "object",
      "properties": {
        "templateId": {
          "type": "string",
          "format": "uint64"
        },
        "name": {
          "type": "string",
          "description": "workflow template name"
        },
        "fields": {
          "$ref": "#/definitions/tams_apiFields",
          "description": "workflow template field, use to create workflow template job"
        }
      }
    },
    "tams_apiImageToAdetailerInput": {
      "type": "object",
      "properties": {
        "args": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiAdetailerArg"
          }
        },
        "diffusion": {
          "$ref": "#/definitions/tams_apiDiffusionInput"
        }
      }
    },
    "tams_apiImageToInpaintInput": {
      "type": "object",
      "properties": {
        "resizeMode": {
          "$ref": "#/definitions/ImageToInpaintInputResizeModeT",
          "title": "JUST_RESIZE"
        },
        "maskImageResourceId": {
          "type": "string"
        },
        "maskBlur": {
          "type": "number",
          "format": "float",
          "title": "4"
        },
        "inpaintingFill": {
          "$ref": "#/definitions/ImageToInpaintInputInpaintFillT",
          "title": "ORIGINAL"
        },
        "inpaintFullRes": {
          "type": "boolean",
          "title": "true"
        },
        "inpaintFullResPadding": {
          "type": "integer",
          "format": "int64",
          "title": "32"
        },
        "inpaintMaskInvert": {
          "type": "integer",
          "format": "int64",
          "title": "0"
        },
        "diffusion": {
          "$ref": "#/definitions/tams_apiDiffusionInput"
        }
      }
    },
    "tams_apiImageToUpscalerInput": {
      "type": "object",
      "properties": {
        "hrUpscaler": {
          "type": "string",
          "example": {},
          "description": "The model to use for the upscaling\n[Support list](/docs/api/guide/list-of-constants#upscaler)"
        },
        "hrResizeX": {
          "type": "integer",
          "format": "int64",
          "description": "hr_scale or hr_resize_x must be specified. If hr_scale is specified, hr_resize_x will be ignored.\nHeight of the image upscaler in pixels. Must be in increments of 64 and pass the following validation: \n- 262,144 ≤ hr_resize_x * hr_resize_y ≤ 8,294,400",
          "maximum": 5120,
          "minimum": 128
        },
        "hrResizeY": {
          "type": "integer",
          "format": "int64",
          "description": "hr_scale or hr_resize_y must be specified. If hr_scale is specified, hr_resize_y will be ignored.\nHeight of the image upscaler in pixels. Must be in increments of 64 and pass the following validation: \n- 262,144 ≤ hr_resize_x * hr_resize_y ≤ 8,294,400",
          "maximum": 5120,
          "minimum": 128
        },
        "hrScale": {
          "type": "number",
          "format": "double",
          "example": {},
          "description": "The size to use for the upscaling\n- 262,144 ≤ hr_resize_x * hr_resize_y ≤ 8,294,400"
        },
        "hrSecondPassSteps": {
          "type": "integer",
          "format": "int32",
          "example": {},
          "description": "Number of diffusion steps to run.",
          "maximum": 60
        },
        "denoisingStrength": {
          "type": "number",
          "format": "float",
          "example": {},
          "description": "denoising_strength",
          "maximum": 1
        },
        "diffusion": {
          "$ref": "#/definitions/tams_apiDiffusionInput",
          "example": {},
          "description": "if has diffusion stage, this diffusion will be ignored, else need to be specified"
        }
      },
      "required": [
        "hrUpscaler",
        "hrSecondPassSteps",
        "denoisingStrength"
      ]
    },
    "tams_apiInputInitializeInput": {
      "type": "object",
      "properties": {
        "seed": {
          "type": "string",
          "format": "int64",
          "default": "0",
          "description": "Random noise seed (omit this option or use 0 for a random seed).",
          "maximum": 4294967295
        },
        "imageResourceId": {
          "type": "string",
          "description": "Image used to initialize the diffusion process, in lieu of random noise."
        },
        "count": {
          "type": "integer",
          "format": "int32",
          "default": "1",
          "description": "Number of images to generate\n",
          "maximum": 4,
          "minimum": 1
        }
      }
    },
    "tams_apiJobInfoForClient": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64",
          "description": "job id"
        },
        "status": {
          "$ref": "#/definitions/tams_apiJobStatusT",
          "description": "job status"
        },
        "credits": {
          "type": "number",
          "format": "double"
        },
        "waitingInfo": {
          "$ref": "#/definitions/tams_apiWaitingInfo",
          "description": "waiting info, when status is waiting will return this"
        },
        "failedInfo": {
          "$ref": "#/definitions/tams_apiFailedInfo",
          "description": "failed info, when status is failed will return this"
        },
        "runningInfo": {
          "$ref": "#/definitions/tams_apiRunningInfo",
          "description": "running info, when status is running will return this"
        },
        "successInfo": {
          "$ref": "#/definitions/tams_apiSuccessInfo",
          "description": "success info, when status is success will return this"
        }
      }
    },
    "tams_apiJobStatusT": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "CREATED",
        "PENDING",
        "RUNNING",
        "CANCELED",
        "SUCCESS",
        "FAILED",
        "WAITING"
      ],
      "default": "DEFAULT"
    },
    "tams_apiLora": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiLoraItem"
          }
        }
      }
    },
    "tams_apiLoraItem": {
      "type": "object",
      "properties": {
        "loraModel": {
          "type": "string",
          "example": {},
          "description": "The model to use for the diffusion\n, [How to get the model id](/docs/api/guide/how-to-get-the-model-id)"
        },
        "weight": {
          "type": "number",
          "format": "float"
        },
        "blockWeight": {
          "type": "string",
          "description": "lora block weight, value such as \\\u003cweight\\\u003e:lbw=\\\u003clayer weight\\\u003e \nexample: \"1:lbw=1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0\""
        }
      }
    },
    "tams_apiModel": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "baseModel": {
          "type": "string"
        },
        "modelType": {
          "$ref": "#/definitions/ProjectModelTypeT"
        },
        "showcaseImageUrls": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "projectName": {
          "type": "string"
        },
        "triggerWords": {
          "type": "string"
        }
      }
    },
    "tams_apiProcessingImage": {
      "type": "object",
      "properties": {
        "resourceImage": {
          "$ref": "#/definitions/tams_apiResourceForClient"
        },
        "progress": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "tams_apiPrompt": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        },
        "weight": {
          "type": "number",
          "format": "float"
        }
      }
    },
    "tams_apiResourceForClient": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "expiredIn": {
          "type": "string",
          "format": "int64"
        },
        "meta": {
          "$ref": "#/definitions/tams_apiResourceMeta"
        }
      }
    },
    "tams_apiResourceMeta": {
      "type": "object",
      "properties": {
        "image": {
          "$ref": "#/definitions/tams_apiResourceMetaImage"
        }
      }
    },
    "tams_apiResourceMetaImage": {
      "type": "object",
      "properties": {
        "format": {
          "type": "string"
        },
        "width": {
          "type": "integer",
          "format": "int32"
        },
        "height": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "tams_apiRunningInfo": {
      "type": "object",
      "properties": {
        "processingImages": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiProcessingImage"
          }
        },
        "workflowFinishItem": {
          "$ref": "#/definitions/tams_apiWorkflowFinishItem"
        }
      }
    },
    "tams_apiStage": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/tams_apiStageTypeT",
          "description": "stage type",
          "title": "stage type"
        },
        "inputInitialize": {
          "$ref": "#/definitions/tams_apiInputInitializeInput"
        },
        "diffusion": {
          "$ref": "#/definitions/tams_apiDiffusionInput"
        },
        "imageToUpscaler": {
          "$ref": "#/definitions/tams_apiImageToUpscalerInput"
        },
        "imageToAdetailer": {
          "$ref": "#/definitions/tams_apiImageToAdetailerInput"
        },
        "imageToInpaint": {
          "$ref": "#/definitions/tams_apiImageToInpaintInput"
        }
      },
      "required": [
        "type"
      ]
    },
    "tams_apiStageTypeT": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "INPUT_INITIALIZE",
        "DIFFUSION",
        "IMAGE_TO_UPSCALER",
        "IMAGE_TO_ADETAILER",
        "IMAGE_TO_INPAINT",
        "IMAGE_TO_ANIMATE_DIFF"
      ],
      "default": "DEFAULT"
    },
    "tams_apiSuccessInfo": {
      "type": "object",
      "properties": {
        "images": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiResourceForClient"
          },
          "description": "final output images"
        },
        "videos": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/tams_apiResourceForClient"
          },
          "description": "final output videos"
        },
        "workflowFinishItem": {
          "$ref": "#/definitions/tams_apiWorkflowFinishItem",
          "title": "workflow"
        }
      }
    },
    "tams_apiWaitingInfo": {
      "type": "object",
      "properties": {
        "queueRank": {
          "type": "string",
          "format": "int64"
        },
        "queueLen": {
          "type": "string",
          "format": "int64"
        }
      }
    },
    "tams_apiWorkflowFinishItem": {
      "type": "object",
      "properties": {
        "status": {
          "$ref": "#/definitions/tams_apiWorkflowFinishItemStatusT"
        },
        "progress": {
          "type": "number",
          "format": "double"
        },
        "step": {
          "type": "integer",
          "format": "int32"
        },
        "id": {
          "type": "string"
        },
        "ctime": {
          "type": "string",
          "format": "int64"
        },
        "mtime": {
          "type": "string",
          "format": "int64"
        },
        "nodes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/tams_apiWorkflowFinishItemNode"
          }
        },
        "finishedNodes": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        }
      },
      "title": "先自己拼，后面接下游的服务"
    },
    "tams_apiWorkflowFinishItemNode": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/tams_apiWorkflowFinishItemStatusT"
        },
        "process": {
          "type": "number",
          "format": "double"
        },
        "outputUi": {
          "$ref": "#/definitions/NodeOutputUI"
        }
      }
    },
    "tams_apiWorkflowFinishItemStatusT": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "INIT",
        "RUNNING",
        "SUCCESS",
        "FAILED"
      ],
      "default": "DEFAULT"
    },
    "tams_apiWorkflowJobCreateRequest": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string"
        },
        "params": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/tams_apiWorkflowNode"
          }
        },
        "runningNotifyUrl": {
          "type": "string"
        }
      }
    },
    "tams_apiWorkflowJobCreateResponse": {
      "type": "object",
      "properties": {
        "job": {
          "$ref": "#/definitions/tams_apiJobInfoForClient"
        }
      }
    },
    "tams_apiWorkflowNode": {
      "type": "object",
      "properties": {
        "classType": {
          "type": "string"
        },
        "inputs": {
          "type": "object"
        },
        "properties": {
          "type": "object"
        }
      }
    },
    "tams_apiWorkflowParamsCheckRequest": {
      "type": "object",
      "properties": {
        "params": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/tams_apiWorkflowNode"
          }
        }
      }
    },
    "tams_apiWorkflowParamsCheckResponse": {
      "type": "object",
      "properties": {
        "valid": {
          "type": "boolean"
        },
        "credits": {
          "type": "number",
          "format": "float"
        }
      }
    },
    "tams_apiWorkflowTemplateCheckRequest": {
      "type": "object",
      "properties": {
        "templateId": {
          "type": "string",
          "format": "uint64"
        },
        "fields": {
          "$ref": "#/definitions/tams_apiFields"
        }
      }
    },
    "tams_apiWorkflowTemplateCheckResponse": {
      "type": "object",
      "properties": {
        "valid": {
          "type": "boolean"
        },
        "credits": {
          "type": "number",
          "format": "float"
        }
      }
    },
    "tams_apiWorkflowTemplateJobCreateRequest": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": "string"
        },
        "templateId": {
          "type": "string",
          "format": "uint64"
        },
        "fields": {
          "$ref": "#/definitions/tams_apiFields"
        }
      }
    },
    "tams_apiWorkflowTemplateJobCreateResponse": {
      "type": "object",
      "properties": {
        "job": {
          "$ref": "#/definitions/tams_apiJobInfoForClient"
        }
      }
    }
  }
}
