{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/octen-ai/json-schema/octen-ai-embedding-response-schema.json",
  "title": "EmbeddingResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/octen-ai-embedding-api-openapi.yml#/components/schemas/EmbeddingResponse",
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "description": "Business status code. 0 indicates success."
    },
    "msg": {
      "type": "string",
      "description": "A message describing the result."
    },
    "request_id": {
      "type": "string",
      "description": "The unique identifier for this request."
    },
    "data": {
      "$ref": "#/$defs/EmbeddingData"
    },
    "meta": {
      "$ref": "#/$defs/EmbeddingMeta"
    }
  },
  "$defs": {
    "EmbeddingData": {
      "type": "object",
      "description": "The main embedding response payload.",
      "properties": {
        "results": {
          "type": "array",
          "description": "A list of embedding results. Each item corresponds to one input.",
          "items": {
            "$ref": "#/$defs/EmbeddingResult"
          }
        },
        "model": {
          "type": "string",
          "description": "The embedding model used for this request."
        }
      }
    },
    "EmbeddingMeta": {
      "type": "object",
      "description": "Additional metadata for the embedding request.",
      "properties": {
        "usage": {
          "$ref": "#/$defs/EmbeddingUsage"
        },
        "warning": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional warning message."
        }
      }
    },
    "EmbeddingResult": {
      "type": "object",
      "description": "A single embedding result.",
      "properties": {
        "index": {
          "type": "integer",
          "description": "The position of the embedding in the input array (useful when input is a list)."
        },
        "embedding": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "The generated embedding vector."
        }
      }
    },
    "EmbeddingUsage": {
      "type": "object",
      "description": "Usage information for the embedding request.",
      "properties": {
        "input_tokens": {
          "type": "integer",
          "description": "The number of input tokens processed in this request."
        }
      }
    }
  }
}