{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/attestedmemory-net/json-schema/attestedmemory-net-prepare-graph-schema.json",
  "title": "PrepareGraph",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/attestedmemory-net-studio-api-openapi.yml#/components/schemas/PrepareGraph",
  "properties": {
    "nodes": {
      "items": {
        "$ref": "#/$defs/StudioNode"
      },
      "type": "array",
      "maxItems": 16,
      "minItems": 1,
      "title": "Nodes"
    },
    "max_budget_usd": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 100000.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Budget Usd"
    },
    "gas_mode": {
      "type": "string",
      "enum": [
        "buyer",
        "auto",
        "required"
      ],
      "title": "Gas Mode",
      "default": "buyer"
    },
    "wallet": {
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]{40}$",
      "title": "Wallet",
      "default": "0x0000000000000000000000000000000000000000"
    }
  },
  "type": "object",
  "required": [
    "nodes"
  ],
  "$defs": {
    "StudioNode": {
      "properties": {
        "id": {
          "type": "string",
          "maxLength": 64,
          "title": "Id",
          "default": ""
        },
        "product_id": {
          "type": "string",
          "maxLength": 80,
          "minLength": 2,
          "title": "Product Id"
        },
        "capability_id": {
          "type": "string",
          "maxLength": 80,
          "minLength": 2,
          "title": "Capability Id"
        },
        "input": {
          "additionalProperties": true,
          "type": "object",
          "title": "Input"
        },
        "depends_on": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 16,
          "title": "Depends On"
        },
        "input_from": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 64
            },
            {
              "type": "null"
            }
          ],
          "title": "Input From"
        },
        "source_hub": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Hub"
        }
      },
      "type": "object",
      "required": [
        "product_id",
        "capability_id"
      ],
      "title": "StudioNode",
      "description": "One hop of a studio blueprint — the executor's node shape, validated here too."
    }
  }
}