{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fincept-in/json-schema/fincept-in-chat-message-save-schema.json",
  "title": "ChatMessageSave",
  "description": "Save a message (deprecated — backend now auto-persists from /agent/stream).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fincept-in-chat-api-openapi.yml#/components/schemas/ChatMessageSave",
  "properties": {
    "role": {
      "type": "string",
      "title": "Role",
      "default": "user"
    },
    "content": {
      "type": "string",
      "title": "Content"
    },
    "provider": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Provider"
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model"
    },
    "tokens_used": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tokens Used"
    },
    "response_time_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Response Time Ms"
    },
    "tool_calls": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tool Calls"
    },
    "metadata": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata"
    }
  },
  "type": "object",
  "required": [
    "content"
  ]
}