Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Get prompt version by id

GET/v1/private/prompts/versions/{versionId}Get prompt version by id

Get prompt version by id

Parameters

versionIdstring · uuidpathrequired

Responses

200Prompt version resourceapplication/json
objectPromptVersion_Detail
change_descriptionstring
commitstring

version short unique identifier, generated if absent. it must be 8 characters long

pattern ^[a-zA-Z0-9]{8}$

created_atstring · date-time
created_bystring
environmentstring

Deprecated: use 'environments' instead

maxLength 150 · minLength 0 · pattern ^[A-Za-z0-9_-]+$

environmentsarray of string

maxItems 100 · minItems 0 · uniqueItems true

Show child attributes

maxItems 100 · minItems 0 · uniqueItems true

idstring · uuid

version unique identifier, generated if absent

metadataobject
prompt_idstring · uuid
tagsarray of string

uniqueItems true

Show child attributes

uniqueItems true

templatestringrequired

minLength 1

template_structurestring

one of "text", "chat"

typestring

one of "mustache", "jinja2", "python"

variablesarray of string

uniqueItems true

Show child attributes

uniqueItems true

version_numberstring

sequential version number in the format v<N>; null for masks

version_typestring

version type discriminator; defaults to prompt_version

one of "prompt_version", "mask"

Example response
{
  "change_description": "string",
  "commit": "string",
  "created_at": "2026-06-09T00:00:00Z",
  "created_by": "string",
  "environment": "string",
  "environments": [
    "string"
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "metadata": {},
  "prompt_id": "00000000-0000-0000-0000-000000000000",
  "tags": [
    "string"
  ],
  "template": "string",
  "template_structure": "chat",
  "type": "jinja2",
  "variables": [
    "string"
  ],
  "version_number": "string",
  "version_type": "mask"
}
404Not Foundapplication/json
objectErrorMessage_Detail
errorsarray of string
Show child attributes
Example response
{
  "errors": [
    "string"
  ]
}
Documentation menu