{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/opper/json-schema/opper-rerank-request-schema.json",
  "title": "RerankRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/opper-rerank-api-openapi.yml#/components/schemas/RerankRequest",
  "properties": {
    "documents": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "model": {
      "type": "string"
    },
    "query": {
      "type": "string"
    },
    "return_documents": {
      "type": "boolean"
    },
    "top_k": {
      "description": "Compatibility alias for top_n. Zero means unspecified. Positive values must match top_n when both are supplied.",
      "minimum": 0,
      "type": "integer"
    },
    "top_n": {
      "description": "Maximum number of results. Omit to return all documents.",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "model",
    "query",
    "documents"
  ],
  "type": "object"
}