{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bookmyhost/json-schema/bookmyhost-run-schema.json",
  "title": "Run",
  "description": "Represents a run from the OpenAI Evals API",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bookmyhost-evals-api-openapi.yml#/components/schemas/Run",
  "properties": {
    "completed_at": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Completed At"
    },
    "created_at": {
      "title": "Created At",
      "type": "integer"
    },
    "data_source": {
      "additionalProperties": true,
      "title": "Data Source",
      "type": "object"
    },
    "error": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "eval_id": {
      "title": "Eval Id",
      "type": "string"
    },
    "id": {
      "title": "Id",
      "type": "string"
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata"
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "object": {
      "default": "eval.run",
      "title": "Object",
      "type": "string"
    },
    "per_model_usage": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ],
      "title": "Per Model Usage"
    },
    "per_testing_criteria_results": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/PerTestingCriteriaResult"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Per Testing Criteria Results"
    },
    "report_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Report Url"
    },
    "result_counts": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Result Counts"
    },
    "shared_with_openai": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Shared With Openai"
    },
    "started_at": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Started At"
    },
    "status": {
      "enum": [
        "queued",
        "running",
        "completed",
        "failed",
        "cancelled"
      ],
      "title": "Status",
      "type": "string"
    }
  },
  "required": [
    "id",
    "created_at",
    "status",
    "data_source",
    "eval_id"
  ],
  "type": "object",
  "$defs": {
    "PerTestingCriteriaResult": {
      "description": "Results for a specific testing criteria",
      "properties": {
        "average_score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Average Score"
        },
        "result_counts": {
          "$ref": "#/$defs/ResultCounts"
        },
        "testing_criteria_index": {
          "title": "Testing Criteria Index",
          "type": "integer"
        }
      },
      "required": [
        "testing_criteria_index",
        "result_counts"
      ],
      "title": "PerTestingCriteriaResult",
      "type": "object"
    },
    "ResultCounts": {
      "description": "Result counts for a run",
      "properties": {
        "error": {
          "default": 0,
          "title": "Error",
          "type": "integer"
        },
        "failed": {
          "default": 0,
          "title": "Failed",
          "type": "integer"
        },
        "passed": {
          "default": 0,
          "title": "Passed",
          "type": "integer"
        },
        "total": {
          "title": "Total",
          "type": "integer"
        }
      },
      "required": [
        "total"
      ],
      "title": "ResultCounts",
      "type": "object"
    }
  }
}