{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudgpu-app/json-schema/cloudgpu-app-quote-schema.json",
  "title": "Quote",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/cloudgpu-app-api-openapi.json#/components/schemas/Quote",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "const": "compute.quote"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "currency": {
      "const": "USD"
    },
    "price_guarantee": {
      "const": "estimate"
    },
    "requires_authorization": {
      "type": "boolean"
    },
    "request": {
      "type": "object"
    },
    "billing": {
      "type": "object"
    },
    "candidates": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/QuoteCandidate"
      }
    },
    "within_budget": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "notes": {
      "type": "string"
    },
    "no_match_reason": {
      "type": "string"
    },
    "account": {
      "type": "object",
      "properties": {
        "authenticated": {
          "type": "boolean"
        },
        "balance_usd": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    }
  },
  "$defs": {
    "QuoteCandidate": {
      "type": "object",
      "properties": {
        "gpu_model": {
          "type": "string"
        },
        "vram_gb": {
          "type": [
            "integer",
            "null"
          ]
        },
        "gpu_count": {
          "type": "integer"
        },
        "disk_gb": {
          "type": [
            "integer",
            "null"
          ]
        },
        "price_per_gpu_hour_usd": {
          "type": "number"
        },
        "disk_addon_per_hour_usd": {
          "type": "number"
        },
        "instance_price_per_hour_usd": {
          "type": "number"
        },
        "billed_minutes": {
          "type": "integer"
        },
        "availability": {
          "enum": [
            "available",
            "limited",
            "unavailable"
          ]
        },
        "within_budget": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether estimated_total_cost is within max_budget_usd. Does not mean you can start now."
        },
        "estimated_total_cost": {
          "type": "number",
          "description": "USD the task is expected to use (billed minutes × instance price)."
        },
        "required_starting_balance": {
          "type": "number",
          "description": "USD balance needed to start: one hour is pre-authorised at start and unused minutes are refunded when the instance is destroyed. Usually higher than estimated_total_cost for short tasks."
        },
        "can_start_with_balance": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Only set when the request carries an API key: whether that account's balance covers required_starting_balance. null for anonymous requests."
        },
        "supports_jobs": {
          "type": "boolean",
          "description": "Whether this GPU can run a job with POST /v1/jobs right now. Some GPUs can only be rented as instances."
        }
      }
    }
  }
}