{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fleetai-com/json-schema/fleetai-com-task-request-schema.json",
  "title": "TaskRequest",
  "description": "Request model for creating a new task.",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fleetai-com-openapi.yml#/components/schemas/TaskRequest",
  "properties": {
    "key": {
      "type": "string",
      "title": "Key"
    },
    "prompt": {
      "type": "string",
      "title": "Prompt"
    },
    "env_id": {
      "type": "string",
      "title": "Environment Id"
    },
    "verifier_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Verifier Id"
    },
    "verifier_func": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Verifier Func"
    },
    "version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Version"
    },
    "environment_version_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Environment Version Id"
    },
    "seed_override": {
      "anyOf": [
        {
          "$ref": "#/$defs/SeedOverride"
        },
        {
          "type": "null"
        }
      ]
    },
    "seed_config": {
      "anyOf": [
        {
          "additionalProperties": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Seed Config"
    },
    "env_variables": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Env Variables"
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata"
    },
    "expected_version_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Version Id",
      "description": "Current task version; required when replacing an existing task's tool policy."
    },
    "project_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Project Key"
    },
    "data_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Data Id"
    },
    "data_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Data Version"
    },
    "multi_app_seed_versions": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Data Versions",
      "description": "Per-component seed version pins. Keyed by component env_key; falls back to data_version for components not in the dict."
    },
    "verifier_status": {
      "type": "string",
      "title": "Verifier Status",
      "description": "Status for the verifier version (ACTIVE or PROPOSED)",
      "default": "ACTIVE"
    },
    "output_json_schema": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output Json Schema",
      "description": "JSON schema for expected output format"
    },
    "factual_answer": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ],
      "title": "Factual Answer",
      "description": "Expected answer for research/factual tasks"
    },
    "graded": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Graded",
      "description": "Explicit list of grading targets for verifier generation. Allowed members: 'db_diff', 'factual_answer'. Both present ⇒ combined (conjunctive) scoring. NULL falls back to legacy inference (factual iff factual_answer is set)."
    },
    "task_modality": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Modality",
      "description": "Task modality (computer_use, tool_use, browser)"
    },
    "task_scenario_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Scenario ID",
      "description": "ID of an existing task scenario to link this task to"
    },
    "task_lifecycle_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Lifecycle Status",
      "description": "Task lifecycle status (production, staging, development, deprecated)"
    }
  },
  "type": "object",
  "required": [
    "key",
    "prompt",
    "env_id"
  ],
  "$defs": {
    "SeedOverride": {
      "properties": {
        "seed_version_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 32,
          "title": "Seed Version Ids",
          "description": "Complete seed-version selection; an empty list is valid for seedless releases."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "seed_version_ids"
      ],
      "title": "SeedOverride",
      "description": "A complete registered seed set for a pinned environment release."
    }
  }
}