{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/specstream-ai/json-schema/specstream-ai-capacity-start-request-schema.json",
  "title": "CapacityStartRequest",
  "description": "A list asked in plain words, run only if its price is within confirm_max_cents.\n\nWith rows, each row is a company to enrich (its name, website or domain, and any other\nidentifying columns), and q or fields say what to bring back for each one.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/specstream-ai-openapi.json#/components/schemas/CapacityStartRequest",
  "additionalProperties": false,
  "properties": {
    "q": {
      "anyOf": [
        {
          "maxLength": 2000,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "What to find, in plain words. With rows, what to bring back for each row.",
      "title": "Q"
    },
    "rows": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object"
          },
          "maxItems": 1000,
          "minItems": 1,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Companies to enrich, one object per row: the company name, website or domain, and any other columns that identify it. Each row is one result.",
      "title": "Rows"
    },
    "fields": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "maxItems": 25,
          "minItems": 1,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "What to bring back for each row, in plain words, such as \"headcount\" or \"Is it hiring for a finance role?\". q can ask the same in one sentence.",
      "title": "Fields"
    },
    "requested_units": {
      "default": 25,
      "maximum": 10000,
      "minimum": 1,
      "title": "Requested Units",
      "type": "integer"
    },
    "confirm_max_cents": {
      "minimum": 0,
      "title": "Confirm Max Cents",
      "type": "integer"
    },
    "maximum_price_usd": {
      "anyOf": [
        {
          "minimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Maximum Price Usd"
    },
    "idempotency_key": {
      "maxLength": 128,
      "minLength": 8,
      "title": "Idempotency Key",
      "type": "string"
    },
    "locale": {
      "default": "en-US",
      "maxLength": 35,
      "minLength": 2,
      "title": "Locale",
      "type": "string"
    },
    "callback_url": {
      "anyOf": [
        {
          "maxLength": 2048,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Callback Url"
    },
    "callback_on": {
      "default": "start",
      "description": "\"start\" tells the callback when the run starts. \"done\" posts the finished rows to it when the run ends, as GET /v1/capacity/requests/{key}/rows answers them, in parts of at most 90 KB. Both tell it when nothing runs.",
      "enum": [
        "start",
        "done"
      ],
      "title": "Callback On",
      "type": "string"
    },
    "one_row_per": {
      "anyOf": [
        {
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "For the rows posted when done: one flat row per item of this list field, such as \"people\" for one person per row.",
      "title": "One Row Per"
    }
  },
  "required": [
    "confirm_max_cents",
    "idempotency_key"
  ],
  "type": "object"
}