Set Prompt Label
(v2)PUT
Points label at a released version of the prompt, creating the label if it is new. A label sits on one version at a time, so this moves it off any version that carried it, and pulls by label return the new version from then on.
curl -X PUT "https://api.confident-ai.com/v2/prompts/{promptId}/labels/{label}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"version": "00.00.02"
}'{
"success": true,
"data": {
"label": "production",
"version": "00.00.02"
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
promptIdstringRequiredThe unique id of the prompt.
labelstringRequiredA label of the prompt, such as
production. A label is unique within the prompt and points at one version at a time.
Request body
versionstringRequiredThe version number the label should point at. The version must already be released; create a version first to release a commit.
Response
Set Prompt Label succeeded.
successbooleanIndicates if the request was successful.
dataobjectA label of a prompt and the version it points at.
Show 2 propertiesHide 2 properties
labelstringThe label, unique within the prompt.
versionstringThe version number the label points at.
deprecatedbooleanIndicates if this endpoint is deprecated.