{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trymnemo-com/json-schema/trymnemo-com-embed-request-schema.json",
  "title": "EmbedRequest",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trymnemo-com-openapi.json#/components/schemas/EmbedRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "vector",
    "model_id"
  ],
  "properties": {
    "vector": {
      "$ref": "#/$defs/Vector"
    },
    "model_id": {
      "type": "string",
      "description": "Label for the model that produced `vector` (caller-declared free text, for example `text-embedding-3-small`). Mnemo does not run this model and does not attest it."
    },
    "model_version": {
      "type": "string",
      "default": "1.0",
      "description": "Caller-declared label for the model version."
    },
    "request_id": {
      "type": "string",
      "description": "Optional. Not scoped to the namespace and kept 24 hours: use a fresh random UUID per request. A request that ran keeps it; reuse answers 409."
    },
    "parent": {
      "$ref": "#/$defs/ParentRequest",
      "description": "Optional: record that this object was derived from one of your own objects. The parent is verified before the child is created."
    },
    "subject": {
      "$ref": "#/$defs/SubjectRequest",
      "description": "Optional description of what the vector represents."
    }
  },
  "$defs": {
    "ParentRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "vector_uid",
        "relation",
        "vector"
      ],
      "properties": {
        "vector_uid": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "The parent object's `vector_uid` (an object of the same namespace or account)."
        },
        "relation": {
          "type": "string",
          "enum": [
            "re_embed",
            "summary",
            "chunk",
            "translation",
            "transform"
          ],
          "description": "How this object was derived from the parent."
        },
        "vector": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "The parent's watermarked vector as you hold it; it must verify as exactly `vector_uid`."
        }
      }
    },
    "SubjectRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "subject_uri",
        "subject_type"
      ],
      "description": "Optional description of what the vector represents. If accepted, the response carries `subject_proof`.",
      "properties": {
        "subject_uri": {
          "type": "string"
        },
        "subject_type": {
          "type": "string"
        },
        "canonicalization_version": {
          "type": "string"
        },
        "object_id": {
          "type": "string"
        },
        "parent_id": {
          "type": "string"
        },
        "segment_id": {
          "type": "string"
        },
        "offset": {
          "type": "object",
          "additionalProperties": true
        },
        "adapters": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "Vector": {
      "type": "array",
      "minItems": 512,
      "maxItems": 4096,
      "items": {
        "type": "number"
      },
      "description": "An embedding your model produced: 512 to 4096 finite numbers. Send the FP32 values; unit-norm (L2-normalized) input is expected, and Mnemo L2-normalizes the input before watermarking. Mnemo does not generate embeddings."
    }
  }
}