{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beatra-ai/json-schema/beatra-ai-capability-detail-schema.json",
  "title": "CapabilityDetail",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beatra-ai-catalog-api-openapi.yml#/components/schemas/CapabilityDetail",
  "properties": {
    "capability": {
      "type": "string",
      "enum": [
        "text_to_image",
        "image_to_image",
        "image_edit"
      ],
      "title": "Capability"
    },
    "endpoint": {
      "type": "string",
      "title": "Endpoint"
    },
    "input_modality": {
      "type": "string",
      "title": "Input Modality"
    },
    "output_modality": {
      "type": "string",
      "const": "image",
      "title": "Output Modality",
      "default": "image"
    },
    "execution_mode": {
      "type": "string",
      "const": "async",
      "title": "Execution Mode",
      "default": "async"
    },
    "description": {
      "type": "string",
      "title": "Description"
    },
    "status": {
      "type": "string",
      "enum": [
        "available",
        "unavailable"
      ],
      "title": "Status",
      "default": "available"
    },
    "auto": {
      "$ref": "#/$defs/ImageAutoSelectionCard"
    },
    "models": {
      "items": {
        "$ref": "#/$defs/ImageInterfaceCard"
      },
      "type": "array",
      "title": "Models"
    },
    "max_output_images": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 4.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Output Images"
    },
    "max_canvas_pixels": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Canvas Pixels"
    },
    "starting_credits": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Starting Credits"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "capability",
    "endpoint",
    "input_modality",
    "description",
    "auto",
    "models"
  ],
  "$defs": {
    "ImageAspectRange": {
      "properties": {
        "minimum": {
          "type": "string",
          "title": "Minimum"
        },
        "maximum": {
          "type": "string",
          "title": "Maximum"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "minimum",
        "maximum"
      ],
      "title": "ImageAspectRange"
    },
    "ImageAutoSelectionCard": {
      "properties": {
        "default_model": {
          "type": "string",
          "const": "auto",
          "title": "Default Model",
          "default": "auto"
        },
        "basic_request_preference": {
          "type": "string",
          "title": "Basic Request Preference"
        },
        "request_dependent": {
          "type": "boolean",
          "const": true,
          "title": "Request Dependent",
          "default": true
        },
        "persisted_selection_field": {
          "type": "string",
          "const": "resolved_model",
          "title": "Persisted Selection Field",
          "default": "resolved_model"
        },
        "description": {
          "type": "string",
          "title": "Description"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "basic_request_preference",
        "description"
      ],
      "title": "ImageAutoSelectionCard"
    },
    "ImageCanvasCard": {
      "properties": {
        "default": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "title": "Default"
        },
        "preset_tiers": {
          "items": {
            "type": "string",
            "enum": [
              "1K",
              "2K",
              "4K"
            ]
          },
          "type": "array",
          "title": "Preset Tiers"
        },
        "target": {
          "$ref": "#/$defs/ImageTargetCanvasCard"
        },
        "source_aspect_anchor": {
          "type": "string",
          "enum": [
            "none",
            "first_input",
            "last_input"
          ],
          "title": "Source Aspect Anchor"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "default",
        "preset_tiers",
        "target",
        "source_aspect_anchor"
      ],
      "title": "ImageCanvasCard"
    },
    "ImageControlCard": {
      "properties": {
        "field": {
          "type": "string",
          "title": "Field"
        },
        "value_type": {
          "type": "string",
          "enum": [
            "string",
            "integer",
            "boolean",
            "enum",
            "canvas",
            "image_collection",
            "palette",
            "region_collection"
          ],
          "title": "Value Type"
        },
        "required": {
          "type": "boolean",
          "title": "Required"
        },
        "nullable": {
          "type": "boolean",
          "title": "Nullable"
        },
        "default": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "boolean"
            },
            {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Default"
        },
        "model_default": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model Default"
        },
        "omitted_behavior": {
          "type": "string",
          "enum": [
            "invalid",
            "use_public_default",
            "use_model_default",
            "same_as_omitted",
            "random"
          ],
          "title": "Omitted Behavior"
        },
        "null_behavior": {
          "type": "string",
          "enum": [
            "invalid",
            "same_as_omitted",
            "use_model_default"
          ],
          "title": "Null Behavior"
        },
        "allowed_values": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Allowed Values"
        },
        "minimum": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Minimum"
        },
        "maximum": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Maximum"
        },
        "min_items": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Min Items"
        },
        "max_items": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Items"
        },
        "max_length": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Length"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "field",
        "value_type",
        "required",
        "nullable",
        "default",
        "omitted_behavior",
        "null_behavior"
      ],
      "title": "ImageControlCard",
      "description": "One public request field and its stable omission/null semantics."
    },
    "ImageInputHardConstraints": {
      "properties": {
        "max_bytes": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Bytes"
        },
        "edge_pixels": {
          "anyOf": [
            {
              "$ref": "#/$defs/ImageIntegerRange"
            },
            {
              "type": "null"
            }
          ]
        },
        "aspect_ratio": {
          "anyOf": [
            {
              "$ref": "#/$defs/ImageAspectRange"
            },
            {
              "type": "null"
            }
          ]
        },
        "alpha": {
          "type": "string",
          "enum": [
            "allowed",
            "reject_png_alpha"
          ],
          "title": "Alpha"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "max_bytes",
        "edge_pixels",
        "aspect_ratio",
        "alpha"
      ],
      "title": "ImageInputHardConstraints"
    },
    "ImageInputRecommendations": {
      "properties": {
        "edge_pixels": {
          "anyOf": [
            {
              "$ref": "#/$defs/ImageIntegerRange"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "edge_pixels"
      ],
      "title": "ImageInputRecommendations"
    },
    "ImageInputTransportCard": {
      "properties": {
        "accepted_kinds": {
          "items": {
            "type": "string",
            "enum": [
              "artifact",
              "data_uri",
              "https_url"
            ]
          },
          "type": "array",
          "title": "Accepted Kinds"
        },
        "https_only": {
          "type": "boolean",
          "title": "Https Only"
        },
        "data_uri_max_encoded_length": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Data Uri Max Encoded Length"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "accepted_kinds",
        "https_only",
        "data_uri_max_encoded_length"
      ],
      "title": "ImageInputTransportCard"
    },
    "ImageInputsCard": {
      "properties": {
        "minimum_count": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Minimum Count"
        },
        "public_max_count": {
          "type": "integer",
          "maximum": 4.0,
          "minimum": 0.0,
          "title": "Public Max Count"
        },
        "native_max_count": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Native Max Count"
        },
        "formats": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Formats"
        },
        "hard_constraints": {
          "$ref": "#/$defs/ImageInputHardConstraints"
        },
        "recommendations": {
          "$ref": "#/$defs/ImageInputRecommendations"
        },
        "animation": {
          "additionalProperties": {
            "type": "string",
            "enum": [
              "as_provided",
              "first_frame"
            ]
          },
          "type": "object",
          "title": "Animation"
        },
        "transport": {
          "$ref": "#/$defs/ImageInputTransportCard"
        },
        "ordering": {
          "type": "string",
          "enum": [
            "none",
            "ordered_references",
            "first_is_base_remaining_are_references"
          ],
          "title": "Ordering"
        },
        "source_aspect_anchor": {
          "type": "string",
          "enum": [
            "none",
            "first_input",
            "last_input"
          ],
          "title": "Source Aspect Anchor"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "minimum_count",
        "public_max_count",
        "native_max_count",
        "formats",
        "hard_constraints",
        "recommendations",
        "animation",
        "transport",
        "ordering",
        "source_aspect_anchor"
      ],
      "title": "ImageInputsCard"
    },
    "ImageIntegerRange": {
      "properties": {
        "minimum": {
          "type": "integer",
          "title": "Minimum"
        },
        "maximum": {
          "type": "integer",
          "title": "Maximum"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "minimum",
        "maximum"
      ],
      "title": "ImageIntegerRange"
    },
    "ImageInterfaceCard": {
      "properties": {
        "model": {
          "type": "string",
          "title": "Model"
        },
        "display_name": {
          "type": "string",
          "title": "Display Name"
        },
        "owned_by": {
          "type": "string",
          "const": "beatra",
          "title": "Owned By",
          "default": "beatra"
        },
        "capability": {
          "type": "string",
          "enum": [
            "text_to_image",
            "image_to_image",
            "image_edit"
          ],
          "title": "Capability"
        },
        "status": {
          "type": "string",
          "const": "available",
          "title": "Status",
          "default": "available"
        },
        "controls": {
          "items": {
            "$ref": "#/$defs/ImageControlCard"
          },
          "type": "array",
          "title": "Controls"
        },
        "prompt": {
          "$ref": "#/$defs/ImagePromptCard"
        },
        "inputs": {
          "$ref": "#/$defs/ImageInputsCard"
        },
        "outputs": {
          "$ref": "#/$defs/ImageOutputsCard"
        },
        "canvas": {
          "$ref": "#/$defs/ImageCanvasCard"
        },
        "rules": {
          "items": {
            "$ref": "#/$defs/ImageInterfaceRule"
          },
          "type": "array",
          "title": "Rules"
        },
        "pricing": {
          "$ref": "#/$defs/ImagePricingCard"
        },
        "auto": {
          "$ref": "#/$defs/ImageAutoSelectionCard"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "model",
        "display_name",
        "capability",
        "controls",
        "prompt",
        "inputs",
        "outputs",
        "canvas",
        "rules",
        "pricing",
        "auto"
      ],
      "title": "ImageInterfaceCard",
      "description": "Canonical image discovery record shared by REST, MCP and Console."
    },
    "ImageInterfaceRule": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "when": {
          "items": {
            "$ref": "#/$defs/ImageRulePredicate"
          },
          "type": "array",
          "title": "When"
        },
        "effect": {
          "$ref": "#/$defs/ImageRuleEffect"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "when",
        "effect"
      ],
      "title": "ImageInterfaceRule"
    },
    "ImageOutputsCard": {
      "properties": {
        "public_max_count": {
          "type": "integer",
          "maximum": 4.0,
          "minimum": 1.0,
          "title": "Public Max Count"
        },
        "native_max_independent_count": {
          "type": "integer",
          "minimum": 1.0,
          "title": "Native Max Independent Count"
        },
        "native_max_sequence_count": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Native Max Sequence Count"
        },
        "relationships": {
          "items": {
            "type": "string",
            "enum": [
              "independent",
              "sequence"
            ]
          },
          "type": "array",
          "title": "Relationships"
        },
        "format": {
          "type": "string",
          "const": "image/png",
          "title": "Format",
          "default": "image/png"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "public_max_count",
        "native_max_independent_count",
        "relationships"
      ],
      "title": "ImageOutputsCard"
    },
    "ImagePriceOptionCard": {
      "properties": {
        "dimensions": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "title": "Dimensions"
        },
        "unit_credits": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Unit Credits"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "dimensions",
        "unit_credits"
      ],
      "title": "ImagePriceOptionCard"
    },
    "ImagePricingCard": {
      "properties": {
        "meter": {
          "type": "string",
          "const": "image_count",
          "title": "Meter",
          "default": "image_count"
        },
        "unit": {
          "type": "string",
          "const": "image",
          "title": "Unit",
          "default": "image"
        },
        "billing_basis": {
          "type": "string",
          "const": "successful_image_count",
          "title": "Billing Basis",
          "default": "successful_image_count"
        },
        "estimate_formula": {
          "type": "string",
          "const": "unit_credits * successful_image_count",
          "title": "Estimate Formula",
          "default": "unit_credits * successful_image_count"
        },
        "options": {
          "items": {
            "$ref": "#/$defs/ImagePriceOptionCard"
          },
          "type": "array",
          "minItems": 1,
          "title": "Options"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "options"
      ],
      "title": "ImagePricingCard"
    },
    "ImagePromptCard": {
      "properties": {
        "limit": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "title": "Limit"
        },
        "unit": {
          "type": "string",
          "enum": [
            "characters",
            "qwen_tokens"
          ],
          "title": "Unit"
        },
        "overflow": {
          "type": "string",
          "const": "reject",
          "title": "Overflow",
          "default": "reject"
        },
        "languages": {
          "items": {
            "type": "string",
            "enum": [
              "en",
              "zh"
            ]
          },
          "type": "array",
          "title": "Languages"
        },
        "counter": {
          "type": "string",
          "enum": [
            "unicode_characters",
            "qwen_open_family_proxy"
          ],
          "title": "Counter"
        },
        "counter_is_exact": {
          "type": "boolean",
          "title": "Counter Is Exact"
        },
        "counter_unavailable_behavior": {
          "type": "string",
          "const": "reject",
          "title": "Counter Unavailable Behavior",
          "default": "reject"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "limit",
        "unit",
        "languages",
        "counter",
        "counter_is_exact"
      ],
      "title": "ImagePromptCard"
    },
    "ImageRuleEffect": {
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "allow",
            "forbid",
            "limit",
            "require"
          ],
          "title": "Type"
        },
        "field": {
          "type": "string",
          "title": "Field"
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "boolean"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "type",
        "field"
      ],
      "title": "ImageRuleEffect"
    },
    "ImageRulePredicate": {
      "properties": {
        "field": {
          "type": "string",
          "title": "Field"
        },
        "operator": {
          "type": "string",
          "enum": [
            "equals",
            "present",
            "greater_than"
          ],
          "title": "Operator"
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            },
            {
              "type": "boolean"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "field",
        "operator"
      ],
      "title": "ImageRulePredicate"
    },
    "ImageTargetCanvasCard": {
      "properties": {
        "supported": {
          "type": "boolean",
          "title": "Supported"
        },
        "minimum_total_pixels": {
          "type": "integer",
          "title": "Minimum Total Pixels"
        },
        "maximum_total_pixels": {
          "type": "integer",
          "title": "Maximum Total Pixels"
        },
        "minimum_aspect_ratio": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Minimum Aspect Ratio"
        },
        "maximum_aspect_ratio": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Maximum Aspect Ratio"
        },
        "normalization_multiple": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Normalization Multiple"
        },
        "actual_dimensions_may_differ": {
          "type": "boolean",
          "title": "Actual Dimensions May Differ"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "supported",
        "minimum_total_pixels",
        "maximum_total_pixels",
        "minimum_aspect_ratio",
        "maximum_aspect_ratio",
        "normalization_multiple",
        "actual_dimensions_may_differ"
      ],
      "title": "ImageTargetCanvasCard"
    }
  }
}