---
title: "POST /assistants/{assistantId}/aiprompts"
method: POST
path: "/assistants/{assistantId}/aiprompts"
---

# POST /assistants/{assistantId}/aiprompts

`POST /assistants/{assistantId}/aiprompts`

Creates an Amazon Q in Connect AI Prompt.

## Path parameters

- `assistantId` string, required

## Request body

- object
  - `clientToken` string — 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 <a href="http://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>..
  - `name` string, required — The name of the AI Prompt.
  - `type` 'ANSWER_GENERATION' | 'INTENT_LABELING_GENERATION' | 'QUERY_REFORMULATION' | 'SELF_SERVICE_PRE_PROCESSING' | 'SELF_SERVICE_ANSWER_GENERATION' | 'EMAIL_RESPONSE' | 'EMAIL_OVERVIEW' | 'EMAIL_GENERATIVE_ANSWER' | 'EMAIL_QUERY_REFORMULATION' | 'ORCHESTRATION' | 'NOTE_TAKING' | 'CASE_SUMMARIZATION', required — The type of this AI Prompt.
  - `templateConfiguration` object, required — A typed union that specifies the configuration for a prompt template based on its type.
    - `textFullAIPromptEditTemplateConfiguration` object — The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.
      - `text` string, password, required — The YAML text for the AI Prompt template.
  - `visibilityStatus` 'SAVED' | 'PUBLISHED', required — The visibility status of the AI Prompt.
  - `templateType` 'TEXT', required — The type of the prompt template for this AI Prompt.
  - `modelId` string, required — <p>The identifier of the model used for this AI Prompt.</p> <note> <p>For information about which models are supported in each Amazon Web Services Region, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/create-ai-prompts.html#cli-create-aiprompt">Supported models for system/custom prompts</a>.</p> </note>
  - `apiFormat` 'ANTHROPIC_CLAUDE_MESSAGES' | 'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS' | 'MESSAGES' | 'TEXT_COMPLETIONS', required — <p>The API Format of the AI Prompt.</p> <p>Recommended values: <code>MESSAGES | TEXT_COMPLETIONS</code> </p> <note> <p>The values <code>ANTHROPIC_CLAUDE_MESSAGES | ANTHROPIC_CLAUDE_TEXT_COMPLETIONS</code> will be deprecated.</p> </note>
  - `tags` object — The tags used to organize, track, or control access for this resource.
  - `description` string — The description of the AI Prompt.
  - `inferenceConfiguration` object — The configuration for inference parameters when using AI Prompts.
    - `temperature` number, float — The temperature setting for controlling randomness in the generated response.
    - `topP` number, float — The top-P sampling parameter for nucleus sampling.
    - `topK` integer — The top-K sampling parameter for token selection.
    - `maxTokensToSample` integer — The maximum number of tokens to generate in the response.

## Response `200`

Success

