{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bookmyhost/json-schema/bookmyhost-lite-llm-organization-membership-table-schema.json",
  "title": "LiteLLM_OrganizationMembershipTable",
  "description": "Tracks which organizations a user belongs to and their spend within it.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bookmyhost-organization-management-api-openapi.yml#/components/schemas/LiteLLM_OrganizationMembershipTable",
  "properties": {
    "user_id": {
      "type": "string",
      "title": "User Id"
    },
    "organization_id": {
      "type": "string",
      "title": "Organization Id"
    },
    "user_role": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "User Role"
    },
    "spend": {
      "type": "number",
      "title": "Spend",
      "default": 0.0
    },
    "budget_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Budget Id"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "user": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ],
      "title": "User"
    },
    "litellm_budget_table": {
      "anyOf": [
        {
          "$ref": "#/$defs/LiteLLM_BudgetTable"
        },
        {
          "type": "null"
        }
      ]
    },
    "user_email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "User Email"
    }
  },
  "type": "object",
  "required": [
    "user_id",
    "organization_id",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "LiteLLM_BudgetTable": {
      "properties": {
        "budget_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Budget Id"
        },
        "soft_budget": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Soft Budget"
        },
        "max_budget": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Budget"
        },
        "max_parallel_requests": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Parallel Requests"
        },
        "tpm_limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tpm Limit"
        },
        "rpm_limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rpm Limit"
        },
        "model_max_budget": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model Max Budget"
        },
        "budget_duration": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Budget Duration"
        },
        "allowed_models": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Allowed Models"
        }
      },
      "type": "object",
      "title": "LiteLLM_BudgetTable",
      "description": "Represents user-controllable params for a LiteLLM_BudgetTable record.\n\nBudget-write paths use `model_fields.keys()` on this class as an allowlist\nfor user input. Keep server-managed fields (e.g. `budget_reset_at`) on\n`LiteLLM_BudgetTableFull` so they aren't user-settable."
    }
  }
}