{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scribiz/json-schema/scribiz-context-request-schema.json",
  "title": "ContextRequest",
  "description": "Exactly one of url or upload_id.",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scribiz-openapi.json#/components/schemas/ContextRequest",
  "additionalProperties": false,
  "properties": {
    "language": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "type": "string"
          },
          "maxItems": 5,
          "type": "array"
        }
      ]
    },
    "mode": {
      "default": "auto",
      "enum": [
        "auto",
        "captions",
        "audio",
        "visual",
        "full",
        "listen",
        "watch",
        "both"
      ]
    },
    "options": {
      "$ref": "#/$defs/ContextOptions"
    },
    "replaces_job_id": {
      "description": "Optional. When a second recording of the same moment arrives after a single-track upload job was already created, pass that job id (same owner, same primary upload hash) to credit its usage minutes and replace it in job listings.",
      "type": "string"
    },
    "secondary_offset_seconds": {
      "description": "Only with secondary_upload_id. Add it to a time in the second recording to place it on the first one's timeline (the second device's start minus the first's, in seconds). A hint: the offset is measured from the words.",
      "maximum": 3600,
      "minimum": -3600,
      "type": "number"
    },
    "secondary_upload_id": {
      "description": "Only with upload_id, and a different upload. A second recording of the same moment (another device's microphone): both are read and fused into one transcript on the timeline of upload_id. Charged as one job of the longer of the two lengths.",
      "type": "string"
    },
    "turnstile_token": {
      "description": "Required for anonymous Listen and Watch when the server has Turnstile on.",
      "type": "string"
    },
    "upload_id": {
      "type": "string"
    },
    "url": {
      "maxLength": 2048,
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "ContextOptions": {
      "additionalProperties": false,
      "properties": {
        "detail": {
          "enum": [
            "transcript",
            "brief",
            "full"
          ]
        },
        "diarize": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "const": "auto"
            }
          ]
        },
        "effort": {
          "deprecated": true,
          "description": "Removed on 2026-10-09. Still accepted, whatever it holds, and ignored: the job runs as it would without it. Send `detail: \"transcript\"` for the words alone and `proofread: \"full\"` for the full proofread."
        },
        "glossary": {
          "description": "Accounts only. Terms, product names, and contact names for synthesis glossary corrections.",
          "items": {
            "maxLength": 100,
            "type": "string"
          },
          "maxItems": 50,
          "type": "array"
        },
        "include_words": {
          "description": "Accounts only. Keep the word list in the result.",
          "type": "boolean"
        },
        "owner": {
          "additionalProperties": false,
          "description": "Accounts only. Account owner name, notes, glossary, and time zone.",
          "properties": {
            "glossary": {
              "items": {
                "maxLength": 100,
                "type": "string"
              },
              "maxItems": 50,
              "type": "array"
            },
            "name": {
              "maxLength": 100,
              "type": "string"
            },
            "notes": {
              "maxLength": 300,
              "type": "string"
            },
            "time_zone": {
              "maxLength": 80,
              "type": "string"
            }
          },
          "type": "object"
        },
        "proofread": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "enum": [
                "terms",
                "full",
                "auto"
              ]
            }
          ]
        },
        "quality": {
          "description": "Accounts only.",
          "enum": [
            "standard",
            "high"
          ]
        },
        "visual": {
          "additionalProperties": false,
          "description": "Accounts only.",
          "properties": {
            "fps": {
              "maximum": 2,
              "minimum": 0.1,
              "type": "number"
            },
            "max_scenes": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          "type": "object"
        },
        "vocabulary": {
          "description": "Accounts only.",
          "items": {
            "maxLength": 100,
            "type": "string"
          },
          "maxItems": 50,
          "type": "array"
        }
      },
      "type": "object"
    }
  }
}