- CreateAIPromptResponse
  - `aiPrompt` object — The data of the AI Prompt.
    - `assistantId` string, required — The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
    - `assistantArn` string, required — The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.
    - `aiPromptId` string, required — The identifier of the Amazon Q in Connect AI prompt.
    - `aiPromptArn` string, required — The Amazon Resource Name (ARN) of the AI Prompt.
    - `name` string, required — The name of the AI Prompt
    - `type` 'ANSWER_GENERATION' | 'INTENT_LABELING_GENERATION' | 'QUERY_REFORMULATION' | 'SELF_SERVICE_PRE_PROCESSING' | 'SELF_SERVICE_ANSWER_GENERATION' | 'EMAIL_RESPONSE' | 'EMAIL_OVERVIEW' | 'EMAIL_GENERATIVE_ANSWER' | 'EMAIL_QUERY_REFORMULATION' | 'ORCHESTRATION' | 'NOTE_TAKING' | 'CASE_SUMMARIZATION', required — The type of this AI Prompt.
    - `templateType` 'TEXT', required — The type of the prompt template for this AI Prompt.
    - `modelId` string, required — <p>The identifier of the model used for this AI Prompt. The following model Ids are supported:</p> <ul> <li> <p> <code>anthropic.claude-3-haiku--v1:0</code> </p> </li> <li> <p> <code>apac.amazon.nova-lite-v1:0</code> </p> </li> <li> <p> <code>apac.amazon.nova-micro-v1:0</code> </p> </li> <li> <p> <code>apac.amazon.nova-pro-v1:0</code> </p> </li> <li> <p> <code>apac.anthropic.claude-3-5-sonnet--v2:0</code> </p> </li> <li> <p> <code>apac.anthropic.claude-3-haiku-20240307-v1:0</code> </p> </li> <li> <p> <code>eu.amazon.nova-lite-v1:0</code> </p> </li> <li> <p> <code>eu.amazon.nova-micro-v1:0</code> </p> </li> <li> <p> <code>eu.amazon.nova-pro-v1:0</code> </p> </li> <li> <p> <code>eu.anthropic.claude-3-7-sonnet-20250219-v1:0</code> </p> </li> <li> <p> <code>eu.anthropic.claude-3-haiku-20240307-v1:0</code> </p> </li> <li> <p> <code>us.amazon.nova-lite-v1:0</code> </p> </li> <li> <p> <code>us.amazon.nova-micro-v1:0</code> </p> </li> <li> <p> <code>us.amazon.nova-pro-v1:0</code> </p> </li> <li> <p> <code>us.anthropic.claude-3-5-haiku-20241022-v1:0</code> </p> </li> <li> <p> <code>us.anthropic.claude-3-7-sonnet-20250219-v1:0</code> </p> </li> <li> <p> <code>us.anthropic.claude-3-haiku-20240307-v1:0</code> </p> </li> </ul>
    - `apiFormat` 'ANTHROPIC_CLAUDE_MESSAGES' | 'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS' | 'MESSAGES' | 'TEXT_COMPLETIONS', required — The API format used for this AI Prompt.
    - `templateConfiguration` object, required — The configuration of the prompt template for this AI Prompt.
      - `textFullAIPromptEditTemplateConfiguration` object — The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.
        - `text` string, password, required — The YAML text for the AI Prompt template.
    - `inferenceConfiguration` object — The configuration for inference parameters when using the AI Prompt.
      - `temperature` number, float — The temperature setting for controlling randomness in the generated response.
      - `topP` number, float — The top-P sampling parameter for nucleus sampling.
      - `topK` integer — The top-K sampling parameter for token selection.
      - `maxTokensToSample` integer — The maximum number of tokens to generate in the response.
    - `modifiedTime` string, date-time — The time the AI Prompt was last modified.
    - `description` string — The description of the AI Prompt.
    - `visibilityStatus` 'SAVED' | 'PUBLISHED', required — The visibility status of the AI Prompt.
    - `tags` object — The tags used to organize, track, or control access for this resource.
    - `origin` 'SYSTEM' | 'CUSTOMER' — The origin of the AI Prompt. <code>SYSTEM</code> for a default AI Prompt created by Q in Connect or <code>CUSTOMER</code> for an AI Prompt created by calling AI Prompt creation APIs.
    - `status` 'CREATE_IN_PROGRESS' | 'CREATE_FAILED' | 'ACTIVE' | 'DELETE_IN_PROGRESS' | 'DELETE_FAILED' | 'DELETED' — The status of the AI Prompt.

## Other responses

- `480` — ConflictException
- `481` — ValidationException
- `482` — ServiceQuotaExceededException
- `483` — UnauthorizedException
- `484` — AccessDeniedException
- `485` — ResourceNotFoundException
- `486` — ThrottlingException

---

[API](https://skmtc.net/aws/apis/qconnect.md) · [All operations](https://skmtc.net/aws/apis/qconnect/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/qconnect/versions/833f5de92023/schema)
