{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bookmyhost/json-schema/bookmyhost-new-customer-request-schema.json",
  "title": "NewCustomerRequest",
  "description": "Create a new customer, allocate a budget to them",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bookmyhost-customer-management-api-openapi.yml#/components/schemas/NewCustomerRequest",
  "properties": {
    "budget_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Budget Id"
    },
    "max_budget": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Budget",
      "description": "Requests will fail if this budget (in USD) is exceeded."
    },
    "soft_budget": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Soft Budget",
      "description": "Requests will NOT fail if this is exceeded. Will fire alerting though."
    },
    "max_parallel_requests": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Parallel Requests",
      "description": "Max concurrent requests allowed for this budget id."
    },
    "tpm_limit": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tpm Limit",
      "description": "Max tokens per minute, allowed for this budget id."
    },
    "rpm_limit": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rpm Limit",
      "description": "Max requests per minute, allowed for this budget id."
    },
    "budget_duration": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Budget Duration",
      "description": "Max duration budget should be set for (e.g. '1hr', '1d', '28d')"
    },
    "model_max_budget": {
      "anyOf": [
        {
          "additionalProperties": {
            "$ref": "#/$defs/BudgetConfig"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Max Budget",
      "description": "Max budget for each model (e.g. {'gpt-4o': {'max_budget': '0.0000001', 'budget_duration': '1d', 'tpm_limit': 1000, 'rpm_limit': 1000}})"
    },
    "budget_reset_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Budget Reset At",
      "description": "Datetime when the budget is reset"
    },
    "user_id": {
      "type": "string",
      "title": "User Id"
    },
    "alias": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Alias"
    },
    "blocked": {
      "type": "boolean",
      "title": "Blocked",
      "default": false
    },
    "spend": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Spend"
    },
    "allowed_model_region": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "eu",
            "us"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Allowed Model Region"
    },
    "default_model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Default Model"
    },
    "object_permission": {
      "anyOf": [
        {
          "$ref": "#/$defs/LiteLLM_ObjectPermissionBase"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "user_id"
  ],
  "$defs": {
    "BudgetConfig": {
      "properties": {
        "max_budget": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Budget"
        },
        "budget_duration": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Budget Duration"
        },
        "tpm_limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tpm Limit"
        },
        "rpm_limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rpm Limit"
        }
      },
      "type": "object",
      "title": "BudgetConfig"
    },
    "LiteLLM_ObjectPermissionBase": {
      "properties": {
        "mcp_servers": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mcp Servers"
        },
        "mcp_access_groups": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mcp Access Groups"
        },
        "mcp_tool_permissions": {
          "anyOf": [
            {
              "additionalProperties": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mcp Tool Permissions"
        },
        "mcp_toolsets": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mcp Toolsets"
        },
        "blocked_tools": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Blocked Tools"
        },
        "vector_stores": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Vector Stores"
        },
        "agents": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Agents"
        },
        "agent_access_groups": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Agent Access Groups"
        },
        "models": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Models"
        },
        "search_tools": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Search Tools"
        },
        "mcp_tool_search_enabled": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mcp Tool Search Enabled"
        }
      },
      "type": "object",
      "title": "LiteLLM_ObjectPermissionBase"
    }
  }
}