Prompt Versions

Update Prompt Version Draft

Updates the draft template code of a specific version. Only versions currently in the 'draft' status may be modified.

put/v1/prompts/{id}/versions/{version}

Path parameters

idstring uuid required

Unique prompt UUID.

versionstring required

Version sequence number (integer) or version tag (string) to update.

Request body

templatestring
modelstring nullable

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

model_paramsobject nullable

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

Example request

{
  "template": "Hello, {{.name}}! Count is {{.count}}.",
  "model": "openai/gpt-4.1-mini",
  "model_params": {
    "temperature": 0.2
  }
}

Response

Version updated 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 6 of the 18 revisions of this API.114

    • the request property model became nullable

      request-property-became-nullable

    • the request property model_params became nullable

      request-property-became-nullable

    • added the new optional request property model

      new-optional-request-property

    • added the new optional request property model_params

      new-optional-request-property

    • the request property template became optional

      request-property-became-optional

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

      response-required-property-added

    • added the required property version/model_params to the response with the 200 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

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

      response-property-enum-value-added

    • for the path request parameter version, the type/format was generalized from integer/ to string/

      request-parameter-type-generalized

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

      response-required-property-added

    • api tag Prompts added

      api-tag-added

    • api tag Versions removed

      api-tag-removed