{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hud-ai/json-schema/hud-ai-model-response-schema.json",
  "title": "ModelResponse",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hud-ai-openapi.yml#/components/schemas/ModelResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "model_name": {
      "type": "string",
      "title": "Model Name"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "provider": {
      "anyOf": [
        {
          "$ref": "#/$defs/ProviderResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "routes": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Routes",
      "default": []
    },
    "is_beta": {
      "type": "boolean",
      "title": "Is Beta",
      "default": false
    },
    "hidden": {
      "type": "boolean",
      "title": "Hidden",
      "default": false
    },
    "is_trainable": {
      "type": "boolean",
      "title": "Is Trainable",
      "default": false
    },
    "public": {
      "type": "boolean",
      "title": "Public",
      "default": true
    },
    "checkpoint_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Checkpoint Count"
    },
    "inference_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Inference Count",
      "description": "Lifetime platform-wide inference-call count. Null for signed-out callers."
    },
    "fork_of_model_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fork Of Model Id"
    },
    "fork_of_model_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fork Of Model Name"
    },
    "context_window": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Context Window"
    },
    "sdk_agent_type": {
      "type": "string",
      "title": "Sdk Agent Type"
    },
    "input_cost_per_token": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Input Cost Per Token"
    },
    "output_cost_per_token": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output Cost Per Token"
    },
    "pricing_config": {
      "additionalProperties": true,
      "type": "object",
      "title": "Pricing Config",
      "default": {}
    },
    "request_defaults": {
      "additionalProperties": true,
      "type": "object",
      "title": "Request Defaults",
      "default": {}
    },
    "metadata": {
      "additionalProperties": true,
      "type": "object",
      "title": "Metadata",
      "default": {}
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "released_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Released At",
      "description": "Vendor-published release time. Null until an admin sets it; not catalog insert time."
    },
    "deprecated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deprecated At",
      "description": "Vendor retirement time. Null = not deprecated. A future value announces the date; once it passes, the gateway rejects requests for the model."
    },
    "deprecation_message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deprecation Message",
      "description": "Operator-set deprecation notice shown in the UI and returned on rejected requests."
    },
    "can_edit": {
      "type": "boolean",
      "title": "Can Edit",
      "default": false
    },
    "capacity": {
      "anyOf": [
        {
          "$ref": "#/$defs/ModelCapacity"
        },
        {
          "type": "null"
        }
      ],
      "description": "Hosted rollout capacity, on serving global models in signed-in list responses. Null otherwise, or while no scheduler pass has run recently."
    }
  },
  "type": "object",
  "required": [
    "id",
    "model_name",
    "sdk_agent_type",
    "created_at"
  ],
  "$defs": {
    "ModelCapacity": {
      "properties": {
        "paused": {
          "type": "boolean",
          "title": "Paused",
          "description": "No new hosted rollouts start on the model."
        },
        "current_rollouts": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Current Rollouts",
          "description": "Hosted rollouts currently holding this model group's pooled capacity."
        },
        "effective_max_rollouts": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Effective Max Rollouts",
          "description": "Current rollouts plus the additional pooled rollouts the last scheduler pass allowed after model, provider, and quota gates. Null when that pass did not plan the group because it had no queued or scheduler-launched rollouts."
        },
        "utilization": {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Utilization",
          "description": "Current rollouts divided by effective max rollouts; 0 with none running."
        }
      },
      "type": "object",
      "required": [
        "paused",
        "current_rollouts",
        "effective_max_rollouts",
        "utilization"
      ],
      "title": "ModelCapacity",
      "description": "Hosted rollout capacity of a catalog model's scheduler group, from the last pass.\n\nModels in one scheduler group report the same values."
    },
    "ProviderResponse": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "api_base": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Api Base"
        },
        "supported_routes": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Supported Routes",
          "default": []
        },
        "icon_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Icon Url"
        },
        "metadata": {
          "additionalProperties": true,
          "type": "object",
          "title": "Metadata",
          "default": {}
        }
      },
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "title": "ProviderResponse"
    }
  }
}