> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt mutations

> Create, edit and delete Prompt Hub prompts, add versions and manage labels. Arguments, return types and a validated example for each of the 6 mutations.

Create, edit and delete Prompt Hub prompts, add versions and manage labels.

For task-oriented walkthroughs of these operations, see the [Prompt guide](/docs/ax/graphql-reference/guides/prompts). Every mutation below is sent as a `POST` to `https://app.arize.com/graphql` with an `x-api-key` header; see [Forming calls](/docs/ax/graphql-reference/overview/how-to-use-graphql/forming-calls).

## Mutations in this page

* [`createPrompt`](#createprompt): Create a new prompt
* [`editPrompt`](#editprompt): Edit an existing prompt
* [`deletePrompt`](#deleteprompt): Delete an existing prompt
* [`createPromptVersion`](#createpromptversion): Create a new prompt version
* [`updatePromptVersionLabel`](#updatepromptversionlabel): update prompt version label.
* [`removePromptVersionLabel`](#removepromptversionlabel): Remove a label from a prompt version

## Reference

### createPrompt

Create a new prompt

`createPrompt(input: CreatePromptMutationInput!): CreatePromptMutationPayload`

#### Arguments

<ParamField body="input" type="CreatePromptMutationInput!" required>
  <Expandable title="CreatePromptMutationInput fields">
    <ParamField body="spaceId" type="ID!" required>
      The space id for the prompt
    </ParamField>

    <ParamField body="name" type="String!" required>
      The name of the prompt
    </ParamField>

    <ParamField body="description" type="String">
      The description of the saved prompt
    </ParamField>

    <ParamField body="tags" type="[String!]">
      Tag names to associate with the prompt. Names that do not already exist in the space are created, which requires TAG\_CREATE. Deprecated: create tags explicitly and use addTagsToPrompt.
    </ParamField>

    <ParamField body="commitMessage" type="String!" required>
      The commit message describing the changes in this version
    </ParamField>

    <ParamField body="inputVariableFormat" type="PromptVersionInputVariableFormatEnum!" required>
      The input variable format for determining prompt variables in the messages One of: `F_STRING`, `MUSTACHE`, `NONE`.
    </ParamField>

    <ParamField body="provider" type="ExternalLLMProvider!" required>
      The provider to use for the call. One of: `openAI`, `azureOpenAI`, `anthropic`, `vertexAI`, `awsBedrock`, `custom`, `nvidiaNim`, `gemini`, `litellm`, `fireworks`, `togetherAi`.
    </ParamField>

    <ParamField body="model" type="String">
      The model to use for the call.
    </ParamField>

    <ParamField body="messages" type="[LLMMessageInput!]!" required>
      The full message to send to the LLM (e.g., a prompt template with all variables filled in).

      <Expandable title="LLMMessageInput fields">
        <ParamField body="role" type="MessageRole!" required>
          The role of the messages author only applicable for chat models One of: `system`, `user`, `assistant`, `tool`.
        </ParamField>

        <ParamField body="content" type="String">
          The content of the message
        </ParamField>

        <ParamField body="imageUrls" type="[String]">
          The image contents of the message as a list of urls
        </ParamField>

        <ParamField body="toolCalls" type="[GeneratedToolInput!]">
          The tool calls generated by the model, such as function calls.

          <Expandable title="GeneratedToolInput fields">
            <ParamField body="id" type="String!" required>
              The id of the tool call.
            </ParamField>

            <ParamField body="type" type="ToolTypeEnum!" required>
              The type of the tool interaction. Supports function and built-in tools (e.g. web\_search). One of: `function`, `web_search`.
            </ParamField>

            <ParamField body="function" type="GeneratedFunctionDetailsInput">
              The function that the model called (only for type=function). Nested `GeneratedFunctionDetailsInput` (same shape as above).
            </ParamField>

            <ParamField body="output" type="JSONObject">
              Optional tool output payload for non-function tools (e.g. web\_search results).
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="toolCallId" type="String">
          The id of the tool call, used to track the tool call in the response
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="invocationParams" type="InvocationParamsInput!" required>
      The params to call the LLM with.

      <Expandable title="InvocationParamsInput fields">
        <ParamField body="temperature" type="Float">
          The sampling temperature for the call, the higher the value the more random the output.
        </ParamField>

        <ParamField body="top_p" type="Float">
          Alternative to sampling temperature, the model considers the results of the tokens with top\_p probability mass. So 0.1 means only the tokens comprising the top 10% mass are considered. Modify this or temperature but not both.
        </ParamField>

        <ParamField body="stop" type="[String!]">
          A list of sequences where the API will stop generating further tokens.
        </ParamField>

        <ParamField body="max_tokens" type="Int">
          The maximum number of tokens to generate. Set to -1 to generate the model's maximum. For custom providers, a value of -1 will generate the default token length.
        </ParamField>

        <ParamField body="max_completion_tokens" type="Int">
          The maximum number of tokens to generate. Set to -1 to generate the model's maximum. For custom providers, a value of -1 will generate the default token length.
        </ParamField>

        <ParamField body="presence_penalty" type="Float">
          The penalty for repeating topics, the higher the value the more likely the llm is to talk about new topics. Must be between -2.0 and 2.0.
        </ParamField>

        <ParamField body="frequency_penalty" type="Float">
          The penalty for frequency of tokens, the higher the value, the less likely the llm is to repeat the same line verbatim. Must be between -2.0 and 2.0
        </ParamField>

        <ParamField body="top_k" type="Int">
          Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding), while a top-K of 3 means that the next token is selected from among the three most probable tokens by using temperature.
        </ParamField>

        <ParamField body="toolConfig" type="ToolConfigInput">
          The tool config to call the LLM with.

          <Expandable title="ToolConfigInput fields">
            <ParamField body="tools" type="[ToolInput!]">
              A list of tools that can be called by the LLM during the chat. Nested `ToolInput` (same shape as above).
            </ParamField>

            <ParamField body="toolChoice" type="ToolChoiceInput">
              Nested `ToolChoiceInput` (same shape as above).
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="response_format" type="ResponseFormatInput">
          The response format configuration for structured outputs from the LLM.

          <Expandable title="ResponseFormatInput fields">
            <ParamField body="type" type="ResponseFormatType">
              The type of response format to use One of: `text`, `json_object`, `json_schema`.
            </ParamField>

            <ParamField body="jsonSchema" type="JsonSchemaInput">
              JSON schema configuration (required when type is json\_schema) Nested `JsonSchemaInput` (same shape as above).
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="thinking_level" type="String">
          Controls how much reasoning the model performs before responding. Supported by Gemini 3.x models. Accepted values: 'low', 'high'.
        </ParamField>

        <ParamField body="thinking_budget" type="Int">
          Maximum tokens the model may use for internal reasoning. Supported by Gemini 2.5 models. Range: 0–24,576 (Flash/Flash-Lite) or 128–32,768 (Pro). Set 0 to disable thinking on Flash models.
        </ParamField>

        <ParamField body="reasoning_effort" type="String">
          Controls how much reasoning the model performs before responding. Supported by OpenAI o-series and GPT-5 models. o-series: 'low' | 'medium' | 'high'. GPT-5: 'none' | 'low' | 'medium' | 'high' | 'xhigh'.
        </ParamField>

        <ParamField body="verbosity" type="String">
          Controls the verbosity of model output. Supported by OpenAI GPT-5 series. Accepted values: 'low' | 'medium' | 'high'.
        </ParamField>

        <ParamField body="service_tier" type="String">
          Processing tier for the request. Supported by OpenAI on the openAI provider only, and only for models eligible for Priority processing. Accepted values: 'auto' | 'priority'. Omit to use the project default.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="providerParams" type="ProviderParamsInput!" required>
      The provider params to use for the call.

      <Expandable title="ProviderParamsInput fields">
        <ParamField body="azureParams" type="AzureOpenAIParams">
          The Azure OpenAI params to use for the call.

          <Expandable title="AzureOpenAIParams fields">
            <ParamField body="azureDeploymentName" type="String!" required>
              The Azure deployment name to use for the call.
            </ParamField>

            <ParamField body="azureOpenAIEndpoint" type="String!" required>
              The Azure OpenAI endpoint to use for the call.
            </ParamField>

            <ParamField body="azureOpenAIVersion" type="String">
              The Azure OpenAI version to use for the call.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="anthropicHeaders" type="AnthropicHeadersInput">
          The headers to send to the via bedrock for the InvokeModel API for Anthropic models. Not used for other providers.

          <Expandable title="AnthropicHeadersInput fields">
            <ParamField body="anthropicBeta" type="[String]">
              The beta version of the Anthropic API to use
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="customProviderParams" type="CustomProviderParams">
          Custom provider params to use for the call.

          <Expandable title="CustomProviderParams fields">
            <ParamField body="customModelEndpoint" type="CustomLlmEndpointInput!" required>
              When connecting to a custom model, the endpoint to use for the call. Nested `CustomLlmEndpointInput` (same shape as above).
            </ParamField>

            <ParamField body="customProviderAPIVersion" type="String">
              The API version to use for the call. Optional for custom models.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="anthropic_version" type="String">
          The version of the Anthropic API to use
        </ParamField>

        <ParamField body="region" type="String">
          The region in which the model is deployed (e.g., us-east-1). Also known as 'location' for Vertex invocations.
        </ParamField>

        <ParamField body="bedrockOptions" type="BedrockOptionsInput">
          The options to use for the Bedrock API.

          <Expandable title="BedrockOptionsInput fields">
            <ParamField body="useConverseEndpoint" type="Boolean">
              Whether to use the converse endpoint for the Bedrock API.
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="integrationId" type="ID">
      The selected named LLM integration id (relay global id). If provided, server will use its configuration.
    </ParamField>

    <ParamField body="id" type="String">
      Unique identifier for this input
    </ParamField>

    <ParamField body="clientMutationId" type="String" />
  </Expandable>
</ParamField>

#### Returns

<ResponseField name="prompt" type="Prompt!">
  <Expandable title="Prompt fields">
    Scalar fields: `id`, `name`, `description`, `tags`, `createdAt`, `updatedAt`, `commitHash`, `commitMessage`, `messages`, `inputVariableFormat`, `toolCalls`, `llmParameters`, `provider`, `modelName`.

    Object fields (select subfields): `tagsConnection`, `webhookSubscriptions`, `versionHistory`, `toolChoice`, `createdBy`, `latestPromptOptimizationTask`.
  </Expandable>
</ResponseField>

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

<CodeGroup>
  ```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  mutation CreatePrompt($input: CreatePromptMutationInput!) {
    createPrompt(input: $input) {
      prompt { id name }
    }
  }
  ```

  ```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  {
    "input": {
      "spaceId": "<ID>",
      "name": "<string>",
      "commitMessage": "<string>",
      "inputVariableFormat": "F_STRING",
      "provider": "openAI",
      "messages": [
        {
          "role": "system"
        }
      ],
      "invocationParams": {},
      "providerParams": {}
    }
  }
  ```
</CodeGroup>

### editPrompt

Edit an existing prompt

`editPrompt(input: EditPromptMutationInput!): EditPromptMutationPayload`

#### Arguments

<ParamField body="input" type="EditPromptMutationInput!" required>
  <Expandable title="EditPromptMutationInput fields">
    <ParamField body="promptId" type="ID!" required>
      The prompt id to edit
    </ParamField>

    <ParamField body="spaceId" type="ID!" required>
      The space id for the prompt
    </ParamField>

    <ParamField body="name" type="String!" required>
      The name of the prompt
    </ParamField>

    <ParamField body="description" type="String">
      The description of the saved prompt
    </ParamField>

    <ParamField body="clientMutationId" type="String" />
  </Expandable>
</ParamField>

#### Returns

<ResponseField name="prompt" type="Prompt!">
  <Expandable title="Prompt fields">
    Scalar fields: `id`, `name`, `description`, `tags`, `createdAt`, `updatedAt`, `commitHash`, `commitMessage`, `messages`, `inputVariableFormat`, `toolCalls`, `llmParameters`, `provider`, `modelName`.

    Object fields (select subfields): `tagsConnection`, `webhookSubscriptions`, `versionHistory`, `toolChoice`, `createdBy`, `latestPromptOptimizationTask`.
  </Expandable>
</ResponseField>

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

<CodeGroup>
  ```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  mutation EditPrompt($input: EditPromptMutationInput!) {
    editPrompt(input: $input) {
      prompt { id name }
    }
  }
  ```

  ```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  {
    "input": {
      "promptId": "<ID>",
      "spaceId": "<ID>",
      "name": "<string>"
    }
  }
  ```
</CodeGroup>

### deletePrompt

Delete an existing prompt

`deletePrompt(input: DeletePromptMutationInput!): DeletePromptMutationPayload`

#### Arguments

<ParamField body="input" type="DeletePromptMutationInput!" required>
  <Expandable title="DeletePromptMutationInput fields">
    <ParamField body="promptId" type="ID!" required>
      The prompt id to delete
    </ParamField>

    <ParamField body="spaceId" type="ID!" required>
      The space id for the prompt
    </ParamField>

    <ParamField body="clientMutationId" type="String" />
  </Expandable>
</ParamField>

#### Returns

<ResponseField name="success" type="Boolean!">
  Indicates whether the prompt was deleted
</ResponseField>

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

<CodeGroup>
  ```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  mutation DeletePrompt($input: DeletePromptMutationInput!) {
    deletePrompt(input: $input) {
      success
    }
  }
  ```

  ```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  {
    "input": {
      "promptId": "<ID>",
      "spaceId": "<ID>"
    }
  }
  ```
</CodeGroup>

### createPromptVersion

Create a new prompt version

`createPromptVersion(input: CreatePromptVersionMutationInput!): CreatePromptVersionMutationPayload`

#### Arguments

<ParamField body="input" type="CreatePromptVersionMutationInput!" required>
  <Expandable title="CreatePromptVersionMutationInput fields">
    <ParamField body="spaceId" type="ID!" required>
      The space ID for the prompt
    </ParamField>

    <ParamField body="promptId" type="ID!" required>
      The prompt ID in which the version will be created
    </ParamField>

    <ParamField body="commitMessage" type="String!" required>
      The commit message describing the changes in this version
    </ParamField>

    <ParamField body="inputVariableFormat" type="PromptVersionInputVariableFormatEnum!" required>
      The input variable format for determining prompt variables in the messages One of: `F_STRING`, `MUSTACHE`, `NONE`.
    </ParamField>

    <ParamField body="provider" type="ExternalLLMProvider!" required>
      The provider to use for the call. One of: `openAI`, `azureOpenAI`, `anthropic`, `vertexAI`, `awsBedrock`, `custom`, `nvidiaNim`, `gemini`, `litellm`, `fireworks`, `togetherAi`.
    </ParamField>

    <ParamField body="model" type="String">
      The model to use for the call.
    </ParamField>

    <ParamField body="messages" type="[LLMMessageInput!]!" required>
      The full message to send to the LLM (e.g., a prompt template with all variables filled in).

      <Expandable title="LLMMessageInput fields">
        <ParamField body="role" type="MessageRole!" required>
          The role of the messages author only applicable for chat models One of: `system`, `user`, `assistant`, `tool`.
        </ParamField>

        <ParamField body="content" type="String">
          The content of the message
        </ParamField>

        <ParamField body="imageUrls" type="[String]">
          The image contents of the message as a list of urls
        </ParamField>

        <ParamField body="toolCalls" type="[GeneratedToolInput!]">
          The tool calls generated by the model, such as function calls.

          <Expandable title="GeneratedToolInput fields">
            <ParamField body="id" type="String!" required>
              The id of the tool call.
            </ParamField>

            <ParamField body="type" type="ToolTypeEnum!" required>
              The type of the tool interaction. Supports function and built-in tools (e.g. web\_search). One of: `function`, `web_search`.
            </ParamField>

            <ParamField body="function" type="GeneratedFunctionDetailsInput">
              The function that the model called (only for type=function). Nested `GeneratedFunctionDetailsInput` (same shape as above).
            </ParamField>

            <ParamField body="output" type="JSONObject">
              Optional tool output payload for non-function tools (e.g. web\_search results).
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="toolCallId" type="String">
          The id of the tool call, used to track the tool call in the response
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="invocationParams" type="InvocationParamsInput!" required>
      The params to call the LLM with.

      <Expandable title="InvocationParamsInput fields">
        <ParamField body="temperature" type="Float">
          The sampling temperature for the call, the higher the value the more random the output.
        </ParamField>

        <ParamField body="top_p" type="Float">
          Alternative to sampling temperature, the model considers the results of the tokens with top\_p probability mass. So 0.1 means only the tokens comprising the top 10% mass are considered. Modify this or temperature but not both.
        </ParamField>

        <ParamField body="stop" type="[String!]">
          A list of sequences where the API will stop generating further tokens.
        </ParamField>

        <ParamField body="max_tokens" type="Int">
          The maximum number of tokens to generate. Set to -1 to generate the model's maximum. For custom providers, a value of -1 will generate the default token length.
        </ParamField>

        <ParamField body="max_completion_tokens" type="Int">
          The maximum number of tokens to generate. Set to -1 to generate the model's maximum. For custom providers, a value of -1 will generate the default token length.
        </ParamField>

        <ParamField body="presence_penalty" type="Float">
          The penalty for repeating topics, the higher the value the more likely the llm is to talk about new topics. Must be between -2.0 and 2.0.
        </ParamField>

        <ParamField body="frequency_penalty" type="Float">
          The penalty for frequency of tokens, the higher the value, the less likely the llm is to repeat the same line verbatim. Must be between -2.0 and 2.0
        </ParamField>

        <ParamField body="top_k" type="Int">
          Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding), while a top-K of 3 means that the next token is selected from among the three most probable tokens by using temperature.
        </ParamField>

        <ParamField body="toolConfig" type="ToolConfigInput">
          The tool config to call the LLM with.

          <Expandable title="ToolConfigInput fields">
            <ParamField body="tools" type="[ToolInput!]">
              A list of tools that can be called by the LLM during the chat. Nested `ToolInput` (same shape as above).
            </ParamField>

            <ParamField body="toolChoice" type="ToolChoiceInput">
              Nested `ToolChoiceInput` (same shape as above).
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="response_format" type="ResponseFormatInput">
          The response format configuration for structured outputs from the LLM.

          <Expandable title="ResponseFormatInput fields">
            <ParamField body="type" type="ResponseFormatType">
              The type of response format to use One of: `text`, `json_object`, `json_schema`.
            </ParamField>

            <ParamField body="jsonSchema" type="JsonSchemaInput">
              JSON schema configuration (required when type is json\_schema) Nested `JsonSchemaInput` (same shape as above).
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="thinking_level" type="String">
          Controls how much reasoning the model performs before responding. Supported by Gemini 3.x models. Accepted values: 'low', 'high'.
        </ParamField>

        <ParamField body="thinking_budget" type="Int">
          Maximum tokens the model may use for internal reasoning. Supported by Gemini 2.5 models. Range: 0–24,576 (Flash/Flash-Lite) or 128–32,768 (Pro). Set 0 to disable thinking on Flash models.
        </ParamField>

        <ParamField body="reasoning_effort" type="String">
          Controls how much reasoning the model performs before responding. Supported by OpenAI o-series and GPT-5 models. o-series: 'low' | 'medium' | 'high'. GPT-5: 'none' | 'low' | 'medium' | 'high' | 'xhigh'.
        </ParamField>

        <ParamField body="verbosity" type="String">
          Controls the verbosity of model output. Supported by OpenAI GPT-5 series. Accepted values: 'low' | 'medium' | 'high'.
        </ParamField>

        <ParamField body="service_tier" type="String">
          Processing tier for the request. Supported by OpenAI on the openAI provider only, and only for models eligible for Priority processing. Accepted values: 'auto' | 'priority'. Omit to use the project default.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="providerParams" type="ProviderParamsInput!" required>
      The provider params to use for the call.

      <Expandable title="ProviderParamsInput fields">
        <ParamField body="azureParams" type="AzureOpenAIParams">
          The Azure OpenAI params to use for the call.

          <Expandable title="AzureOpenAIParams fields">
            <ParamField body="azureDeploymentName" type="String!" required>
              The Azure deployment name to use for the call.
            </ParamField>

            <ParamField body="azureOpenAIEndpoint" type="String!" required>
              The Azure OpenAI endpoint to use for the call.
            </ParamField>

            <ParamField body="azureOpenAIVersion" type="String">
              The Azure OpenAI version to use for the call.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="anthropicHeaders" type="AnthropicHeadersInput">
          The headers to send to the via bedrock for the InvokeModel API for Anthropic models. Not used for other providers.

          <Expandable title="AnthropicHeadersInput fields">
            <ParamField body="anthropicBeta" type="[String]">
              The beta version of the Anthropic API to use
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="customProviderParams" type="CustomProviderParams">
          Custom provider params to use for the call.

          <Expandable title="CustomProviderParams fields">
            <ParamField body="customModelEndpoint" type="CustomLlmEndpointInput!" required>
              When connecting to a custom model, the endpoint to use for the call. Nested `CustomLlmEndpointInput` (same shape as above).
            </ParamField>

            <ParamField body="customProviderAPIVersion" type="String">
              The API version to use for the call. Optional for custom models.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="anthropic_version" type="String">
          The version of the Anthropic API to use
        </ParamField>

        <ParamField body="region" type="String">
          The region in which the model is deployed (e.g., us-east-1). Also known as 'location' for Vertex invocations.
        </ParamField>

        <ParamField body="bedrockOptions" type="BedrockOptionsInput">
          The options to use for the Bedrock API.

          <Expandable title="BedrockOptionsInput fields">
            <ParamField body="useConverseEndpoint" type="Boolean">
              Whether to use the converse endpoint for the Bedrock API.
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="integrationId" type="ID">
      The selected named LLM integration id (relay global id). If provided, server will use its configuration.
    </ParamField>

    <ParamField body="id" type="String">
      Unique identifier for this input
    </ParamField>

    <ParamField body="clientMutationId" type="String" />
  </Expandable>
</ParamField>

#### Returns

<ResponseField name="promptVersion" type="PromptVersion!">
  <Expandable title="PromptVersion fields">
    Scalar fields: `id`, `createdAt`, `commitHash`, `commitMessage`, `messages`, `inputVariableFormat`, `toolCalls`, `llmParameters`, `provider`, `modelName`, `labels`, `promptName`, `versionNumber`.

    Object fields (select subfields): `toolChoice`, `createdBy`, `providerParameters`, `integration`.
  </Expandable>
</ResponseField>

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

<CodeGroup>
  ```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  mutation CreatePromptVersion($input: CreatePromptVersionMutationInput!) {
    createPromptVersion(input: $input) {
      promptVersion { id }
    }
  }
  ```

  ```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  {
    "input": {
      "spaceId": "<ID>",
      "promptId": "<ID>",
      "commitMessage": "<string>",
      "inputVariableFormat": "F_STRING",
      "provider": "openAI",
      "messages": [
        {
          "role": "system"
        }
      ],
      "invocationParams": {},
      "providerParams": {}
    }
  }
  ```
</CodeGroup>

### updatePromptVersionLabel

update prompt version label.

`updatePromptVersionLabel(input: updatePromptVersionLabelMutationInput!): updatePromptVersionLabelMutationPayload`

#### Arguments

<ParamField body="input" type="updatePromptVersionLabelMutationInput!" required>
  <Expandable title="updatePromptVersionLabelMutationInput fields">
    <ParamField body="spaceId" type="ID!" required>
      The ID of the space
    </ParamField>

    <ParamField body="versionId" type="ID!" required>
      the prompt version ID we wish to add a label to.
    </ParamField>

    <ParamField body="name" type="String!" required>
      the label we wish to attach to the version ID
    </ParamField>

    <ParamField body="clientMutationId" type="String" />
  </Expandable>
</ParamField>

#### Returns

<ResponseField name="prompt" type="Prompt!">
  <Expandable title="Prompt fields">
    Scalar fields: `id`, `name`, `description`, `tags`, `createdAt`, `updatedAt`, `commitHash`, `commitMessage`, `messages`, `inputVariableFormat`, `toolCalls`, `llmParameters`, `provider`, `modelName`.

    Object fields (select subfields): `tagsConnection`, `webhookSubscriptions`, `versionHistory`, `toolChoice`, `createdBy`, `latestPromptOptimizationTask`.
  </Expandable>
</ResponseField>

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

<CodeGroup>
  ```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  mutation UpdatePromptVersionLabel($input: updatePromptVersionLabelMutationInput!) {
    updatePromptVersionLabel(input: $input) {
      prompt { id name }
    }
  }
  ```

  ```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  {
    "input": {
      "spaceId": "<ID>",
      "versionId": "<ID>",
      "name": "<string>"
    }
  }
  ```
</CodeGroup>

### removePromptVersionLabel

Remove a label from a prompt version

`removePromptVersionLabel(input: removePromptVersionLabelMutationInput!): removePromptVersionLabelMutationPayload`

#### Arguments

<ParamField body="input" type="removePromptVersionLabelMutationInput!" required>
  <Expandable title="removePromptVersionLabelMutationInput fields">
    <ParamField body="spaceId" type="ID!" required>
      The ID of the space
    </ParamField>

    <ParamField body="promptVersionId" type="ID!" required>
      The prompt version ID from which to remove the label
    </ParamField>

    <ParamField body="name" type="String!" required>
      The label to remove from the version
    </ParamField>

    <ParamField body="clientMutationId" type="String" />
  </Expandable>
</ParamField>

#### Returns

<ResponseField name="prompt" type="Prompt!">
  <Expandable title="Prompt fields">
    Scalar fields: `id`, `name`, `description`, `tags`, `createdAt`, `updatedAt`, `commitHash`, `commitMessage`, `messages`, `inputVariableFormat`, `toolCalls`, `llmParameters`, `provider`, `modelName`.

    Object fields (select subfields): `tagsConnection`, `webhookSubscriptions`, `versionHistory`, `toolChoice`, `createdBy`, `latestPromptOptimizationTask`.
  </Expandable>
</ResponseField>

#### Example

Only required input fields are shown. Replace `<ID>` and `<string>` placeholders with real values; the [object graph](/docs/ax/graphql-reference/queries/object-graph) page shows how to look IDs up.

<CodeGroup>
  ```graphql Mutation theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  mutation RemovePromptVersionLabel($input: removePromptVersionLabelMutationInput!) {
    removePromptVersionLabel(input: $input) {
      prompt { id name }
    }
  }
  ```

  ```json Variables theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  {
    "input": {
      "spaceId": "<ID>",
      "promptVersionId": "<ID>",
      "name": "<string>"
    }
  }
  ```
</CodeGroup>
