{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/anthropic/main/json-schema/anthropic-templatize-prompt-response-schema.json", "title": "TemplatizePromptResponse", "x-generated": "2026-09-23", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/anthropic-prompt-templatization-api-openapi.yml#/components/schemas/TemplatizePromptResponse", "type": "object", "required": [ "messages", "system", "usage", "variable_values" ], "properties": { "messages": { "type": "array", "description": "The templatized prompt with variable placeholders.\nThe response includes the input messages with specific\nvalues replaced by variable placeholders. These messages\nmaintain the original message structure but contain\nuppercase variable names in place of concrete values.\n", "items": { "$ref": "#/$defs/PromptMessage" } }, "system": { "type": "string", "description": "The input system prompt with variables identified and replaced.\nIf no system prompt was provided in the original request,\nthis field will be an empty string.\n" }, "usage": { "$ref": "#/$defs/UsageInfo" }, "variable_values": { "type": "object", "description": "A mapping of template variable names to their original\nvalues, as extracted from the input prompt during\ntemplatization. Each key represents a variable name\nidentified in the templatized prompt, and each value\ncontains the corresponding content from the original\nprompt that was replaced by that variable.\n", "additionalProperties": { "type": "string" } } }, "$defs": { "PromptMessage": { "type": "object", "required": [ "role", "content" ], "properties": { "role": { "type": "string", "enum": [ "user", "assistant" ], "description": "The role of the message sender" }, "content": { "type": "array", "description": "The content of the message", "items": { "$ref": "#/$defs/TextContentBlock" } } } }, "TextContentBlock": { "type": "object", "required": [ "type", "text" ], "properties": { "type": { "type": "string", "enum": [ "text" ], "description": "The type of content block" }, "text": { "type": "string", "description": "The text content" } } }, "UsageInfo": { "type": "object", "description": "Usage information", "required": [ "input_tokens", "output_tokens" ], "properties": { "input_tokens": { "type": "integer", "description": "Number of input tokens used", "minimum": 0 }, "output_tokens": { "type": "integer", "description": "Number of output tokens generated", "minimum": 0 } } } } }