WanAPIs · Schema

ChatMessage

LLM GatewayAI API GatewayOpenAI CompatibleModel MarketplaceLLMGPTClaudeGeminiDeepSeekImage GenerationVideo GenerationAudioMultimodalRoutingFailover

Properties

Name Type Description
role string
content object
name string
tool_call_id string
tool_calls array
View JSON Schema on GitHub

JSON Schema

wanapis-chatmessage-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://wanapis.com/schemas/ChatMessage.json",
  "title": "ChatMessage",
  "type": "object",
  "required": ["role", "content"],
  "properties": {
    "role": {
      "type": "string",
      "enum": ["system", "user", "assistant", "tool"]
    },
    "content": {
      "oneOf": [
        { "type": "string" },
        { "type": "array", "items": { "type": "object" } }
      ]
    },
    "name": { "type": "string" },
    "tool_call_id": { "type": "string" },
    "tool_calls": { "type": "array", "items": { "type": "object" } }
  }
}