Prompt Versions

Create a Prompt Version

Creates a new version of the prompt template in 'draft' state.

post/v1/prompts/{id}/versions

Path parameters

idstring uuid required

Unique prompt UUID.

Request body

templatestring required
modelstring

Optional provider/model identifier intended to execute this prompt version.

model_paramsobject

Optional provider-specific model parameters. Nested values are supported.

Example request

{
  "template": "Hello, {{.name}}!",
  "model": "anthropic/claude-opus-4-6",
  "model_params": {
    "temperature": 0.7,
    "max_tokens": 1024
  }
}

Response

Version created successfully

Example response

{
  "version": {
    "template": "Hello {{.name}}!",
    "model": "anthropic/claude-opus-4-6",
    "model_params": {
      "temperature": 0.7,
      "max_tokens": 1024,
      "thinking": {
        "type": "enabled",
        "budget_tokens": 512
      }
    }
  }
}

Changes

Changed in 5 of the 18 revisions of this API.110

    • added the new optional request property model

      new-optional-request-property

    • added the new optional request property model_params

      new-optional-request-property

    • added the required property version/model to the response with the 201 status

      response-required-property-added

    • added the required property version/model_params to the response with the 201 status

      response-required-property-added

    • the endpoint scheme security ApiKeyAuth was removed from the API

      api-security-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api tag Prompt Versions added

      api-tag-added

    • api tag Prompts removed

      api-tag-removed

  • 27457b167aec11See the full diff
    • added the new stable enum value to the version/status response property for the response status 201

      response-property-enum-value-added

    • added the required property version/tags to the response with the 201 status

      response-required-property-added

    • api tag Prompts added

      api-tag-added

    • api tag Versions removed

      api-tag-removed