Skip to content
HALOWERK

Researchwerk

study randomization block balance

Return per-block allocation deviations from supplied target arm ratios.

POST https://research.halowerk.com/v1/study-randomization-block-balance

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
ratiosarrayYes
blocksarrayYes
Show full input schema
{
  "type": "object",
  "properties": {
    "ratios": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "arm": {
            "type": "string",
            "maxLength": 48,
            "minLength": 1
          },
          "weight": {
            "type": "number",
            "minimum": 1e-06,
            "maximum": 1000000000
          }
        },
        "required": [
          "arm",
          "weight"
        ],
        "additionalProperties": false
      },
      "maxItems": 20,
      "minItems": 1
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 48,
            "minLength": 1
          },
          "counts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "arm": {
                  "type": "string",
                  "maxLength": 48,
                  "minLength": 1
                },
                "n": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000000
                }
              },
              "required": [
                "arm",
                "n"
              ],
              "additionalProperties": false
            },
            "maxItems": 20,
            "minItems": 0
          }
        },
        "required": [
          "id",
          "counts"
        ],
        "additionalProperties": false
      },
      "maxItems": 100,
      "minItems": 1
    }
  },
  "required": [
    "ratios",
    "blocks"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "ratios": [
    {
      "arm": "A",
      "weight": 1
    },
    {
      "arm": "B",
      "weight": 1
    }
  ],
  "blocks": [
    {
      "id": "block_01",
      "counts": [
        {
          "arm": "A",
          "n": 8
        },
        {
          "arm": "B",
          "n": 2
        }
      ]
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-18 UTC.

More endpoints in this hub

All endpoints in this hub โ†’