v2

latestOpenAPI 3.0.3Apache-2.02026-08-07119359591.9 KB
Prompts

Set labels on a prompt version

Set (replace) all labels on a prompt version. This is an idempotent operation. If a label already exists on another version of the same prompt, it will be moved to this version.

Labels not included in the request will be removed from this version.

<Note>This endpoint is in beta, read more here.</Note>

put/v2/prompt-versions/{version_id}/labels

Path parameters

version_idstring required

A universally unique identifier (base64-encoded opaque string).

Example:RW50aXR5OjEyMzQ1

The unique prompt version identifier (base64)

Request body

labelsstring[] required

Array of label names to set on the version. Replaces all existing labels on this version. Pass an empty array to remove all labels from this version. Labels are unique per prompt — a label can only be assigned to one version at a time. If a label in this array is currently assigned to a different version of the same prompt, it will be moved to this version automatically (no error is raised).

Response

A prompt version object

idstring required

The prompt version ID

prompt_idstring required

The prompt ID this version belongs to

commit_hashstring required

The commit hash of this version

commit_messagestring required

The commit message describing the changes in this version

input_variable_format'F_STRING' | 'MUSTACHE' | 'NONE' required

The format for input variables in the prompt messages. Defaults to F_STRING if not provided.

  • F_STRING: Single curly braces ({variable_name})
  • MUSTACHE: Double curly braces ({{variable_name}})
  • NONE: Deprecated. Treated as F_STRING. Will be removed in a future version.
provider'OPEN_AI' | 'AZURE_OPEN_AI' | 'AWS_BEDROCK' | 'VERTEX_AI' | 'ANTHROPIC' | 'CUSTOM' required

The LLM provider to use

modelstring required

The model to use for the call

created_atstring date-time required

When the version was created

created_by_user_idstring required

The user ID of the user who created this version

labelsstring[]

Label names currently pointing to this version (e.g., "production", "staging"). Labels are case-sensitive.