{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-create-aiprompt-request-schema.json",
  "title": "CreateAIPromptRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-aiprompts-api-openapi.yml#/components/schemas/CreateAIPromptRequest",
  "type": "object",
  "properties": {
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.."
    },
    "assistantId": {
      "type": "string",
      "description": "The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN."
    },
    "name": {
      "type": "string",
      "description": "The name of the AI Prompt."
    },
    "type": {
      "type": "string",
      "description": "The type of this AI Prompt."
    },
    "templateConfiguration": {
      "$ref": "#/$defs/AIPromptTemplateConfiguration"
    },
    "visibilityStatus": {
      "type": "string",
      "description": "The visibility status of the AI Prompt."
    },
    "templateType": {
      "type": "string",
      "description": "The type of the prompt template for this AI Prompt."
    },
    "modelId": {
      "type": "string",
      "description": "The identifier of the model used for this AI Prompt. For information about which models are supported in each Amazon Web Services Region, see Supported models for system/custom prompts."
    },
    "apiFormat": {
      "type": "string",
      "description": "The API Format of the AI Prompt. Recommended values: MESSAGES | TEXT_COMPLETIONS The values ANTHROPIC_CLAUDE_MESSAGES | ANTHROPIC_CLAUDE_TEXT_COMPLETIONS will be deprecated."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags used to organize, track, or control access for this resource."
    },
    "description": {
      "type": "string",
      "description": "The description of the AI Prompt."
    },
    "inferenceConfiguration": {
      "$ref": "#/$defs/AIPromptInferenceConfiguration"
    }
  },
  "required": [
    "assistantId",
    "name",
    "type",
    "templateConfiguration",
    "visibilityStatus",
    "templateType",
    "modelId",
    "apiFormat"
  ],
  "$defs": {
    "AIPromptInferenceConfiguration": {
      "type": "object",
      "properties": {
        "temperature": {
          "type": "number",
          "description": "The temperature setting for controlling randomness in the generated response."
        },
        "topP": {
          "type": "number",
          "description": "The top-P sampling parameter for nucleus sampling."
        },
        "topK": {
          "type": "integer",
          "description": "The top-K sampling parameter for token selection."
        },
        "maxTokensToSample": {
          "type": "integer",
          "description": "The maximum number of tokens to generate in the response."
        }
      }
    },
    "AIPromptTemplateConfiguration": {
      "type": "object",
      "properties": {
        "textFullAIPromptEditTemplateConfiguration": {
          "$ref": "#/$defs/TextFullAIPromptEditTemplateConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "TextFullAIPromptEditTemplateConfiguration": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "The YAML text for the AI Prompt template."
        }
      },
      "required": [
        "text"
      ]
    }
  }
}