{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/misata-studio/json-schema/misata-studio-dataset-request-schema.json",
  "title": "DatasetRequest",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/misata-studio-openapi.json#/components/schemas/DatasetRequest",
  "properties": {
    "prompt": {
      "type": "string",
      "maxLength": 25000,
      "title": "Prompt",
      "description": "What the data is about, in words. Optional when a schema, DDL, template or blueprint is given",
      "default": ""
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4000
        },
        {
          "type": "null"
        }
      ],
      "title": "Instructions",
      "description": "How this dataset should be made, beside what it is about (amounts in euros, names of one market, no test accounts). Read as requirements and held, or said not held; the account's standing instructions are added to them"
    },
    "schema": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Schema",
      "description": "Tables to build exactly ({tables: [...]}), with `numbers` (stated totals, levels, rates, shares) and `window` held exactly"
    },
    "ddl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200000
        },
        {
          "type": "null"
        }
      ],
      "title": "Ddl",
      "description": "SQL DDL (or Prisma, dbt, DBML ...) of your own tables; its numbers go in schema.numbers"
    },
    "template": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ],
      "title": "Template",
      "description": "A built-in business (saas_sales, ecommerce, fintech, healthcare ...) to build as it is"
    },
    "story": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Story",
      "description": "A template's story: stated months, rates and events (as /engine/v2/plan returns it)"
    },
    "blueprint": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Blueprint",
      "description": "A whole design you wrote (the MCP's Blueprint: entities, claims, window), built as written with no model"
    },
    "seed": {
      "type": "integer",
      "maximum": 2147483647.0,
      "minimum": 0.0,
      "title": "Seed",
      "default": 42
    },
    "as_of": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        {
          "type": "null"
        }
      ],
      "title": "As Of",
      "description": "The data's last day; today when not given"
    },
    "research": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Research",
      "description": "Live web research for the content; false turns it off"
    },
    "webhook_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Webhook Url",
      "description": "An https address told when the dataset is ready, failed or cancelled (signed: Misata-Signature)"
    },
    "external_user": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 128
        },
        {
          "type": "null"
        }
      ],
      "title": "External User",
      "description": "Your own id for whoever this is for: returned with the dataset and its webhook, never read"
    }
  },
  "type": "object"
}