---
title: "Create Global Prompt Template Version"
method: POST
path: "/templates/{template_id}/versions"
tags: ["prompts"]
---

# Create Global Prompt Template Version

`POST /templates/{template_id}/versions`

Create a prompt template version for a given prompt template.

Parameters
----------
template_id : UUID4
    Prompt template ID.
base_prompt_template_version : BasePromptTemplateVersion
    Version details to create.

Returns
-------
BasePromptTemplateVersionResponse
    Response with details about the created prompt template version.

## Path parameters

- `template_id` string, uuid4, required

## Request body

- BasePromptTemplateVersion
  - `template` union, required
    - string
    - GalileoCoreSchemasSharedMessageMessage[]
      - `content` union, required
        - string
        - union[]
          - union
            - TextContentPart — A text segment within a message.
              - …
            - FileContentPart — Reference to a file associated with this message. The file_id can be resolved via the ``files`` dict returned on trace/span detail responses, which contains metadata such as modality, MIME type, and a presigned download URL.
              - …
      - `role` union, required
        - string
        - 'agent' | 'assistant' | 'function' | 'system' | 'tool' | 'user'
  - `raw` boolean
  - `version` integer, nullable
  - `settings` PromptRunSettingsInput — Prompt run settings.
    - `logprobs` boolean
    - `top_logprobs` integer
    - `echo` boolean
    - `n` integer
    - `reasoning_effort` string
    - `verbosity` string
    - `deployment_name` string, nullable
    - `model_alias` string
    - `temperature` number, nullable
    - `max_tokens` integer
    - `stop_sequences` string[], nullable
    - `top_p` number
    - `top_k` integer
    - `frequency_penalty` number
    - `presence_penalty` number
    - `tools` object[], nullable
    - `tool_choice` union
      - string
      - OpenAIToolChoice
        - `type` string
        - `function` OpenAIFunction, required
          - `name` string, required
    - `response_format` object, nullable
    - `known_models` Model[]
      - `name` string, required
      - `alias` string, required
      - `integration` 'anthropic' | 'aws_bedrock' | 'aws_sagemaker' | 'azure' | 'custom' | 'databricks' | 'mistral' | 'nvidia' | 'openai' | 'vegas_gateway' | 'vertex_ai' | 'writer'
      - `lifecycle_state` 'active' | 'deprecated' | 'retired'
      - `replacement_alias` string, nullable
      - `deprecation_date` string, date, nullable
      - `retirement_date` string, date, nullable
      - `user_role` string, nullable
      - `assistant_role` string, nullable
      - `system_supported` boolean
      - `input_modalities` ContentModality[] — Input modalities that the model can accept.
      - `alternative_names` string[] — Alternative names for the model, used for matching with various current, versioned or legacy names.
      - `input_token_limit` integer, nullable
      - `output_token_limit` integer, nullable
      - `token_limit` integer, nullable
      - `cost_by` 'tokens' | 'characters'
      - `is_chat` boolean
      - `provides_log_probs` boolean
      - `formatting_tokens` integer
      - `response_prefix_tokens` integer
      - `api_version` string, nullable
      - `legacy_mistral_prompt_format` boolean
      - `requires_max_tokens` boolean
      - `max_top_p` number, nullable
      - `params_map` RunParamsMap — Maps the internal settings parameters (left) to the serialized parameters (right) we want to send in the API requests.
        - `model` string, nullable
        - `temperature` string, nullable
        - `max_tokens` string, nullable
        - `stop_sequences` string, nullable
        - `top_p` string, nullable
        - `top_k` string, nullable
        - `frequency_penalty` string, nullable
        - `presence_penalty` string, nullable
        - `echo` string, nullable
        - `logprobs` string, nullable
        - `top_logprobs` string, nullable
        - `n` string, nullable
        - `api_version` string, nullable
        - `tools` string, nullable
        - `tool_choice` string, nullable
        - `response_format` string, nullable
        - `reasoning_effort` string, nullable
        - `verbosity` string, nullable
        - `deployment_name` string, nullable
      - `output_map` OutputMap
        - `response` string, required
        - `token_count` string, nullable
        - `input_token_count` string, nullable
        - `output_token_count` string, nullable
        - `completion_reason` string, nullable
      - `input_map` InputMap
        - `prompt` string, required
        - `prefix` string
        - `suffix` string
  - `output_type` string, nullable

## Response `200`

Successful Response

- BasePromptTemplateVersionResponse — Base response from API for a prompt template version.
  - `template` union, required
    - string
    - GalileoCoreSchemasSharedMessageMessage[]
      - `content` union, required
        - string
        - union[]
          - union
            - TextContentPart — A text segment within a message.
              - …
            - FileContentPart — Reference to a file associated with this message. The file_id can be resolved via the ``files`` dict returned on trace/span detail responses, which contains metadata such as modality, MIME type, and a presigned download URL.
              - …
      - `role` union, required
        - string
        - 'agent' | 'assistant' | 'function' | 'system' | 'tool' | 'user'
  - `raw` boolean
  - `version` integer, required
  - `settings` PromptRunSettingsOutput, required — Prompt run settings.
    - `logprobs` boolean
    - `top_logprobs` integer
    - `echo` boolean
    - `n` integer
    - `reasoning_effort` string
    - `verbosity` string
    - `deployment_name` string, nullable
    - `model_alias` string
    - `temperature` number, nullable
    - `max_tokens` integer
    - `stop_sequences` string[], nullable
    - `top_p` number
    - `top_k` integer
    - `frequency_penalty` number
    - `presence_penalty` number
    - `tools` string
    - `tool_choice` union
      - string
      - OpenAIToolChoice
        - `type` string
        - `function` OpenAIFunction, required
          - `name` string, required
    - `response_format` object, nullable
  - `output_type` string, nullable
  - `id` string, uuid4, required
  - `model_changed` boolean, required
  - `lines_added` integer
  - `lines_edited` integer
  - `lines_removed` integer
  - `settings_changed` boolean, required
  - `content_changed` boolean, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `created_by_user` UserInfo, required — A user's basic information, used for display purposes.
    - `id` string, uuid4, required
    - `email` string, required
    - `first_name` string, nullable
    - `last_name` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/galileo/apis/galileo-api-server.md) · [All operations](https://skmtc.net/galileo/apis/galileo-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/galileo/galileo-api-server/revisions/ec2affc66693/schema)
