{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-create-prompt-response-schema.json",
  "title": "CreatePromptResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-prompts-api-openapi.yml#/components/schemas/CreatePromptResponse",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the prompt."
    },
    "description": {
      "type": "string",
      "description": "The description of the prompt."
    },
    "customerEncryptionKeyArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the KMS key that you encrypted the prompt with."
    },
    "defaultVariant": {
      "type": "string",
      "description": "The name of the default variant for your prompt."
    },
    "variants": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PromptVariant"
      },
      "description": "A list of objects, each containing details about a variant of the prompt."
    },
    "id": {
      "type": "string",
      "description": "The unique identifier of the prompt."
    },
    "arn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the prompt."
    },
    "version": {
      "type": "string",
      "description": "The version of the prompt. When you create a prompt, the version created is the DRAFT version."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "The time at which the prompt was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The time at which the prompt was last updated."
    }
  },
  "required": [
    "name",
    "id",
    "arn",
    "version",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "AnyToolChoice": {
      "type": "object",
      "properties": {}
    },
    "AutoToolChoice": {
      "type": "object",
      "properties": {}
    },
    "BedrockAgentCachePointBlock": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "default"
          ],
          "description": "Indicates that the CachePointBlock is of the default type"
        }
      },
      "required": [
        "type"
      ]
    },
    "BedrockAgentContentBlock": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "The text in the message."
        },
        "cachePoint": {
          "$ref": "#/$defs/BedrockAgentCachePointBlock"
        }
      },
      "description": "Exactly one member is set."
    },
    "BedrockAgentMessage": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "user",
            "assistant"
          ],
          "description": "The role that the message belongs to."
        },
        "content": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BedrockAgentContentBlock"
          },
          "description": "The content in the message."
        }
      },
      "required": [
        "role",
        "content"
      ]
    },
    "BedrockAgentSystemContentBlock": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "The text in the system prompt."
        },
        "cachePoint": {
          "$ref": "#/$defs/BedrockAgentCachePointBlock"
        }
      },
      "description": "Exactly one member is set."
    },
    "BedrockAgentTool": {
      "type": "object",
      "properties": {
        "toolSpec": {
          "$ref": "#/$defs/BedrockAgentToolSpecification"
        },
        "cachePoint": {
          "$ref": "#/$defs/BedrockAgentCachePointBlock"
        }
      },
      "description": "Exactly one member is set."
    },
    "BedrockAgentToolConfiguration": {
      "type": "object",
      "properties": {
        "tools": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BedrockAgentTool"
          },
          "description": "An array of tools to pass to a model."
        },
        "toolChoice": {
          "$ref": "#/$defs/ToolChoice"
        }
      },
      "required": [
        "tools"
      ]
    },
    "BedrockAgentToolInputSchema": {
      "type": "object",
      "properties": {
        "json": {
          "type": "object",
          "description": "A JSON object defining the input schema for the tool."
        }
      },
      "description": "Exactly one member is set."
    },
    "BedrockAgentToolSpecification": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the tool."
        },
        "description": {
          "type": "string",
          "description": "The description of the tool."
        },
        "inputSchema": {
          "$ref": "#/$defs/BedrockAgentToolInputSchema"
        },
        "strict": {
          "type": "boolean",
          "description": "Whether the tool schema is strictly enforced."
        }
      },
      "required": [
        "name",
        "inputSchema"
      ]
    },
    "ChatPromptTemplateConfiguration": {
      "type": "object",
      "properties": {
        "messages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BedrockAgentMessage"
          },
          "description": "Contains messages in the chat for the prompt."
        },
        "system": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BedrockAgentSystemContentBlock"
          },
          "description": "Contains system prompts to provide context to the model or to describe how it should behave."
        },
        "inputVariables": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PromptInputVariable"
          },
          "description": "An array of the variables in the prompt template."
        },
        "toolConfiguration": {
          "$ref": "#/$defs/BedrockAgentToolConfiguration"
        }
      },
      "required": [
        "messages"
      ]
    },
    "PromptAgentResource": {
      "type": "object",
      "properties": {
        "agentIdentifier": {
          "type": "string",
          "description": "The ARN of the agent with which to use the prompt."
        }
      },
      "required": [
        "agentIdentifier"
      ]
    },
    "PromptGenAiResource": {
      "type": "object",
      "properties": {
        "agent": {
          "$ref": "#/$defs/PromptAgentResource"
        }
      },
      "description": "Exactly one member is set."
    },
    "PromptInferenceConfiguration": {
      "type": "object",
      "properties": {
        "text": {
          "$ref": "#/$defs/PromptModelInferenceConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "PromptInputVariable": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the variable."
        }
      }
    },
    "PromptMetadataEntry": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of a metadata tag for a prompt variant."
        },
        "value": {
          "type": "string",
          "description": "The value of a metadata tag for a prompt variant."
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "PromptModelInferenceConfiguration": {
      "type": "object",
      "properties": {
        "temperature": {
          "type": "number",
          "description": "Controls the randomness of the response. Choose a lower value for more predictable outputs and a higher value for more surprising outputs."
        },
        "topP": {
          "type": "number",
          "description": "The percentage of most-likely candidates that the model considers for the next token."
        },
        "maxTokens": {
          "type": "integer",
          "description": "The maximum number of tokens to return in the response."
        },
        "stopSequences": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of strings that define sequences after which the model will stop generating."
        }
      }
    },
    "PromptTemplateConfiguration": {
      "type": "object",
      "properties": {
        "text": {
          "$ref": "#/$defs/TextPromptTemplateConfiguration"
        },
        "chat": {
          "$ref": "#/$defs/ChatPromptTemplateConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "PromptVariant": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the prompt variant."
        },
        "templateType": {
          "type": "string",
          "enum": [
            "TEXT",
            "CHAT"
          ],
          "description": "The type of prompt template to use."
        },
        "templateConfiguration": {
          "$ref": "#/$defs/PromptTemplateConfiguration"
        },
        "modelId": {
          "type": "string",
          "description": "The unique identifier of the model or inference profile with which to run inference on the prompt."
        },
        "inferenceConfiguration": {
          "$ref": "#/$defs/PromptInferenceConfiguration"
        },
        "metadata": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PromptMetadataEntry"
          },
          "description": "An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant."
        },
        "additionalModelRequestFields": {
          "type": "object",
          "description": "Contains model-specific inference configurations that aren't in the inferenceConfiguration field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models."
        },
        "genAiResource": {
          "$ref": "#/$defs/PromptGenAiResource"
        }
      },
      "required": [
        "name",
        "templateType",
        "templateConfiguration"
      ]
    },
    "SpecificToolChoice": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the tool that the model must request."
        }
      },
      "required": [
        "name"
      ]
    },
    "TextPromptTemplateConfiguration": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "The message for the prompt."
        },
        "cachePoint": {
          "$ref": "#/$defs/BedrockAgentCachePointBlock"
        },
        "inputVariables": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PromptInputVariable"
          },
          "description": "An array of the variables in the prompt template."
        }
      },
      "required": [
        "text"
      ]
    },
    "ToolChoice": {
      "type": "object",
      "properties": {
        "auto": {
          "$ref": "#/$defs/AutoToolChoice"
        },
        "any": {
          "$ref": "#/$defs/AnyToolChoice"
        },
        "tool": {
          "$ref": "#/$defs/SpecificToolChoice"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}