Introducing Confident Voice: Watch the Launch Video Now

Get Prompt

(v2)

GET

Retrieves the prompt with the given id: its alias, type and the labels defined on it. To pull its content, use the pull endpoints.

GET/v2/prompts/{promptId}
curl -X GET "https://api.confident-ai.com/v2/prompts/{promptId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "id": "<PROMPT-ID>",
    "alias": "greeting",
    "type": "TEXT",
    "labels": [
      "production",
      "staging"
    ]
  },
  "link": "https://app.confident-ai.com/project/<PROJECT-ID>/prompt-studio/<PROMPT-ID>?branch=main",
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • promptIdstringRequired

    The unique id of the prompt.

Response

Get Prompt succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A prompt's identity and the labels defined on it, without any version content.

    Show 4 propertiesHide 4 properties
    • idstring

      This is the unique id of the prompt.

    • aliasstring

      This is the alias of the prompt, which is unique within your project.

    • typeenum

      This is the type of the prompt, which can be either a simple text or a list of messages.

      Show 2 enum valuesHide 2 enum values
      • TEXT
      • LIST
    • labelslist of strings

      The labels defined on the prompt, in alphabetical order. Call the label endpoints to see the version each one points at.

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI