{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/evalgate-com/json-schema/evalgate-com-post-api-benchmarks-id-results-request-schema.json",
  "title": "PostApiBenchmarksIdResultsRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/evalgate-com-benchmarks-api-openapi.yml#/components/schemas/PostApiBenchmarksIdResultsRequest",
  "type": "object",
  "properties": {
    "agentConfigId": {
      "type": "number"
    },
    "customMetrics": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      }
    },
    "trajectory": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "output"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "error"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "reasoning"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "tool_call"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "tool_result"
                    ]
                  }
                ]
              },
              "content": {
                "type": "string"
              },
              "step": {
                "type": "number"
              },
              "timestamp": {
                "type": "string"
              },
              "toolCall": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "arguments": {
                    "type": "object",
                    "additionalProperties": {
                      "$ref": "#/$defs/JsonValue"
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name",
                  "arguments"
                ]
              },
              "toolResult": {
                "type": "object",
                "properties": {
                  "output": {
                    "type": "string"
                  },
                  "success": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "output",
                  "success"
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "type",
              "content",
              "step"
            ]
          }
        },
        "schemaVersion": {
          "type": "number"
        }
      },
      "additionalProperties": false,
      "required": [
        "entries",
        "schemaVersion"
      ]
    },
    "totalCost": {
      "type": "string"
    },
    "workflowRunId": {
      "type": "number"
    },
    "successRate": {
      "type": "number"
    },
    "accuracy": {
      "type": "number"
    },
    "latencyP50": {
      "type": "number"
    },
    "latencyP95": {
      "type": "number"
    },
    "toolUseEfficiency": {
      "type": "number"
    },
    "taskResults": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "passed": {
            "type": "boolean"
          },
          "taskIndex": {
            "type": "number"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/$defs/JsonValue"
            }
          },
          "score": {
            "type": "number"
          },
          "errorMessage": {
            "type": "string"
          },
          "expectedOutput": {
            "type": "string"
          },
          "latencyMs": {
            "type": "number"
          },
          "actualOutput": {
            "type": "string"
          },
          "taskInput": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "passed",
          "taskIndex"
        ]
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "agentConfigId"
  ],
  "$defs": {
    "JsonValue": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "boolean"
        },
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/JsonValue"
          }
        },
        {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/JsonValue"
          }
        }
      ]
    }
  }
}