{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sketchxflow-com/json-schema/sketchxflow-com-model-body-schema.json",
  "title": "_ModelBody",
  "description": "Same shape model_registry uses internally — id is path param.\n\nThe tier fields at the bottom must stay listed here even though the UI\nrarely sets them: `upsert_model` normalises whatever this body produces and\nwrites the WHOLE row, so a field missing from this schema is a field an\nordinary admin save silently deletes. Dropping them would revert Gemini 3.1\nPro to its base rate on 380K-token prompts (half real cost) and freeze\n3.7/3.6 Flash on promo pricing past its 2027-01-01 expiry.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sketchxflow-com-openapi.json#/components/schemas/_ModelBody",
  "properties": {
    "display_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Display Name"
    },
    "tier": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tier"
    },
    "input_cost_per_1m": {
      "type": "number",
      "title": "Input Cost Per 1M",
      "default": 0
    },
    "output_cost_per_1m": {
      "type": "number",
      "title": "Output Cost Per 1M",
      "default": 0
    },
    "image_cost_per_image": {
      "type": "number",
      "title": "Image Cost Per Image",
      "default": 0
    },
    "enabled": {
      "type": "boolean",
      "title": "Enabled",
      "default": true
    },
    "deprecated": {
      "type": "boolean",
      "title": "Deprecated",
      "default": false
    },
    "notes": {
      "type": "string",
      "title": "Notes",
      "default": ""
    },
    "long_prompt_threshold_tokens": {
      "type": "integer",
      "title": "Long Prompt Threshold Tokens",
      "default": 0
    },
    "long_input_cost_per_1m": {
      "type": "number",
      "title": "Long Input Cost Per 1M",
      "default": 0
    },
    "long_output_cost_per_1m": {
      "type": "number",
      "title": "Long Output Cost Per 1M",
      "default": 0
    },
    "promo_ends": {
      "type": "string",
      "title": "Promo Ends",
      "default": ""
    },
    "post_promo_input_cost_per_1m": {
      "type": "number",
      "title": "Post Promo Input Cost Per 1M",
      "default": 0
    },
    "post_promo_output_cost_per_1m": {
      "type": "number",
      "title": "Post Promo Output Cost Per 1M",
      "default": 0
    }
  },
  "type": "object"
}