{
  "openapi": "3.1.0",
  "info": {
    "title": "Order Eval Agent API",
    "version": "1.1.0",
    "description": "Free deterministic six-case sample. Use the contract before producing predictions. Full 48-case local edition commercial availability is declared in the catalog."
  },
  "servers": [
    {
      "url": "https://shigoto-dogu.netlify.app/api/order-eval/v1"
    }
  ],
  "security": [],
  "paths": {
    "/contract": {
      "get": {
        "operationId": "getOrderEvalContract",
        "summary": "Get extraction rules, JSON schema, scope and commercial availability",
        "responses": {
          "200": {
            "description": "Machine-readable result. A 200 score response may have passed=false or gate_passed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or input"
          },
          "403": {
            "description": "Invalid Origin"
          },
          "404": {
            "description": "Unknown sample case"
          },
          "405": {
            "description": "Method not supported"
          },
          "413": {
            "description": "Body too large"
          },
          "415": {
            "description": "JSON content type required"
          },
          "429": {
            "description": "Rate limit; back off according to Retry-After if present"
          }
        }
      }
    },
    "/cases": {
      "get": {
        "operationId": "listOrderCases",
        "summary": "List the fixed sample without answers",
        "responses": {
          "200": {
            "description": "Machine-readable result. A 200 score response may have passed=false or gate_passed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or input"
          },
          "403": {
            "description": "Invalid Origin"
          },
          "404": {
            "description": "Unknown sample case"
          },
          "405": {
            "description": "Method not supported"
          },
          "413": {
            "description": "Body too large"
          },
          "415": {
            "description": "JSON content type required"
          },
          "429": {
            "description": "Rate limit; back off according to Retry-After if present"
          }
        }
      }
    },
    "/cases/{id}": {
      "get": {
        "operationId": "getOrderCase",
        "summary": "Get one synthetic input without its expected answer",
        "responses": {
          "200": {
            "description": "Machine-readable result. A 200 score response may have passed=false or gate_passed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or input"
          },
          "403": {
            "description": "Invalid Origin"
          },
          "404": {
            "description": "Unknown sample case"
          },
          "405": {
            "description": "Method not supported"
          },
          "413": {
            "description": "Body too large"
          },
          "415": {
            "description": "JSON content type required"
          },
          "429": {
            "description": "Rate limit; back off according to Retry-After if present"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/score": {
      "post": {
        "operationId": "scoreOrderOutput",
        "summary": "Score one candidate; no order execution",
        "responses": {
          "200": {
            "description": "Machine-readable result. A 200 score response may have passed=false or gate_passed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or input"
          },
          "403": {
            "description": "Invalid Origin"
          },
          "404": {
            "description": "Unknown sample case"
          },
          "405": {
            "description": "Method not supported"
          },
          "413": {
            "description": "Body too large"
          },
          "415": {
            "description": "JSON content type required"
          },
          "429": {
            "description": "Rate limit; back off according to Retry-After if present"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "output": {
                    "description": "Candidate JSON. Invalid shapes are accepted as predictions and reported as failures."
                  }
                },
                "required": [
                  "id",
                  "output"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/batch": {
      "post": {
        "operationId": "scoreOrderBatch",
        "summary": "Score the whole six-case suite; missing predictions fail",
        "responses": {
          "200": {
            "description": "Machine-readable result. A 200 score response may have passed=false or gate_passed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or input"
          },
          "403": {
            "description": "Invalid Origin"
          },
          "404": {
            "description": "Unknown sample case"
          },
          "405": {
            "description": "Method not supported"
          },
          "413": {
            "description": "Body too large"
          },
          "415": {
            "description": "JSON content type required"
          },
          "429": {
            "description": "Rate limit; back off according to Retry-After if present"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "predictions": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "output": {
                          "description": "Candidate JSON. Invalid shapes are accepted as predictions and reported as failures."
                        }
                      },
                      "required": [
                        "id",
                        "output"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "predictions"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    }
  }
}
