{
  "openapi": "3.0.4",
  "info": {
    "title": "Dezgo API v2",
    "description": "🪄 Provides fast, easy access to advanced AI models.\n\n- Authentication: `X-Dezgo-Key` header (optional for some public methods)\n- Requests:\n  - `GET`: for methods that don't have any input field\n  - `POST` a JSON object (`Content-Type: application/json`)\n- Responses: a JSON object (`Content-Type: application/json`)\n",
    "version": "v2",
    "x-logo": {
      "url": "https://static.dezgo.com/favicon_64.webp",
      "backgroundColor": "#FFFFFF"
    }
  },
  "servers": [
    {
      "url": "https://api.dezgo.com/",
      "description": "Production API endpoint"
    }
  ],
  "paths": {
    "/v2/app/get_snapshot": {
      "get": {
        "tags": [
          "App API v2"
        ],
        "summary": "/app/get_snapshot",
        "description": " Gets a snapshot of the complete classic built-in Dezgo app catalog.\n",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/dezgo.app.v2.GetSnapshotResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/info/get": {
      "get": {
        "tags": [
          "Info API v2"
        ],
        "summary": "/info/get",
        "description": " Get platform information such as build version.\n",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/dezgo.info.v2.InfoGetResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/info/stats": {
      "get": {
        "tags": [
          "Info API v2"
        ],
        "summary": "/info/stats",
        "description": " Get statistics about the whole Dezgo platform.\n",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/dezgo.info.v2.InfoStatsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/info/news": {
      "get": {
        "tags": [
          "Info API v2"
        ],
        "summary": "/info/news",
        "description": " Gets the current ordered collection of news banners for Dezgo clients.\n",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/dezgo.info.v2.InfoNewsResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "dezgo.app.v2.AppConstraint": {
        "allOf": [
          {
            "description": " Describes one validation or normalization rule spanning multiple app inputs.\n",
            "type": "object",
            "additionalProperties": false
          },
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "model_auto_resolution_from_id": {
                    "$ref": "#/components/schemas/dezgo.app.v2.AppConstraint.ModelAutoResolutionFromId"
                  }
                },
                "required": [
                  "model_auto_resolution_from_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "image_max_pixels": {
                    "$ref": "#/components/schemas/dezgo.app.v2.AppConstraint.ImageMaxPixels"
                  }
                },
                "required": [
                  "image_max_pixels"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "images_same_size": {
                    "$ref": "#/components/schemas/dezgo.app.v2.AppConstraint.ImagesSameSize"
                  }
                },
                "required": [
                  "images_same_size"
                ]
              }
            ]
          }
        ]
      },
      "dezgo.app.v2.AppConstraint.ImageMaxPixels": {
        "description": " A constraint limiting the image-like product of two numeric inputs.\n",
        "type": "object",
        "properties": {
          "width_input_id": {
            "description": " ID of the numeric width input.\n",
            "type": "string"
          },
          "height_input_id": {
            "description": " ID of the numeric height input.\n",
            "type": "string"
          },
          "max_pixels": {
            "description": " Maximum accepted product of the referenced width and height input values.\n",
            "type": "integer",
            "format": "int64"
          },
          "auto_fix": {
            "description": " Whether the two values may be scaled down instead of rejected.\n",
            "type": "boolean"
          }
        },
        "required": [
          "width_input_id",
          "height_input_id",
          "max_pixels",
          "auto_fix"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.AppConstraint.ImagesSameSize": {
        "description": " A constraint requiring image inputs to have identical dimensions.\n",
        "type": "object",
        "properties": {
          "image_input_ids": {
            "description": " IDs of image inputs that must have identical width and height.\n",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "image_input_ids"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.AppConstraint.ModelAutoResolutionFromId": {
        "description": " A constraint that fills missing width and height from the selected model id.\n\n The current C# behavior reads the `model` input, recognizes suffixes such as\n `_768px` and `_768x1024px`, and falls back to 512x512 when no suffix is found.\n",
        "type": "object",
        "additionalProperties": false
      },
      "dezgo.app.v2.AppConstraints": {
        "description": " Contains a complete list of app-level constraints.\n\n `DezgoClassicApp.constraints` uses this message for the canonical list.\n Within `AppFreePolicy`, message presence distinguishes inheritance from an\n explicit empty or populated replacement.\n",
        "type": "object",
        "properties": {
          "rules": {
            "description": " App-level constraints applied across multiple inputs.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.app.v2.AppConstraint"
            }
          }
        },
        "required": [
          "rules"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.AppDeprecation": {
        "description": " Explains why an app remains addressable but cannot accept new jobs.\n",
        "type": "object",
        "properties": {
          "reason": {
            "description": " Human-readable reason shown on the app page and in rejected API responses.\n Published deprecation policies must provide a nonempty reason.\n",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.AppFreePolicy": {
        "description": " Describes the caller-visible policy applied when an app is offered through\n Dezgo Free Mode.\n\n Presence of this message means that the app supports Free Mode. Absence means\n that the app is not offered through Free Mode. When this message has no\n `constraints`, the canonical app-level constraints apply unchanged;\n individual inputs may still declare input-specific Free behavior.\n\n Free Mode never changes the app's input IDs or concrete input types.\n Input-specific Free behavior is declared beside each canonical input through\n `AppInput.free`.\n\n The public policy does not identify who funds calls, grant publication\n privileges, or guarantee runtime availability.\n",
        "type": "object",
        "properties": {
          "constraints": {
            "$ref": "#/components/schemas/dezgo.app.v2.AppConstraints"
          }
        },
        "required": [
          "constraints"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.AppInput": {
        "description": " Describes one input in an app's stable call signature.\n",
        "type": "object",
        "properties": {
          "id": {
            "description": " Stable parameter identifier used in API requests, jobs, pricing paths, and\n UI bindings.\n",
            "type": "string"
          },
          "name": {
            "description": " Human-readable input name displayed to end users.\n",
            "type": "string"
          },
          "is_advanced": {
            "description": " Whether the parameter should be hidden from the main form by default.\n",
            "type": "boolean"
          },
          "visibility": {
            "$ref": "#/components/schemas/dezgo.app.v2.AppInputVisibility"
          },
          "summary": {
            "description": " Short user-facing description displayed in web forms and API summaries.\n",
            "type": "string"
          },
          "api_notes": {
            "description": " Additional developer-facing notes appended after `summary` in API reference\n documentation. End-user clients should not display this text in input forms.\n",
            "type": "string"
          },
          "required": {
            "description": " Whether callers must explicitly provide this input.\n\n Presence is checked before applying a default or generating a seed:\n\n - When true, omitting the input is invalid even if the effective `type`\n   declares a default.\n - When false, an omitted input uses the effective `type` descriptor's\n   default when one is configured. Without a default it remains absent,\n   except that an omitted seed is generated according to `SeedType`\n   semantics.\n - A provided value must still be parsed, normalized only where its\n   constraints explicitly permit it, and validated.\n\n Client-side required checks, prefilling, and validation are advisory. The\n invocation service remains authoritative.\n",
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/dezgo.app.v2.TypeInfo"
          },
          "monetizable": {
            "description": " Whether the resolved input value is included in the input summary provided\n to the separately resolved pricing policy.\n\n This flag does not itself assign a cost, and it has no effect when pricing\n is not evaluated, including in Free Mode.\n",
            "type": "boolean"
          },
          "free": {
            "$ref": "#/components/schemas/dezgo.app.v2.InputFreePolicy"
          }
        },
        "required": [
          "id",
          "name",
          "is_advanced",
          "visibility",
          "summary",
          "api_notes",
          "required",
          "type",
          "monetizable",
          "free"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.AppInputVisibility": {
        "description": " View metadata describing where a Dezgo app input should be exposed.\n\n These fields drive generated API documentation and web-client form rendering\n only.\n\n They are not server-side authorization or validation rules: a hidden input\n may still be parsed and validated when submitted.\n",
        "type": "object",
        "properties": {
          "api_docs": {
            "description": " Whether the input is listed in the public API documentation.\n\n This controls generated OpenAPI/request schema view behavior; it does not\n make the server reject the input when clients submit it.\n",
            "type": "boolean"
          },
          "web": {
            "description": " Whether this input may be exposed through web forms.\n\n Optional composite-input metadata may present this input through a logical\n control instead of displaying it as a standalone field. Clients that do\n not support that metadata may render the canonical input independently.\n\n The input's `AppInput.free` policy may make an exposed input\n non-configurable in the Free Mode web interface.\n",
            "type": "boolean"
          }
        },
        "required": [
          "api_docs",
          "web"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.AppLicense": {
        "description": " Describes one license referenced by apps in a classic catalog.\n",
        "type": "object",
        "properties": {
          "id": {
            "description": " Stable license id used by app references.\n",
            "type": "string"
          },
          "name": {
            "description": " Formal human-readable license name.\n",
            "type": "string"
          },
          "url": {
            "description": " Absolute HTTPS URL for the authoritative license or terms document.\n",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "url"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.AppMetadata": {
        "description": " Additional specialized metadata for an app.\n\n This message groups behavior that spans several canonical inputs or does not\n belong to an input, cross-input constraint, or pricing policy.\n",
        "type": "object",
        "properties": {
          "lora_settings": {
            "$ref": "#/components/schemas/dezgo.app.v2.LoraSettings"
          },
          "job_fan_out": {
            "$ref": "#/components/schemas/dezgo.app.v2.JobFanOutPolicy"
          },
          "image_resolutions": {
            "description": " Legacy width/height input pairs that presentation clients may combine into\n image-resolution controls.\n\n This metadata does not change the app's invocation signature, validation,\n or accepted request fields. Clients may ignore it and render the canonical\n inputs independently. New app signatures should prefer one appropriately\n structured input instead.\n\n Declaration order is the preferred presentation order when an app exposes\n several resolution controls.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.app.v2.ImageResolutionView"
            }
          }
        },
        "required": [
          "lora_settings",
          "job_fan_out",
          "image_resolutions"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.BooleanConstraints": {
        "description": " Constraints enforced for boolean values.\n",
        "type": "object",
        "properties": {
          "expected": {
            "nullable": true,
            "description": " Required boolean value. If absent, either boolean value is accepted.\n",
            "type": "boolean"
          },
          "auto_fix": {
            "description": " Whether the value may be rewritten to `expected` instead of rejected.\n",
            "type": "boolean"
          }
        },
        "required": [
          "auto_fix"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.BooleanType": {
        "description": " Boolean type descriptor.\n",
        "type": "object",
        "properties": {
          "default": {
            "nullable": true,
            "description": " Default used for an omitted, non-required input. If absent, the input\n remains absent.\n",
            "type": "boolean"
          },
          "constraints": {
            "$ref": "#/components/schemas/dezgo.app.v2.BooleanConstraints"
          }
        },
        "required": [
          "constraints"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.DezgoClassicApp": {
        "description": " Represents the long-lived, non-Hub Dezgo app model.\n\n This flattened record combines app-specific configuration with catalog\n metadata and is intended to become a stable production contract in its own\n right. A future Hub model may provide a separate, object-agnostic way to\n discover and access Dezgo content, but does not make this contract\n transitional.\n\n App-specific component types such as inputs, type descriptors, constraints,\n and Free Mode policy are designed for reuse by a future Hub app\n payload without requiring a parallel object model.\n\n This descriptor is independent of the requesting user. Pricing is resolved\n separately because the applicable policy may depend on the user's agreement.\n",
        "type": "object",
        "properties": {
          "id": {
            "description": " The main app id used to reference the function in API endpoints and catalogs.\n\n Example: `text2image`.\n",
            "type": "string"
          },
          "estimated_processing_duration": {
            "$ref": "#/components/schemas/dezgo.app.v2.DurationRange"
          },
          "name": {
            "description": " Human-readable name.\n\n Example: `Text-to-Image`.\n",
            "type": "string"
          },
          "summary": {
            "description": " Short user-facing description.\n",
            "type": "string"
          },
          "description": {
            "description": " Longer API documentation description.\n",
            "type": "string"
          },
          "powered_by": {
            "nullable": true,
            "description": " Optional provider or model family attribution.\n",
            "type": "string"
          },
          "sfw": {
            "description": " Whether the app is marked safe for work.\n",
            "type": "boolean"
          },
          "is_private_beta": {
            "description": " Whether the app is only available to private beta users.\n",
            "type": "boolean"
          },
          "is_dev": {
            "description": " Whether the production app is developer-facing and may be hidden from\n default consumer catalog views.\n",
            "type": "boolean"
          },
          "is_new": {
            "description": " Whether presentation clients should display a \"New\" badge for this app.\n",
            "type": "boolean"
          },
          "material_icon": {
            "$ref": "#/components/schemas/dezgo.app.v2.MaterialIcon.Kind"
          },
          "license_id": {
            "nullable": true,
            "description": " Optional id of the license record under which this app is offered.\n\n The id resolves against `DezgoClassicCatalog.licenses` from the same\n catalog snapshot.\n",
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/dezgo.app.v2.AppMetadata"
          },
          "inputs": {
            "description": " Complete ordered input signature accepted by this app in every execution\n tier and mode. An input may carry a narrow Free Mode policy that changes\n its effective type descriptor or web presentation without changing its\n identity or concrete type.\n\n Input IDs must be unique. List order is the canonical presentation order\n for generic forms and API documentation; request field order has no\n semantic meaning, and all references use input IDs.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.app.v2.AppInput"
            }
          },
          "constraints": {
            "$ref": "#/components/schemas/dezgo.app.v2.AppConstraints"
          },
          "free": {
            "$ref": "#/components/schemas/dezgo.app.v2.AppFreePolicy"
          },
          "thumbnail": {
            "$ref": "#/components/schemas/dezgo.types.Thumbnail"
          },
          "deprecation": {
            "$ref": "#/components/schemas/dezgo.app.v2.AppDeprecation"
          }
        },
        "required": [
          "id",
          "estimated_processing_duration",
          "name",
          "summary",
          "description",
          "sfw",
          "is_private_beta",
          "is_dev",
          "is_new",
          "material_icon",
          "metadata",
          "inputs",
          "constraints",
          "free",
          "thumbnail",
          "deprecation"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.DezgoClassicAppCollection": {
        "description": " Describes one ordered presentation collection in a classic app catalog.\n",
        "type": "object",
        "properties": {
          "id": {
            "description": " Stable collection id used by clients for collection-specific behavior.\n",
            "type": "string"
          },
          "name": {
            "description": " Human-readable collection name.\n",
            "type": "string"
          },
          "app_ids": {
            "description": " Canonical app ids in presentation order.\n\n Each occurrence represents a presentation position, so duplicate and\n unknown ids are valid. Clients must preserve every occurrence and visibly\n report unknown ids in place instead of dropping or reordering them.\n",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "is_new": {
            "description": " Whether presentation clients should display a \"New\" badge for this collection.\n",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "app_ids",
          "is_new"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.DezgoClassicCatalog": {
        "description": " Catalog of classic Dezgo app descriptors.\n",
        "type": "object",
        "properties": {
          "apps": {
            "description": " App descriptors ordered by their canonical `DezgoClassicApp.id` value.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.app.v2.DezgoClassicApp"
            }
          },
          "collections": {
            "description": " Ordered collections used to present apps in catalog clients.\n\n Collection order is significant and defines their presentation order.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.app.v2.DezgoClassicAppCollection"
            }
          },
          "licenses": {
            "description": " License records referenced by `DezgoClassicApp.license_id`.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.app.v2.AppLicense"
            }
          }
        },
        "required": [
          "apps",
          "collections",
          "licenses"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.DurationRange": {
        "description": " Approximate duration range used for app/function metadata.\n\n This estimate is informational and is not a deadline or service-level\n guarantee. Both bounds must be finite and non-negative, and `min_seconds`\n must not exceed `max_seconds`.\n",
        "type": "object",
        "properties": {
          "min_seconds": {
            "description": " Lower bound of the estimated duration, in seconds.\n",
            "oneOf": [
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "string",
                "enum": [
                  "NaN",
                  "Infinity",
                  "-Infinity"
                ]
              }
            ]
          },
          "max_seconds": {
            "description": " Upper bound of the estimated duration, in seconds.\n",
            "oneOf": [
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "string",
                "enum": [
                  "NaN",
                  "Infinity",
                  "-Infinity"
                ]
              }
            ]
          }
        },
        "required": [
          "min_seconds",
          "max_seconds"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.EnumerationOption": {
        "description": " One selectable enum option.\n",
        "type": "object",
        "properties": {
          "id": {
            "description": " Stable non-human-readable id submitted by clients and validated by the server.\n",
            "type": "string"
          },
          "view": {
            "$ref": "#/components/schemas/dezgo.app.v2.EnumerationOptionView"
          }
        },
        "required": [
          "id",
          "view"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.EnumerationOptionNotice": {
        "description": " Contextual information displayed when an enum option is selected.\n",
        "type": "object",
        "properties": {
          "text": {
            "description": " Plain-text notice shown to the user.\n",
            "type": "string"
          },
          "copyable_text": {
            "nullable": true,
            "description": " Optional text that clients should offer to copy to the clipboard.\n",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.EnumerationOptionView": {
        "description": " View metadata for one selectable enum option.\n",
        "type": "object",
        "properties": {
          "name": {
            "description": " Human-readable name. This does not change the submitted or\n accepted option ID. If empty, consumers may display the option ID.\n",
            "type": "string"
          },
          "thumbnail": {
            "$ref": "#/components/schemas/dezgo.types.Thumbnail"
          },
          "hidden": {
            "description": " Whether default pickers should omit this option while keeping it valid for\n API requests and previously stored values.\n",
            "type": "boolean"
          },
          "notice": {
            "$ref": "#/components/schemas/dezgo.app.v2.EnumerationOptionNotice"
          },
          "tags": {
            "description": " Ordered human-readable tags associated with this option. Presentation\n clients may display these alongside the display name.\n",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "thumbnail",
          "hidden",
          "notice",
          "tags"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.EnumerationType": {
        "description": " Enumeration type descriptor.\n",
        "type": "object",
        "properties": {
          "options": {
            "description": " Allowed enum options in stable display and validation order.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.app.v2.EnumerationOption"
            }
          },
          "default": {
            "nullable": true,
            "description": " Default option ID used for an omitted, non-required input. It must equal\n one of the configured `options.id` values. If absent, the input remains\n absent.\n",
            "type": "string"
          }
        },
        "required": [
          "options"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.FloatingConstraints": {
        "description": " Constraints enforced for floating-point values.\n",
        "type": "object",
        "properties": {
          "min": {
            "nullable": true,
            "description": " Minimum accepted value, inclusive. If absent, there is no lower bound.\n",
            "oneOf": [
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "string",
                "enum": [
                  "NaN",
                  "Infinity",
                  "-Infinity"
                ]
              }
            ]
          },
          "max": {
            "nullable": true,
            "description": " Maximum accepted value, inclusive. If absent, there is no upper bound.\n",
            "oneOf": [
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "string",
                "enum": [
                  "NaN",
                  "Infinity",
                  "-Infinity"
                ]
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "dezgo.app.v2.FloatingFormat": {
        "description": " Namespace for floating-point display formats supported by clients.\n",
        "type": "object",
        "additionalProperties": false
      },
      "dezgo.app.v2.FloatingFormat.Kind": {
        "description": " Floating-point display formats supported by clients.\n",
        "x-enum-descriptions": [
          " Display 0.0 as 0% and 1.0 as 100% without changing the underlying value.\n Value 1 preserves the wire representation of the former `percentage = true` field.\n",
          " Use the client's normal floating-point representation.\n"
        ],
        "type": "string",
        "enum": [
          "PERCENTAGE",
          "UNSPECIFIED"
        ]
      },
      "dezgo.app.v2.FloatingType": {
        "description": " Floating-point type descriptor.\n",
        "type": "object",
        "properties": {
          "default": {
            "nullable": true,
            "description": " Default used for an omitted, non-required input. If absent, the input\n remains absent.\n",
            "oneOf": [
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "string",
                "enum": [
                  "NaN",
                  "Infinity",
                  "-Infinity"
                ]
              }
            ]
          },
          "constraints": {
            "$ref": "#/components/schemas/dezgo.app.v2.FloatingConstraints"
          },
          "view": {
            "$ref": "#/components/schemas/dezgo.app.v2.FloatingView"
          }
        },
        "required": [
          "constraints",
          "view"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.FloatingView": {
        "description": " View metadata for floating-point values.\n",
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/dezgo.app.v2.FloatingFormat.Kind"
          },
          "min": {
            "nullable": true,
            "description": " Minimum value offered by numeric UI controls. If absent, clients should\n use the corresponding floating-point minimum constraint.\n",
            "oneOf": [
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "string",
                "enum": [
                  "NaN",
                  "Infinity",
                  "-Infinity"
                ]
              }
            ]
          },
          "max": {
            "nullable": true,
            "description": " Maximum value offered by numeric UI controls. If absent, clients should\n use the corresponding floating-point maximum constraint.\n",
            "oneOf": [
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "string",
                "enum": [
                  "NaN",
                  "Infinity",
                  "-Infinity"
                ]
              }
            ]
          },
          "step": {
            "nullable": true,
            "description": " Positive increment suggested to numeric UI controls. This does not require\n submitted values to be aligned to the step. If absent, clients should\n choose a suitable display increment.\n",
            "oneOf": [
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "string",
                "enum": [
                  "NaN",
                  "Infinity",
                  "-Infinity"
                ]
              }
            ]
          },
          "initial": {
            "nullable": true,
            "description": " Value used by presentation clients when initializing a new floating-point\n editor.\n\n When absent, clients initialize the editor from the effective floating-point\n default. This is a presentation hint only and does not alter the default\n applied when an optional input is omitted.\n",
            "oneOf": [
              {
                "type": "number",
                "format": "double"
              },
              {
                "type": "string",
                "enum": [
                  "NaN",
                  "Infinity",
                  "-Infinity"
                ]
              }
            ]
          }
        },
        "required": [
          "format"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.GetSnapshotResponse": {
        "description": " Response containing a snapshot of the complete classic built-in Dezgo app catalog.\n",
        "type": "object",
        "properties": {
          "catalog": {
            "$ref": "#/components/schemas/dezgo.app.v2.DezgoClassicCatalog"
          }
        },
        "required": [
          "catalog"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.ImageConstraints": {
        "description": " Constraints enforced for image values.\n",
        "type": "object",
        "properties": {
          "min_side_pixels": {
            "nullable": true,
            "description": " Minimum allowed value for both image width and image height, in pixels.\n If absent, there is no lower bound.\n",
            "type": "integer",
            "format": "int32"
          },
          "max_side_pixels": {
            "nullable": true,
            "description": " Maximum allowed value for both image width and image height, in pixels.\n If absent, there is no upper bound.\n",
            "type": "integer",
            "format": "int32"
          },
          "auto_scale": {
            "nullable": true,
            "description": " Whether oversized or undersized images may be resized instead of rejected.\n\n If absent, treat this as true.\n",
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "dezgo.app.v2.ImageResolution": {
        "description": " One concrete image resolution.\n",
        "type": "object",
        "properties": {
          "width": {
            "description": " Positive width in pixels.\n",
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "height": {
            "description": " Positive height in pixels.\n",
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        },
        "required": [
          "width",
          "height"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.ImageResolutionView": {
        "description": " Presents two canonical integer inputs as one image-resolution control.\n\n Clients may ignore this view and render the referenced width and height\n inputs independently.\n",
        "type": "object",
        "properties": {
          "width_input_id": {
            "description": " Canonical integer input receiving the selected width.\n",
            "type": "string"
          },
          "height_input_id": {
            "description": " Canonical integer input receiving the selected height.\n",
            "type": "string"
          },
          "presets": {
            "description": " Selectable resolutions in presentation order.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.app.v2.ImageResolution"
            }
          },
          "initial": {
            "$ref": "#/components/schemas/dezgo.app.v2.ImageResolution"
          },
          "allow_custom": {
            "description": " Whether clients should offer direct width and height editing in addition\n to the configured presets.\n",
            "type": "boolean"
          }
        },
        "required": [
          "width_input_id",
          "height_input_id",
          "presets",
          "initial",
          "allow_custom"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.ImageType": {
        "description": " Image type descriptor.\n",
        "type": "object",
        "properties": {
          "constraints": {
            "$ref": "#/components/schemas/dezgo.app.v2.ImageConstraints"
          }
        },
        "required": [
          "constraints"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.InputFreePolicy": {
        "description": " Describes the Free Mode behavior owned by one app input.\n\n Keeping this policy beside the canonical input avoids detached ID-based\n lookups while keeping `TypeInfo` itself independent of execution context.\n",
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/dezgo.app.v2.TypeInfo"
          },
          "locked": {
            "description": " Whether the Free Mode web interface should display this input as locked.\n\n This is presentation metadata only. It does not determine whether a\n submitted value is accepted; the invocation service validates against the\n effective type descriptor and app-level constraints.\n",
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "locked"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.IntegerConstraints": {
        "description": " Constraints enforced for integer values.\n",
        "type": "object",
        "properties": {
          "min": {
            "nullable": true,
            "description": " Minimum accepted value, inclusive. If absent, there is no lower bound.\n",
            "type": "integer",
            "format": "int64"
          },
          "max": {
            "nullable": true,
            "description": " Maximum accepted value, inclusive. If absent, there is no upper bound.\n",
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "dezgo.app.v2.IntegerControl": {
        "description": " Namespace for integer input controls supported by presentation clients.\n",
        "type": "object",
        "additionalProperties": false
      },
      "dezgo.app.v2.IntegerControl.Kind": {
        "description": " Integer input controls supported by presentation clients.\n",
        "x-enum-descriptions": [
          " Edit the integer with a slider.\n",
          " Select the integer from the discrete values defined by the effective\n view minimum, maximum, and step.\n",
          " Use the client's normal integer control, conventionally a slider.\n"
        ],
        "type": "string",
        "enum": [
          "SLIDER",
          "DISCRETE_SELECT",
          "UNSPECIFIED"
        ]
      },
      "dezgo.app.v2.IntegerType": {
        "description": " Integer type descriptor.\n",
        "type": "object",
        "properties": {
          "default": {
            "nullable": true,
            "description": " Default used for an omitted, non-required input. If absent, the input\n remains absent.\n",
            "type": "integer",
            "format": "int64"
          },
          "constraints": {
            "$ref": "#/components/schemas/dezgo.app.v2.IntegerConstraints"
          },
          "view": {
            "$ref": "#/components/schemas/dezgo.app.v2.IntegerView"
          }
        },
        "required": [
          "constraints",
          "view"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.IntegerView": {
        "description": " View metadata for integer values.\n",
        "type": "object",
        "properties": {
          "min": {
            "nullable": true,
            "description": " Minimum value offered by numeric UI controls. If absent, clients should\n use the corresponding integer minimum constraint.\n",
            "type": "integer",
            "format": "int64"
          },
          "max": {
            "nullable": true,
            "description": " Maximum value offered by numeric UI controls. If absent, clients should\n use the corresponding integer maximum constraint.\n",
            "type": "integer",
            "format": "int64"
          },
          "step": {
            "nullable": true,
            "description": " Positive increment suggested to numeric UI controls. This does not require\n submitted values to be aligned to the step. If absent, clients should\n choose a suitable display increment.\n",
            "type": "integer",
            "format": "int64"
          },
          "control": {
            "$ref": "#/components/schemas/dezgo.app.v2.IntegerControl.Kind"
          }
        },
        "required": [
          "control"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.JobFanOutPolicy": {
        "description": " Describes client-side expansion of one logical submission into several\n independent app invocations.\n",
        "type": "object",
        "properties": {
          "max_count": {
            "description": " Maximum number of independent invocations offered by the client-side\n fan-out control.\n\n Published policies must set a positive value. The control has a fixed\n minimum and default of one. Free Mode clients must lock it to one. Clients\n may enforce a lower implementation-specific safety limit.\n",
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        },
        "required": [
          "max_count"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.LoraSettings": {
        "description": " Settings that describe how a legacy numbered LoRA input family is accepted.\n\n The settings include both validation limits and compatibility metadata used\n when preparing LoRA files before an invocation is executed. The flat numbered\n signature is a legacy representation; future signatures should prefer a\n repeated structured input.\n",
        "type": "object",
        "properties": {
          "max_lora_count": {
            "description": " Maximum number of active LoRA adapters a single invocation can use at a\n time.\n",
            "type": "integer",
            "format": "int32"
          },
          "max_lora_bytes": {
            "description": " Maximum size allowed for a single LoRA adapter in bytes.\n",
            "type": "integer",
            "format": "int64"
          },
          "civitai_base_model_names": {
            "description": " CivitAI base model names that are compatible with these LoRA settings.\n",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "valid_name_hashes": {
            "description": " Safetensors name hashes that are valid for these LoRA settings.\n\n When empty, name hashes are not checked.\n",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "max_lora_count",
          "max_lora_bytes",
          "civitai_base_model_names",
          "valid_name_hashes"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.MaterialIcon": {
        "description": " Namespace for Material icons supported by catalog presentation clients.\n",
        "type": "object",
        "additionalProperties": false
      },
      "dezgo.app.v2.MaterialIcon.Kind": {
        "description": " Material icons currently used by the Dezgo app catalog.\n",
        "x-enum-descriptions": [
          " The Material `cloud` icon.\n",
          " The Material `textsms` icon.\n",
          " The Material `control_camera` icon.\n",
          " The Material `photo_library` icon.\n",
          " The Material `aspect_ratio` icon.\n",
          " The Material `wrap_text` icon.\n",
          " The Material `edit_note` icon.\n",
          " The Material `hide_image` icon.\n",
          " The Material `videocam` icon.\n",
          " The Material `video_camera_back` icon.\n",
          " No Material icon has been selected.\n"
        ],
        "type": "string",
        "enum": [
          "CLOUD",
          "TEXTSMS",
          "CONTROL_CAMERA",
          "PHOTO_LIBRARY",
          "ASPECT_RATIO",
          "WRAP_TEXT",
          "EDIT_NOTE",
          "HIDE_IMAGE",
          "VIDEOCAM",
          "VIDEO_CAMERA_BACK",
          "UNSPECIFIED"
        ]
      },
      "dezgo.app.v2.SeedConstraints": {
        "description": " Constraints enforced for seed values.\n",
        "type": "object",
        "properties": {
          "min": {
            "nullable": true,
            "description": " Minimum accepted seed value, inclusive. If absent, there is no lower bound.\n",
            "type": "integer",
            "format": "int64"
          },
          "max": {
            "nullable": true,
            "description": " Maximum accepted seed value, inclusive. If absent, there is no upper bound.\n",
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "dezgo.app.v2.SeedType": {
        "description": " Generator seed type descriptor.\n\n Seed values remain distinct from ordinary integers so consumers can apply\n seed-specific input and API-documentation behavior, random generation, and\n per-output offsets for multi-output generation.\n",
        "type": "object",
        "properties": {
          "default": {
            "nullable": true,
            "description": " Default used for an omitted, non-required input.\n\n If absent, the invocation service generates a seed that satisfies\n `constraints`. No seed is generated for an omitted required input because\n required-input presence is checked first.\n",
            "type": "integer",
            "format": "int64"
          },
          "constraints": {
            "$ref": "#/components/schemas/dezgo.app.v2.SeedConstraints"
          }
        },
        "required": [
          "constraints"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.TextConstraints": {
        "description": " Constraints enforced for text values.\n",
        "type": "object",
        "properties": {
          "length": {
            "$ref": "#/components/schemas/dezgo.app.v2.TextLengthConstraints"
          }
        },
        "required": [
          "length"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.TextLengthConstraints": {
        "description": " A constraint on string length.\n",
        "type": "object",
        "properties": {
          "min": {
            "nullable": true,
            "description": " Minimum accepted string length, in UTF-16 code units for C# compatibility.\n If absent, there is no lower bound.\n",
            "type": "integer",
            "format": "int32"
          },
          "max": {
            "nullable": true,
            "description": " Maximum accepted string length, in UTF-16 code units for C# compatibility.\n If absent, there is no upper bound.\n",
            "type": "integer",
            "format": "int32"
          },
          "auto_fix": {
            "description": " Whether the string may be padded or truncated instead of rejected.\n",
            "type": "boolean"
          }
        },
        "required": [
          "auto_fix"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.TextType": {
        "description": " Text type descriptor.\n",
        "type": "object",
        "properties": {
          "default": {
            "nullable": true,
            "description": " Default used for an omitted, non-required input. If absent, the input\n remains absent.\n",
            "type": "string"
          },
          "constraints": {
            "$ref": "#/components/schemas/dezgo.app.v2.TextConstraints"
          },
          "view": {
            "$ref": "#/components/schemas/dezgo.app.v2.TextView"
          }
        },
        "required": [
          "constraints",
          "view"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.TextView": {
        "description": " View metadata for text values.\n",
        "type": "object",
        "properties": {
          "multiline": {
            "description": " Whether the string should be presented and edited as multiline text.\n\n This does not change whether newline characters are accepted. This\n represents the legacy C# `StringMultiline` type without creating a\n separate `TypeInfo` variant.\n",
            "type": "boolean"
          },
          "initial": {
            "nullable": true,
            "description": " Value used by presentation clients when initializing a new text editor.\n\n When absent, clients initialize the editor from the effective text\n default. Presence is significant: an empty string requests an empty\n editor. Explicitly supplied or restored values take precedence.\n\n This is a presentation hint only and does not alter the default applied\n when an optional input is omitted.\n",
            "type": "string"
          }
        },
        "required": [
          "multiline"
        ],
        "additionalProperties": false
      },
      "dezgo.app.v2.TypeInfo": {
        "allOf": [
          {
            "description": " Describes the resolved type-specific behavior of one app input.\n\n Consumers select one `kind`; its concrete message contains the input's\n default, validation constraints, and view metadata.\n\n Defaults are runtime input semantics. They apply only to omitted,\n non-required inputs and never satisfy `AppInput.required`.\n\n `constraints` fields define server-enforced acceptance and any explicitly\n permitted normalization. `view` fields are presentation hints only and must\n not affect parsing, normalization, validation, pricing, or authorization.\n\n Enumeration options combine both concerns because their IDs define the\n accepted value set and their order defines stable presentation order.\n Validators use only `EnumerationOption.id`; metadata in\n `EnumerationOption.view` never changes whether an ID is accepted.\n",
            "type": "object",
            "additionalProperties": false
          },
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "integer": {
                    "$ref": "#/components/schemas/dezgo.app.v2.IntegerType"
                  }
                },
                "required": [
                  "integer"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "floating": {
                    "$ref": "#/components/schemas/dezgo.app.v2.FloatingType"
                  }
                },
                "required": [
                  "floating"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "boolean": {
                    "$ref": "#/components/schemas/dezgo.app.v2.BooleanType"
                  }
                },
                "required": [
                  "boolean"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "image": {
                    "$ref": "#/components/schemas/dezgo.app.v2.ImageType"
                  }
                },
                "required": [
                  "image"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "text": {
                    "$ref": "#/components/schemas/dezgo.app.v2.TextType"
                  }
                },
                "required": [
                  "text"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "enumeration": {
                    "$ref": "#/components/schemas/dezgo.app.v2.EnumerationType"
                  }
                },
                "required": [
                  "enumeration"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "seed": {
                    "$ref": "#/components/schemas/dezgo.app.v2.SeedType"
                  }
                },
                "required": [
                  "seed"
                ]
              }
            ]
          }
        ]
      },
      "dezgo.info.v2.InfoGetResponse": {
        "description": " Platform information such as version metadata.\n",
        "type": "object",
        "properties": {
          "version": {
            "description": " Server version identifier.\n",
            "type": "string"
          }
        },
        "required": [
          "version"
        ],
        "additionalProperties": false
      },
      "dezgo.info.v2.InfoNewsResponse": {
        "description": " Response containing the current ordered collection of news banners.\n",
        "type": "object",
        "properties": {
          "banners": {
            "description": " Banners to display, in presentation order.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.info.v2.NewsBanner"
            }
          }
        },
        "required": [
          "banners"
        ],
        "additionalProperties": false
      },
      "dezgo.info.v2.InfoStatsResponse": {
        "description": " Snapshot of platform statistics.\n",
        "type": "object",
        "properties": {
          "time": {
            "description": " When the stats were last refreshed\n",
            "type": "string",
            "format": "date-time"
          },
          "counts": {
            "$ref": "#/components/schemas/dezgo.info.v2.PlatformCounts"
          }
        },
        "required": [
          "time",
          "counts"
        ],
        "additionalProperties": false
      },
      "dezgo.info.v2.NewsBanner": {
        "description": " A dismissible news banner rendered as HTML by the server.\n",
        "type": "object",
        "properties": {
          "banner_id": {
            "description": " Stable identifier used by clients to remember that the banner was dismissed.\n",
            "type": "string"
          },
          "body_html": {
            "description": " Trusted HTML fragment supplied by the server from built-in news records.\n Must remain simple and unstyled, exactly as a Markdown renderer would generate.\n",
            "type": "string"
          },
          "severity": {
            "$ref": "#/components/schemas/dezgo.info.v2.Severity.Kind"
          }
        },
        "required": [
          "banner_id",
          "body_html",
          "severity"
        ],
        "additionalProperties": false
      },
      "dezgo.info.v2.PlatformCounts": {
        "description": " Aggregated platform counters.\n",
        "type": "object",
        "properties": {
          "jobs": {
            "nullable": true,
            "description": " Total number of jobs processed since the platform's creation.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "dezgo.info.v2.Severity": {
        "description": " Visual importance assigned to user-facing content.\n",
        "type": "object",
        "additionalProperties": false
      },
      "dezgo.info.v2.Severity.Kind": {
        "description": " Supported levels of visual importance.\n",
        "x-enum-descriptions": [
          " A neutral presentation.\n",
          " An informational presentation.\n",
          " A presentation reporting a successful or restored state.\n",
          " A presentation warning about a condition that may require attention.\n",
          " A presentation reporting an error or service disruption.\n",
          " The server did not specify a severity. Consumers should treat this as informational.\n"
        ],
        "type": "string",
        "enum": [
          "NORMAL",
          "INFO",
          "SUCCESS",
          "WARNING",
          "ERROR",
          "UNSPECIFIED"
        ]
      },
      "dezgo.pricing.v2.Op": {
        "allOf": [
          {
            "description": " A pricing operation evaluated against input parameters.\n\n Every operation returns `Option<Amount>`:\n - `Some(amount)` when the operation successfully produces a price.\n - `None` when the operation cannot produce a price.\n\n Amounts are represented as decimal strings and evaluated with an exact\n decimal type by implementations.\n\n Unless stated otherwise, pricing operations that read numeric input values\n accept either JSON numbers or numeric strings.\n This is intentional because real request payloads often stringify numeric\n form fields or query-derived values before they reach pricing evaluation.\n\n Design intent:\n - Keep protobuf-native operations focused on business-level pricing concepts\n   such as branching and per-unit billing.\n - Keep the active public op surface constrained to documented protobuf-native\n   operations rather than a general-purpose expression language.\n - Pricing descriptors should be easy to read, follow, and understand when rendered as textproto\n\n Conditional branching semantics:\n - Guard-style conditionals such as `if_true` and `if_compare` return zero\n   when their condition does not match.\n - Dispatch-style conditionals such as `table` and `match` evaluate their\n   `default` branch when nothing matches, or return `None` if no default is set.\n\n Compatibility policy:\n - Once an `Op` variant is used in production, its field number, message shape,\n   and runtime behavior are immutable.\n - New pricing behavior must be introduced through a new `Op` variant, not by\n   changing an existing one and not by adding new behavior-driving fields to an\n   existing one.\n - Older engines ignore unknown fields on known variants, so changing behavior\n   that way can silently misprice requests.\n - Older engines that do not know a newer `Op` variant will fail when\n   evaluation reaches that unsupported op.\n",
            "type": "object",
            "additionalProperties": false
          },
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "price": {
                    "type": "string"
                  }
                },
                "required": [
                  "price"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "table": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.Table"
                  }
                },
                "required": [
                  "table"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "per_param": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.PerParam"
                  }
                },
                "required": [
                  "per_param"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "per_char": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.PerChar"
                  }
                },
                "required": [
                  "per_char"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "per_numbered_field": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.PerNumberedField"
                  }
                },
                "required": [
                  "per_numbered_field"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "match": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.Match"
                  }
                },
                "required": [
                  "match"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "add": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.Add"
                  }
                },
                "required": [
                  "add"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "mul": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.Mul"
                  }
                },
                "required": [
                  "mul"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "get_int": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.GetInt"
                  }
                },
                "required": [
                  "get_int"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "if_true": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.IfTrue"
                  }
                },
                "required": [
                  "if_true"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "if_compare": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.IfCompare"
                  }
                },
                "required": [
                  "if_compare"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "pixel_step_cost": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.PixelStepCost"
                  }
                },
                "required": [
                  "pixel_step_cost"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "pixel_unit_cost": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.PixelUnitCost"
                  }
                },
                "required": [
                  "pixel_unit_cost"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "linear_step_cost": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.LinearStepCost"
                  }
                },
                "required": [
                  "linear_step_cost"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "pixel_bucket_cost": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.PixelBucketCost"
                  }
                },
                "required": [
                  "pixel_bucket_cost"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "pixel_scaled_step_cost": {
                    "$ref": "#/components/schemas/dezgo.pricing.v2.Op.PixelScaledStepCost"
                  }
                },
                "required": [
                  "pixel_scaled_step_cost"
                ]
              }
            ]
          }
        ]
      },
      "dezgo.pricing.v2.Op.Add": {
        "description": " Adds the results of all child operations.\n\n Returns null when any child returns null.\n",
        "type": "object",
        "properties": {
          "ops": {
            "description": " Child operations to evaluate and sum.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.pricing.v2.Op"
            }
          }
        },
        "required": [
          "ops"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.Compare": {
        "type": "string",
        "enum": [
          "EQUAL",
          "DIFFERENT",
          "LESS",
          "LESS_EQUAL",
          "GREATER",
          "GREATER_EQUAL",
          "UNSPECIFIED"
        ]
      },
      "dezgo.pricing.v2.Op.GetInt": {
        "description": " Reads an integer-like input value.\n\n Returns null when the input is missing and no default is configured, or\n when the value cannot be interpreted as an integer.\n\n JSON numbers and numeric strings are accepted from input values.\n Numeric values are truncated toward zero.\n",
        "type": "object",
        "properties": {
          "path": {
            "description": " Input path to read.\n",
            "type": "string"
          },
          "default": {
            "nullable": true,
            "description": " Optional fallback used when the input path is missing.\n",
            "type": "integer",
            "format": "int64"
          }
        },
        "required": [
          "path"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.IfCompare": {
        "description": " Evaluates a nested operation when an input value matches a comparison.\n\n Missing input is treated like a non-match.\n Returns zero when the comparison does not match or the input is missing.\n Returns null when the input exists but cannot be compared to `value`.\n A matching branch with no nested op is an invalid descriptor error.\n\n Equality comparisons use exact JSON-value equality.\n Ordered comparisons (`LESS`, `LESS_EQUAL`, `GREATER`, `GREATER_EQUAL`)\n require both sides to be JSON numbers or numeric strings.\n",
        "type": "object",
        "properties": {
          "path": {
            "description": " Parameter value to inspect.\n",
            "type": "string"
          },
          "value": {
            "description": " Value to compare the input against.\n"
          },
          "compare": {
            "$ref": "#/components/schemas/dezgo.pricing.v2.Op.Compare"
          },
          "op": {
            "$ref": "#/components/schemas/dezgo.pricing.v2.Op"
          }
        },
        "required": [
          "path",
          "value",
          "compare",
          "op"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.IfTrue": {
        "description": " Evaluates a nested operation when the input boolean is true.\n\n Missing input is treated like `false`.\n Returns zero when the input is false or missing.\n Returns null only when the input exists but is not a boolean.\n A selected branch with no nested op is an invalid descriptor error.\n",
        "type": "object",
        "properties": {
          "path": {
            "description": " Parameter value to inspect.\n",
            "type": "string"
          },
          "op": {
            "$ref": "#/components/schemas/dezgo.pricing.v2.Op"
          }
        },
        "required": [
          "path",
          "op"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.ImageDimensions": {
        "description": " Candidate input paths for reading image dimensions.\n\n Pixel pricing operations that support repeated dimension candidates use\n the first entry where both width and height can be resolved.\n Dimension values must be integer-valued JSON numbers or numeric strings.\n",
        "type": "object",
        "properties": {
          "width_path": {
            "description": " Input path containing the image width.\n",
            "type": "string"
          },
          "height_path": {
            "description": " Input path containing the image height.\n",
            "type": "string"
          }
        },
        "required": [
          "width_path",
          "height_path"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.LinearStepCost": {
        "description": " Prices a request from a linear step-count formula.\n\n The operation reads a step count and computes:\n\n `round(((max(steps, min_steps) * step_price + base_price) * scale) / round_to) * round_to`\n\n Missing step input returns null unless `default_steps` is configured.\n",
        "type": "object",
        "properties": {
          "steps_path": {
            "description": " Input path containing the number of steps.\n",
            "type": "string"
          },
          "default_steps": {
            "nullable": true,
            "description": " Optional fallback used when `steps_path` is missing.\n",
            "type": "integer",
            "format": "int64"
          },
          "min_steps": {
            "description": " Minimum step count to bill for.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "step_price": {
            "description": " Decimal price per billable step.\n",
            "type": "string"
          },
          "base_price": {
            "description": " Decimal base price added after step pricing.\n",
            "type": "string"
          },
          "scale": {
            "description": " Decimal multiplier applied after base and step pricing.\n",
            "type": "string"
          },
          "round_to": {
            "description": " Decimal rounding increment to apply to the final result.\n",
            "type": "string"
          }
        },
        "required": [
          "steps_path",
          "min_steps",
          "step_price",
          "base_price",
          "scale",
          "round_to"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.Match": {
        "description": " Dispatches based on the exact tuple of stringified values found at several input paths.\n\n Each case provides one expected string per configured path, in the same\n order. The first matching case is selected.\n\n Supported input value types are strings, booleans, numbers, and null.\n Values are converted to their string representation before comparison,\n with null represented as the literal string \"null\".\n\n Returns null when any required path is missing, or when no case matches and\n `default` is unset.\n\n A case that does not provide the same number of values as configured paths\n is an invalid descriptor and should be treated as an error.\n A matching case with no nested op is also an invalid descriptor error.\n",
        "type": "object",
        "properties": {
          "paths": {
            "description": " Input paths to inspect, in tuple order.\n",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cases": {
            "description": " Cases to test in order.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.pricing.v2.Op.Match.Case"
            }
          },
          "default": {
            "$ref": "#/components/schemas/dezgo.pricing.v2.Op"
          }
        },
        "required": [
          "paths",
          "cases",
          "default"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.Match.Case": {
        "type": "object",
        "properties": {
          "values": {
            "description": " Exact stringified values to match, one per configured path and in the same order.\n",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "op": {
            "$ref": "#/components/schemas/dezgo.pricing.v2.Op"
          }
        },
        "required": [
          "values",
          "op"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.Mul": {
        "description": " Multiplies the results of all child operations.\n\n Returns null when any child returns null.\n",
        "type": "object",
        "properties": {
          "ops": {
            "description": " Child operations to evaluate and multiply.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.pricing.v2.Op"
            }
          }
        },
        "required": [
          "ops"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.PerChar": {
        "description": " Prices a text value based on its Unicode scalar value count.\n\n Missing input is treated as an empty string.\n Returns null when the path exists but the value is not a string.\n",
        "type": "object",
        "properties": {
          "path": {
            "description": " Parameter containing the text value to measure.\n",
            "type": "string"
          },
          "per_character": {
            "description": " Price per Unicode scalar value.\n",
            "type": "string"
          },
          "char_min": {
            "description": " Minimum number of Unicode scalar values to charge for.\n",
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "char_step": {
            "description": " Billing step, in Unicode scalar values. Defaults to 1.\n",
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        },
        "required": [
          "path",
          "per_character",
          "char_min",
          "char_step"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.PerNumberedField": {
        "description": " Looks for numbered fields with the format `{prefix}{n}{suffix}`.\n\n The result is the configured price multiplied by the number of matching fields\n whose values are meaningfully present.\n\n Null values and empty or whitespace-only strings do not count as present.\n If a required parent path is missing, the result is null.\n",
        "type": "object",
        "properties": {
          "price": {
            "description": " The price per found field.\n",
            "type": "string"
          },
          "prefix": {
            "description": " The prefix before the number.\n",
            "type": "string"
          },
          "suffix": {
            "description": " The suffix after the number.\n",
            "type": "string"
          },
          "path": {
            "description": " The parent parameter under which to look for the numbered fields.\n If not set, looks for the numbered fields at the top level.\n",
            "type": "string"
          }
        },
        "required": [
          "price",
          "prefix",
          "suffix",
          "path"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.PerParam": {
        "description": " Gets the numeric value of a parameter and multiplies it by a factor.\n Returns null if the parameter is missing or not a JSON number or numeric string.\n",
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "factor": {
            "type": "string"
          },
          "from_value": {
            "description": " Only counts the value in excess of this threshold.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        },
        "required": [
          "path",
          "factor",
          "from_value"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.PixelBucketCost": {
        "description": " Prices an image by charging for ceil-rounded pixel buckets.\n\n The operation reads width and height from input paths and computes:\n\n `round((base_price + ceil(max(width * height, min_pixels) / pixels_per_bucket) * bucket_price) / round_to) * round_to * multiplier`\n\n Missing inputs return null.\n",
        "type": "object",
        "properties": {
          "dimensions": {
            "description": " Ordered candidate paths for image dimensions.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.pricing.v2.Op.ImageDimensions"
            }
          },
          "min_pixels": {
            "description": " Minimum pixel count to bill for.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "pixels_per_bucket": {
            "description": " Number of pixels in one billed bucket.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "bucket_price": {
            "description": " Decimal price per billed pixel bucket.\n",
            "type": "string"
          },
          "base_price": {
            "description": " Decimal base price added before rounding.\n",
            "type": "string"
          },
          "round_to": {
            "description": " Decimal rounding increment to apply before `multiplier`.\n",
            "type": "string"
          },
          "multiplier": {
            "description": " Decimal multiplier applied after rounding. Defaults to 1 when empty.\n",
            "type": "string"
          }
        },
        "required": [
          "dimensions",
          "min_pixels",
          "pixels_per_bucket",
          "bucket_price",
          "base_price",
          "round_to",
          "multiplier"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.PixelScaledStepCost": {
        "description": " Prices a request from steps scaled by normalized pixel area.\n\n The operation computes:\n\n `round((base_price + (steps * step_price + step_bonus) * max((width * height) / pixels_per_unit, min_scale)) / round_to) * round_to`\n\n Missing image dimensions return null. Missing steps return null unless\n `default_steps` is configured.\n",
        "type": "object",
        "properties": {
          "dimensions": {
            "description": " Ordered candidate paths for image dimensions.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.pricing.v2.Op.ImageDimensions"
            }
          },
          "steps_path": {
            "description": " Input path containing the number of steps.\n",
            "type": "string"
          },
          "default_steps": {
            "nullable": true,
            "description": " Optional fallback used when `steps_path` is missing.\n",
            "type": "integer",
            "format": "int64"
          },
          "pixels_per_unit": {
            "description": " Number of pixels represented by one scale unit.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "min_scale": {
            "description": " Minimum scale applied to the step price.\n",
            "type": "string"
          },
          "step_price": {
            "description": " Decimal price per step before pixel scaling.\n",
            "type": "string"
          },
          "base_price": {
            "description": " Decimal base price added before rounding.\n",
            "type": "string"
          },
          "round_to": {
            "description": " Decimal rounding increment to apply to the final result.\n",
            "type": "string"
          },
          "step_bonus": {
            "description": " Decimal bonus added to the step component before pixel scaling.\n",
            "type": "string"
          }
        },
        "required": [
          "dimensions",
          "steps_path",
          "pixels_per_unit",
          "min_scale",
          "step_price",
          "base_price",
          "round_to",
          "step_bonus"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.PixelStepCost": {
        "description": " Prices an image from quantized pixel count and step count.\n\n The operation reads width, height, and steps from input paths, rounds each\n dimension down to `dimension_multiple`, clamps the resulting pixel count\n to at least `min_pixels`, then computes:\n\n `max(int(((pixels * pixel_factor) + pixel_offset) * max(steps, min_steps)), min_units) * unit_price`\n\n Missing inputs return null unless `default_steps` is configured for the\n missing steps path.\n",
        "type": "object",
        "properties": {
          "dimensions": {
            "description": " Ordered candidate paths for image dimensions.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.pricing.v2.Op.ImageDimensions"
            }
          },
          "steps_path": {
            "description": " Input path containing the number of steps.\n",
            "type": "string"
          },
          "default_steps": {
            "nullable": true,
            "description": " Optional fallback used when `steps_path` is missing.\n",
            "type": "integer",
            "format": "int64"
          },
          "dimension_multiple": {
            "description": " Rounding increment to apply to each dimension before multiplying them.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "min_pixels": {
            "description": " Minimum pixel count to bill for.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "pixel_factor": {
            "description": " Decimal factor applied to the pixel count.\n",
            "type": "string"
          },
          "pixel_offset": {
            "description": " Decimal offset added after applying `pixel_factor`.\n",
            "type": "string"
          },
          "min_steps": {
            "description": " Minimum step count to bill for.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "min_units": {
            "description": " Minimum integer unit count to bill for after truncation.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "unit_price": {
            "description": " Decimal price per computed unit.\n",
            "type": "string"
          }
        },
        "required": [
          "dimensions",
          "steps_path",
          "dimension_multiple",
          "min_pixels",
          "pixel_factor",
          "pixel_offset",
          "min_steps",
          "min_units",
          "unit_price"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.PixelUnitCost": {
        "description": " Prices an image from pixel count without step scaling.\n\n The operation reads width and height from input paths, clamps the resulting\n pixel count to at least `min_pixels`, then computes:\n\n `max(int(pixels * pixel_factor), min_units) * unit_price`\n\n Missing inputs return null.\n",
        "type": "object",
        "properties": {
          "dimensions": {
            "description": " Ordered candidate paths for image dimensions.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.pricing.v2.Op.ImageDimensions"
            }
          },
          "min_pixels": {
            "description": " Minimum pixel count to bill for.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "pixel_factor": {
            "description": " Decimal factor applied to the pixel count.\n",
            "type": "string"
          },
          "min_units": {
            "description": " Minimum integer unit count to bill for after truncation.\n",
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "unit_price": {
            "description": " Decimal price per computed unit.\n",
            "type": "string"
          }
        },
        "required": [
          "dimensions",
          "min_pixels",
          "pixel_factor",
          "min_units",
          "unit_price"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.Table": {
        "description": " Looks up a parameter value and matches it against a list of cases.\n\n Missing input is treated like \"no case matched\".\n\n Equality comparisons use exact JSON-value equality.\n Ordered comparisons (`LESS`, `LESS_EQUAL`, `GREATER`, `GREATER_EQUAL`)\n require both sides to be JSON numbers or numeric strings.\n A comparison that cannot be performed is treated like a non-match.\n\n The `default` branch is evaluated whenever no case matches, including when\n the inspected path is missing.\n A matching case with no nested op is an invalid descriptor error.\n",
        "type": "object",
        "properties": {
          "path": {
            "description": " The parameter value to inspect.\n",
            "type": "string"
          },
          "cases": {
            "description": " Cases to test against the parameter value, in order.\n The first matching case is evaluated and returned.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.pricing.v2.Op.Table.Case"
            }
          },
          "default": {
            "$ref": "#/components/schemas/dezgo.pricing.v2.Op"
          }
        },
        "required": [
          "path",
          "cases",
          "default"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Op.Table.Case": {
        "description": " A conditional branch in a table lookup.\n",
        "type": "object",
        "properties": {
          "value": {
            "description": " Value to compare the parameter against.\n"
          },
          "compare": {
            "$ref": "#/components/schemas/dezgo.pricing.v2.Op.Compare"
          },
          "op": {
            "$ref": "#/components/schemas/dezgo.pricing.v2.Op"
          }
        },
        "required": [
          "value",
          "compare",
          "op"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.Pricing": {
        "description": " Represents a pricing policy for an application as an ordered list of pricing steps.\n",
        "type": "object",
        "properties": {
          "modules": {
            "description": " All pricing modules that make up this pricing policy, evaluated in order.\n\n Evaluation starts from a running total of `0`.\n\n Each module evaluates its own operation against the input object and then\n applies that result to the running total according to its configured mode.\n This happens strictly in order with no special-casing for the first step,\n so a leading multiplicative module applies `0 * value`.\n\n If any module evaluates to null, the whole total is null.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.pricing.v2.PricingModule"
            }
          }
        },
        "required": [
          "modules"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.PricingModule": {
        "description": " A named top-level pricing step applied to the running total.\n",
        "type": "object",
        "properties": {
          "id": {
            "description": " Non-empty identifier for this module within a Pricing policy.\n Module IDs must be unique within one Pricing descriptor.\n This ID is copied into the ordered pricing breakdown.\n",
            "type": "string"
          },
          "op": {
            "$ref": "#/components/schemas/dezgo.pricing.v2.Op"
          },
          "mode": {
            "$ref": "#/components/schemas/dezgo.pricing.v2.PricingModule.Mode"
          }
        },
        "required": [
          "id",
          "op",
          "mode"
        ],
        "additionalProperties": false
      },
      "dezgo.pricing.v2.PricingModule.Mode": {
        "description": " How this module applies its result to the running total.\n",
        "x-enum-descriptions": [
          " Multiplies the running total by the module result.\n",
          " Adds the module result to the running total.\n\n This is the default mode and can be omitted in descriptors.\n"
        ],
        "type": "string",
        "enum": [
          "MUL",
          "ADD"
        ]
      },
      "dezgo.types.Thumbnail": {
        "description": " Presentation image available in one or more sizes.\n",
        "type": "object",
        "properties": {
          "sources": {
            "description": " Image sources describing the same visual content at different\n resolutions. Consumers should select sources by dimensions; declaration\n order may be used to break ties between otherwise equivalent sources.\n",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dezgo.types.ThumbnailSource"
            }
          }
        },
        "required": [
          "sources"
        ],
        "additionalProperties": false
      },
      "dezgo.types.ThumbnailSource": {
        "description": " One loadable size of a thumbnail.\n",
        "type": "object",
        "properties": {
          "width": {
            "description": " Positive width of this source in pixels.\n",
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "height": {
            "description": " Positive height of this source in pixels.\n",
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "url": {
            "description": " Non-empty absolute URL from which this source can be loaded.\n",
            "type": "string"
          }
        },
        "required": [
          "width",
          "height",
          "url"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "X-Dezgo-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Dezgo-Key",
        "description": "Dezgo API keys allow you to access account related data and run jobs."
      }
    }
  },
  "tags": [
    {
      "name": "App API v2",
      "description": " Exposes Dezgo app catalog metadata.\n"
    },
    {
      "name": "Info API v2",
      "description": " Exposes platform-level information, statistics, and client news for the Dezgo API.\n"
    }
  ],
  "externalDocs": {
    "description": "The official Dezgo API documentation",
    "url": "https://dev.dezgo.com/"
  }
}