Create prompt version
Create prompt version
Request
This endpoint expects an object.
name
version
template_structure
Template structure for the prompt: ‘text’ or ‘chat’. Note: This field is only used when creating a new prompt. If a prompt with the given name already exists, this field is ignored and the existing prompt’s template structure is used. Template structure is immutable after prompt creation.
project_id
Project ID. Takes precedence over project_name when both are provided.
project_name
If provided, scopes the prompt to the specified project. Ignored when project_id is provided.
Response
OK
template
id
version unique identifier, generated if absent
prompt_id
commit
version short unique identifier, generated if absent. it must be 8 characters long
version_number
sequential version number in the format v<N>; null for masks
metadata
type
version_type
version type discriminator; defaults to prompt_version
environments
change_description
variables
template_structure
created_at
created_by
environmentDeprecated
Deprecated: use ‘environments’ instead
Errors
400
Bad Request Error
409
Conflict Error
422
Unprocessable Entity Error