{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openmayhem-ai/json-schema/openmayhem-ai-request-estimate-schema.json",
  "title": "RequestEstimate",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openmayhem-ai-openapi.json#/components/schemas/RequestEstimate",
  "type": "object",
  "required": [
    "object",
    "estimate_id",
    "endpoint",
    "model",
    "estimated_cost_usd",
    "maximum_cost_usd",
    "price_version",
    "expires_at",
    "can_start"
  ],
  "properties": {
    "object": {
      "type": "string",
      "const": "request.estimate"
    },
    "estimate_id": {
      "type": "string"
    },
    "endpoint": {
      "type": "string",
      "enum": [
        "CHAT",
        "COMPLETIONS",
        "RESPONSES",
        "EMBEDDINGS",
        "DECISIONS",
        "IMAGES",
        "VIDEOS",
        "AUDIO_SPEECH",
        "AUDIO_TRANSCRIPTIONS",
        "AUDIO_GENERATIONS",
        "MUSIC",
        "WORKFLOWS"
      ]
    },
    "model": {
      "type": "string"
    },
    "estimated_cost_usd": {
      "$ref": "#/$defs/UsdDecimal"
    },
    "maximum_cost_usd": {
      "$ref": "#/$defs/UsdDecimal"
    },
    "estimated_units": {
      "type": "object",
      "additionalProperties": {
        "type": "integer",
        "minimum": 0
      }
    },
    "price_version": {
      "type": "string"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "can_start": {
      "type": "boolean",
      "description": "Read-only current route and whole-rail funding snapshot; nothing is reserved."
    }
  },
  "$defs": {
    "UsdDecimal": {
      "type": "string",
      "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,6})?$",
      "description": "Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic."
    }
  }
}