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.
curl -X GET "https://api.confident-ai.com/v2/prompts/{promptId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"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_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
promptIdstringRequiredThe unique id of the prompt.
Response
Get Prompt succeeded.
successbooleanIndicates if the request was successful.
dataobjectA prompt's identity and the labels defined on it, without any version content.
Show 4 propertiesHide 4 properties
idstringThis is the unique id of the prompt.
aliasstringThis is the alias of the prompt, which is unique within your project.
typeenumThis 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
TEXTLIST
labelslist of stringsThe labels defined on the prompt, in alphabetical order. Call the label endpoints to see the version each one points at.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.