Introducing Confident Voice: Watch the Launch Video Now

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.

PUT/v2/prompts/{promptId}/labels/{label}
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"
}'
200
{
  "success": true,
  "data": {
    "label": "production",
    "version": "00.00.02"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • promptIdstringRequired

    The unique id of the prompt.

  • labelstringRequired

    A label of the prompt, such as production. A label is unique within the prompt and points at one version at a time.

Request body

  • versionstringRequired

    The 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.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A label of a prompt and the version it points at.

    Show 2 propertiesHide 2 properties
    • labelstring

      The label, unique within the prompt.

    • versionstring

      The version number the label points at.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI