{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/modelspec-dev/json-schema/modelspec-dev-rank-response-schema.json",
  "title": "RankResponse",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/modelspec-dev-openapi.yaml#/components/schemas/RankResponse",
  "type": "object",
  "properties": {
    "applied": {
      "description": "What actually bound. Read applied.unbound before trusting a filter.",
      "type": "object",
      "properties": {
        "cost_weight": {
          "type": [
            "number",
            "null"
          ]
        },
        "hardware_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "include_rehosts": {
          "type": "boolean"
        },
        "max_cost_per_million_input_tokens": {
          "type": [
            "number",
            "null"
          ]
        },
        "open_weights_only": {
          "type": "boolean"
        },
        "open_weights_required_by": {
          "type": [
            "string",
            "null"
          ]
        },
        "unbound": {
          "description": "Fields that were accepted, recorded, and filtered nothing, each with the reason. An empty list means every field you sent bound.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "field",
              "value",
              "why"
            ],
            "properties": {
              "field": {
                "type": "string"
              },
              "value": {
                "type": "string"
              },
              "why": {
                "type": "string"
              }
            }
          }
        }
      },
      "required": [
        "cost_weight",
        "hardware_id",
        "include_rehosts",
        "max_cost_per_million_input_tokens",
        "open_weights_only",
        "open_weights_required_by",
        "unbound"
      ]
    },
    "authoring_guide": {
      "description": "The recommended model's authoring guide, copied from the public card. Always present. Free: it is public catalogue data, not a paid enrichment.",
      "type": "object",
      "properties": {
        "guide": {
          "description": "The card's guide, including source URL and accessed date on every claim. Null when absent. Never generated at request time.",
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "applies_to": {
              "type": "object",
              "properties": {
                "model_id": {
                  "type": "string"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "model_id",
                "version"
              ]
            },
            "as_of": {
              "type": "string"
            },
            "sections": {
              "type": "object",
              "properties": {
                "failure_modes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Sharedcdda5f3578d1"
                  }
                },
                "formatting": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Sharedcdda5f3578d1"
                  }
                },
                "prompt_shape": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Sharedcdda5f3578d1"
                  }
                },
                "reasoning_and_tools": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Sharedcdda5f3578d1"
                  }
                },
                "retry_advice": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Sharedcdda5f3578d1"
                  }
                },
                "system_message": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Sharedcdda5f3578d1"
                  }
                }
              },
              "additionalProperties": false
            },
            "status": {
              "type": "string"
            }
          },
          "required": [
            "applies_to",
            "as_of",
            "sections",
            "status"
          ]
        },
        "model_id": {
          "description": "The recommended model this block is about. Null when the shortlist is empty.",
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "description": "current, stale, or absent. A stale guide is served as stale, never rewritten to current. Absent is a state, not an empty string.",
          "type": "string",
          "enum": [
            "absent",
            "current",
            "stale"
          ]
        },
        "why": {
          "description": "Why the guide is absent: no_guide (the card has none) or no_recommendation (nothing was ranked). Null when a guide is served.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "guide",
        "model_id",
        "state",
        "why"
      ]
    },
    "build": {
      "description": "The published export this answer was computed from.",
      "type": "object",
      "properties": {
        "built_at": {
          "type": "string"
        },
        "commit": {
          "type": "string"
        },
        "eligibility_as_of": {
          "type": "string"
        },
        "export_schema_version": {
          "type": "string"
        }
      },
      "required": [
        "built_at",
        "commit",
        "eligibility_as_of",
        "export_schema_version"
      ]
    },
    "candidates_considered": {
      "type": "integer"
    },
    "deprecation": {
      "description": "Always present (MODEL-316): the retired ranking; never a fallback for decide.",
      "type": "object",
      "properties": {
        "deprecated": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "next": {
          "description": "The endpoint to call instead: POST /v1/decide.",
          "type": "object",
          "properties": {
            "guide": {
              "type": "string"
            },
            "method": {
              "type": "string"
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "guide",
            "method",
            "url"
          ]
        }
      },
      "required": [
        "deprecated",
        "message",
        "next"
      ]
    },
    "endpoint": {
      "type": "string"
    },
    "export_origin": {
      "type": "string"
    },
    "policy": {
      "description": "The evidence floors this answer was ordered under.",
      "type": "object",
      "properties": {
        "cli_min_benchmark_coverage": {
          "type": "number"
        },
        "limit_applies_to": {
          "type": "string"
        },
        "min_benchmark_count": {
          "type": "integer"
        },
        "min_benchmark_coverage": {
          "type": "number"
        },
        "neutrality": {
          "description": "The honest-broker commitment, as data: what ModelSpec takes no money for. The same object as https://modelspec.dev/api/rank/profiles.json .ranking_policy.neutrality. The terms, privacy statement and neutrality commitment it links are adopted and in force (https://modelspec.dev/legal/).",
          "type": "object",
          "properties": {
            "assertions": {
              "type": "object",
              "properties": {
                "accepts_paid_placement": {
                  "type": "boolean"
                },
                "accepts_provider_paid_visibility": {
                  "type": "boolean"
                },
                "accepts_referral_fees": {
                  "type": "boolean"
                },
                "conceals_purchases_from_catalogued_vendors": {
                  "type": "boolean"
                },
                "lets_supplier_models_write_supplier_cards": {
                  "type": "boolean"
                },
                "proxies_inference_tokens": {
                  "type": "boolean"
                },
                "stores_customer_prompts": {
                  "type": "boolean"
                }
              },
              "required": [
                "accepts_paid_placement",
                "accepts_provider_paid_visibility",
                "accepts_referral_fees",
                "conceals_purchases_from_catalogued_vendors",
                "lets_supplier_models_write_supplier_cards",
                "proxies_inference_tokens",
                "stores_customer_prompts"
              ]
            },
            "charges": {
              "type": "string"
            },
            "method_source": {
              "type": "string"
            },
            "neutrality_url": {
              "type": "string"
            },
            "operator": {
              "type": "string"
            },
            "permanent": {
              "type": "boolean"
            },
            "pledge": {
              "type": "string"
            },
            "privacy_url": {
              "type": "string"
            },
            "rule": {
              "type": "string"
            },
            "source_neutral_at": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "terms_url": {
              "type": "string"
            },
            "vendor_purchases": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "assertions",
            "charges",
            "method_source",
            "neutrality_url",
            "operator",
            "permanent",
            "pledge",
            "privacy_url",
            "rule",
            "source_neutral_at",
            "terms_url",
            "vendor_purchases",
            "version"
          ]
        },
        "ordering": {
          "type": "string"
        },
        "uncertainty": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "wizard_min_benchmark_coverage": {
          "type": "number"
        }
      },
      "required": [
        "cli_min_benchmark_coverage",
        "limit_applies_to",
        "min_benchmark_count",
        "min_benchmark_coverage",
        "neutrality",
        "ordering",
        "uncertainty",
        "version",
        "wizard_min_benchmark_coverage"
      ]
    },
    "profile": {
      "type": "string"
    },
    "ranked_count": {
      "type": "integer"
    },
    "ranking_status": {
      "description": "Whether every candidate could be ordered. `partial` is the normal state of the catalogue, not a degraded answer.",
      "type": "string",
      "enum": [
        "complete",
        "empty",
        "partial",
        "unavailable"
      ]
    },
    "request": {
      "description": "The request as received and normalised.",
      "type": "object",
      "properties": {
        "constraints": {
          "type": "object",
          "properties": {
            "include_rehosts": {
              "type": "boolean"
            },
            "max_cost_per_million_input_tokens": {
              "type": [
                "number",
                "null"
              ]
            },
            "open_weights": {
              "type": "boolean"
            },
            "price_sensitivity": {
              "type": "number"
            }
          },
          "required": [
            "include_rehosts",
            "max_cost_per_million_input_tokens",
            "open_weights",
            "price_sensitivity"
          ]
        },
        "environment": {
          "type": "object",
          "properties": {
            "hardware": {
              "type": [
                "string",
                "null"
              ]
            },
            "hosting": {
              "type": [
                "string",
                "null"
              ]
            },
            "runtime": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "hardware",
            "hosting",
            "runtime"
          ]
        },
        "limit": {
          "type": "integer"
        },
        "use_case": {
          "type": "string"
        }
      },
      "required": [
        "constraints",
        "environment",
        "limit",
        "use_case"
      ]
    },
    "result": {
      "description": "The shortlist, best first. Never empty on a 200.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "benchmark_contributions": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "aider_polyglot": {
                "type": "number"
              },
              "aime_2025": {
                "type": "number"
              },
              "aime_2026": {
                "type": "number"
              },
              "alpaca_eval": {
                "type": "number"
              },
              "arc_challenge": {
                "type": "number"
              },
              "arena_elo_coding": {
                "type": "number"
              },
              "arena_elo_hard_prompts": {
                "type": "number"
              },
              "arena_elo_math": {
                "type": "number"
              },
              "arena_elo_overall": {
                "type": "number"
              },
              "arena_elo_style_control": {
                "type": "number"
              },
              "arena_elo_vision": {
                "type": "number"
              },
              "bbh": {
                "type": "number"
              },
              "bbq": {
                "type": "number"
              },
              "beir": {
                "type": "number"
              },
              "chartqa": {
                "type": "number"
              },
              "clip_score": {
                "type": "number"
              },
              "critpt": {
                "type": "number"
              },
              "docvqa": {
                "type": "number"
              },
              "fid": {
                "type": "number"
              },
              "finbench": {
                "type": "number"
              },
              "finqa": {
                "type": "number"
              },
              "flores": {
                "type": "number"
              },
              "gpqa_diamond": {
                "type": "number"
              },
              "gsm8k": {
                "type": "number"
              },
              "hellaswag": {
                "type": "number"
              },
              "helm_safety": {
                "type": "number"
              },
              "humaneval": {
                "type": "number"
              },
              "ifeval": {
                "type": "number"
              },
              "legalbench": {
                "type": "number"
              },
              "live_code_bench": {
                "type": "number"
              },
              "math_500": {
                "type": "number"
              },
              "mathvista": {
                "type": "number"
              },
              "medmcqa": {
                "type": "number"
              },
              "medqa": {
                "type": "number"
              },
              "mgsm": {
                "type": "number"
              },
              "miracl": {
                "type": "number"
              },
              "mmlu_astronomy": {
                "type": "number"
              },
              "mmlu_biology": {
                "type": "number"
              },
              "mmlu_business_ethics": {
                "type": "number"
              },
              "mmlu_chemistry": {
                "type": "number"
              },
              "mmlu_clinical_knowledge": {
                "type": "number"
              },
              "mmlu_computer_science": {
                "type": "number"
              },
              "mmlu_jurisprudence": {
                "type": "number"
              },
              "mmlu_physics": {
                "type": "number"
              },
              "mmlu_pro": {
                "type": "number"
              },
              "mmlu_professional_accounting": {
                "type": "number"
              },
              "mmlu_professional_law": {
                "type": "number"
              },
              "mmmu": {
                "type": "number"
              },
              "mos_tts": {
                "type": "number"
              },
              "mt_bench": {
                "type": "number"
              },
              "mteb_classification": {
                "type": "number"
              },
              "mteb_clustering": {
                "type": "number"
              },
              "mteb_overall": {
                "type": "number"
              },
              "mteb_retrieval": {
                "type": "number"
              },
              "multipl_e": {
                "type": "number"
              },
              "multipl_e_cpp": {
                "type": "number"
              },
              "multipl_e_go": {
                "type": "number"
              },
              "multipl_e_java": {
                "type": "number"
              },
              "multipl_e_javascript": {
                "type": "number"
              },
              "multipl_e_python": {
                "type": "number"
              },
              "multipl_e_rust": {
                "type": "number"
              },
              "multipl_e_typescript": {
                "type": "number"
              },
              "pubmedqa": {
                "type": "number"
              },
              "scicode": {
                "type": "number"
              },
              "swe_bench_agent": {
                "type": "number"
              },
              "swe_bench_verified": {
                "type": "number"
              },
              "tau_bench": {
                "type": "number"
              },
              "terminal_bench": {
                "type": "number"
              },
              "toxigen": {
                "type": "number"
              },
              "truthfulqa": {
                "type": "number"
              },
              "web_arena": {
                "type": "number"
              },
              "wer_librispeech": {
                "type": "number"
              },
              "wildbench": {
                "type": "number"
              }
            }
          },
          "benchmark_count": {
            "type": "integer"
          },
          "benchmark_coverage": {
            "description": "Share of the profile's weighted benchmarks this model has a score for.",
            "type": "number"
          },
          "benchmark_estimate": {
            "type": "number"
          },
          "benchmark_lower_bound": {
            "type": "number"
          },
          "benchmark_score": {
            "type": "number"
          },
          "benchmark_upper_bound": {
            "type": "number"
          },
          "capability_score": {
            "type": "number"
          },
          "context_score": {
            "type": "number"
          },
          "context_window": {
            "type": [
              "integer",
              "null"
            ]
          },
          "cost_input": {
            "description": "USD per million input tokens, or null when unpublished.",
            "type": [
              "number",
              "null"
            ]
          },
          "cost_score": {
            "type": "number"
          },
          "display_name": {
            "type": "string"
          },
          "evidence_basis": {
            "description": "Provenance of the benchmark inputs — none, unverified-legacy, mixed, partial-verified or verified. Not a quality verdict, and 'verified' is not a certificate.",
            "type": "string",
            "enum": [
              "mixed",
              "none",
              "partial-verified",
              "unverified-legacy",
              "verified"
            ]
          },
          "missing_benchmarks": {
            "description": "Benchmarks the profile weighs that this model lacks.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "model_id": {
            "type": "string"
          },
          "open_weights": {
            "type": "boolean"
          },
          "provider": {
            "type": "string"
          },
          "rank": {
            "type": "integer"
          },
          "rank_status": {
            "type": "string",
            "enum": [
              "ranked",
              "unranked"
            ]
          },
          "required_benchmark_count": {
            "type": "integer"
          },
          "score": {
            "description": "Composite, 0–100, on the conservative lower bound.",
            "type": "number"
          },
          "score_kind": {
            "type": "string"
          },
          "score_lower_bound": {
            "type": "number"
          },
          "score_upper_bound": {
            "type": "number"
          },
          "scores_as_of": {
            "type": [
              "string",
              "null"
            ]
          },
          "type_bonus": {
            "type": "number"
          },
          "unranked_reason": {
            "nullable": true
          },
          "verified_benchmark_coverage": {
            "type": "number"
          },
          "verified_contributions": {
            "type": "integer"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Includes cite_only_not_machine_verified when cited inputs are present."
          },
          "cited_facts": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Fact records with citation provenance and no verification."
          },
          "cited_benchmarks": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            },
            "description": "Benchmark IDs mapped to cite-only source URLs; excluded from verified counts."
          }
        },
        "required": [
          "benchmark_contributions",
          "benchmark_count",
          "benchmark_coverage",
          "benchmark_estimate",
          "benchmark_lower_bound",
          "benchmark_score",
          "benchmark_upper_bound",
          "capability_score",
          "context_score",
          "context_window",
          "cost_input",
          "cost_score",
          "display_name",
          "evidence_basis",
          "missing_benchmarks",
          "model_id",
          "open_weights",
          "provider",
          "rank",
          "rank_status",
          "required_benchmark_count",
          "score",
          "score_kind",
          "score_lower_bound",
          "score_upper_bound",
          "scores_as_of",
          "type_bonus",
          "unranked_reason",
          "verified_benchmark_coverage",
          "verified_contributions"
        ]
      }
    },
    "schema_version": {
      "type": "string"
    },
    "service_commit": {
      "description": "The sha of the deployed Worker. Fixed per deployment.",
      "type": "string"
    },
    "unranked_candidates": {
      "description": "The models this answer could not rank, named: they passed every filter, match the use case's model types, and lack the benchmark evidence to be ordered. Always present. Disclosure only; nothing in result depends on it.",
      "type": "object",
      "properties": {
        "cap": {
          "description": "How many are named in models, at most.",
          "type": "integer"
        },
        "count": {
          "description": "How many such models there are. Never capped; at most unranked_count.",
          "type": "integer"
        },
        "models": {
          "description": "Newest release_date first; undated last; then by model_id.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "display_name": {
                "type": "string"
              },
              "missing_benchmarks": {
                "description": "The use case's weighted benchmarks this model has no score for.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "model_id": {
                "type": "string"
              },
              "reason": {
                "description": "no_scores (no score on any benchmark this use case weighs), below_count_floor (fewer than policy.min_benchmark_count), or below_coverage_floor (under policy.min_benchmark_coverage). A model failing both floors is below_count_floor.",
                "type": "string",
                "enum": [
                  "below_count_floor",
                  "below_coverage_floor",
                  "no_scores"
                ]
              },
              "release_date": {
                "description": "The card's release date, or null when the card has none.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "display_name",
              "missing_benchmarks",
              "model_id",
              "reason",
              "release_date"
            ]
          }
        }
      },
      "required": [
        "cap",
        "count",
        "models"
      ]
    },
    "unranked_count": {
      "type": "integer"
    }
  },
  "required": [
    "applied",
    "authoring_guide",
    "build",
    "candidates_considered",
    "deprecation",
    "endpoint",
    "export_origin",
    "policy",
    "profile",
    "ranked_count",
    "ranking_status",
    "request",
    "result",
    "schema_version",
    "service_commit",
    "unranked_candidates",
    "unranked_count"
  ],
  "$defs": {
    "Sharedcdda5f3578d1": {
      "additionalProperties": false,
      "properties": {
        "sources": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "accessed": {
                "type": "string"
              },
              "kind": {
                "enum": [
                  "provider-guidance",
                  "system-card",
                  "release-notes",
                  "model-docs"
                ],
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "accessed",
              "kind",
              "title",
              "url"
            ],
            "type": "object"
          },
          "minItems": 1,
          "type": "array"
        },
        "text": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "sources",
        "text"
      ],
      "type": "object"
    }
  }
}