{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/creativefabrica/json-schema/creativefabrica-model-cost-request-schema.json",
  "title": "ModelCostRequest",
  "description": "Inputs the price depends on. Which inputs are required is per model:\n`GET /v1/models/{model}` → `pricing.inputs`. Static-priced models ignore\nthe body (it may be empty or omitted), except that an option value the\nmodel's vendor would refuse is rejected (for example a target size\noutside the model's limits), so the quote fails where the generation\nwould.\n",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/creativefabrica-idea-ai-genai-openapi.yml#/components/schemas/ModelCostRequest",
  "type": "object",
  "properties": {
    "options": {
      "type": "object",
      "description": "Option values that determine the price, e.g. `duration_seconds`,\n`resolution`. Every option listed in `pricing.inputs.options` is\nrequired and validated against the model's `inputSchema` — model\ndefaults are **never** applied here, so a quote can't silently\ndiffer from what you asked about. Options that don't affect the\nprice may be included; they are validated but ignored.\n",
      "additionalProperties": true
    },
    "inputMedia": {
      "type": "array",
      "description": "Metadata for input files the price depends on (models whose\n`pricing.inputs.media` is non-empty). Mirrors the asserted\n`width`/`height`/`durationSeconds` fields on the generation\nrequest's `files` entries — generation cross-checks the actual\nfiles against these assertions, so an honest quote always equals\nthe charged amount. Repeat the same `role` for multi-file roles.\n",
      "items": {
        "$ref": "#/$defs/CostInputMedia"
      }
    }
  },
  "$defs": {
    "CostInputMedia": {
      "type": "object",
      "required": [
        "role"
      ],
      "properties": {
        "role": {
          "type": "string",
          "description": "Role of the file: `sourceVideo`, `firstFrame`, `referenceVideo`, …\n— as it will be sent in the generation request's `files`.\n"
        },
        "width": {
          "type": "integer",
          "description": "Media width in pixels, when listed in the role's `requiredMetadata`."
        },
        "height": {
          "type": "integer",
          "description": "Media height in pixels, when listed in the role's `requiredMetadata`."
        },
        "durationSeconds": {
          "type": "integer",
          "description": "Audio/video duration, when listed in the role's `requiredMetadata`."
        },
        "fps": {
          "type": "integer",
          "description": "Video frame rate rounded to the nearest integer (23.976 → 24,\n29.97 → 30), when listed in the role's `requiredMetadata`.\n"
        }
      }
    }
  }
}