Pull Prompts By Commit
GEThttps://api.confident-ai.com/v1/prompts/{alias}/commits/{hash}
Retrieves a prompt with alias and the specific hash from your Confident AI account.
curl -X GET "https://api.confident-ai.com/v1/prompts/{alias}/commits/{hash}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"id": "prv_abc123",
"version": "00.00.01",
"label": "my-label",
"hash": "bab04ce",
"text": "Hello, {{name}}!",
"type": "TEXT",
"interpolationType": "FSTRING",
"outputType": "TEXT",
"modelSettings": {
"provider": "OPEN_AI",
"name": "gpt-4o",
"temperature": 0.7
}
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
aliasstringRequiredThe unique alias of the prompt.
hashstringRequiredThe unique hash of the commit.
Query parameters
branchstringThe unique name of a branch.
Response
successbooleanThis is true if the prompt was successfully retrieved.
dataobjectShow 12 propertiesHide 12 properties
idstringThis is the id of the prompt version generated by Confident AI, not to be confused with the alias you supplied or version number.
versionstringThe version number of the prompt.
hashstringThis is the commit hash of the prompt pulled
labelstringThe user-defined label for a specific version of the prompt.
textstringThis is the text content of the prompt, which is null if the prompt is a list prompt.
messageslist of objectsThis is the list of messages associated with the prompt, which is null if the prompt is a text prompt.
Show 2 propertiesHide 2 properties
rolestringThis is the role of the message, which can be user, assistant, system, or developer.
contentstringThis is the text content of the message.
typeenumThis is the type of the prompt, which can be either simple text or a list of messages.
Show 2 enum valuesHide 2 enum values
TEXTLIST
interpolationTypeenumThe type of interpolation format used in the prompt to insert dynamic variables.
Show 4 enum valuesHide 4 enum values
MUSTACHEMUSTACHE_WITH_SPACEFSTRINGDOLLAR_BRACKETS
modelSettingsobjectThis is the model settings for the prompt.
Show 10 propertiesHide 10 properties
providerenumThis is the model provider for evaluation.
Show 2 enum valuesHide 2 enum values
OPEN_AIANTHROPIC
namestringThis is the name of the model.
temperaturenumberThis controls randomness in the model's output. Higher values make output more random.
maxTokensintegerThis is the maximum number of tokens to generate.
topPnumberThis controls diversity via nucleus sampling. Lower values focus on more likely tokens.
frequencyPenaltynumberThis is the penalty for tokens based on their frequency in the text so far.
presencePenaltynumberThis is the penalty for tokens based on whether they appear in the text so far.
stopSequencelist of stringsThis is the sequences where the model will stop generating further tokens.
reasoningEffortenumThis is the level of reasoning effort for the model.
Show 4 enum valuesHide 4 enum values
MINIMALLOWMEDIUMHIGH
verbosityenumThis is the verbosity level for model output.
Show 3 enum valuesHide 3 enum values
LOWMEDIUMHIGH
outputTypeenumThe type of output expected from the prompt.
Show 3 enum valuesHide 3 enum values
TEXTJSONSCHEMA
outputSchemaobjectThis is the output schema definition when outputType is SCHEMA.
Show 2 propertiesHide 2 properties
namestringThis is the name of the output schema.
fieldslist of objectsThis is the array of fields that define the output schema structure.
Show 5 propertiesHide 5 properties
idstringThis is the unique identifier for the schema field.
namestringThis is the name of the schema field.
typeenumThis is the data type for schema fields.
Show 7 enum valuesHide 7 enum values
OBJECTARRAYSTRINGFLOATINTEGERBOOLEANnull
requiredbooleanThis indicates whether the field is required in the output.
parentIdstringThis is the ID of the parent field for nested structures.
toolslist of objectsShow 5 propertiesHide 5 properties
idstringThis is the unique identifier for the schema field.
namestringThis is the name of the tool
descriptionstringThis is the description of the tool
modeenumThis is the mode for your tool input fields
Show 3 enum valuesHide 3 enum values
STRICTADDITIONALNO_ADDITIONAL
structuredSchemaobjectThis is the schema for your tool input
Show 2 propertiesHide 2 properties
namestringThis is the name of the output schema.
fieldslist of objectsThis is the array of fields that define the output schema structure.
Show 5 propertiesHide 5 properties
idstringThis is the unique identifier for the schema field.
namestringThis is the name of the schema field.
typeenumThis is the data type for schema fields.
Show 7 enum valuesHide 7 enum values
OBJECTARRAYSTRINGFLOATINTEGERBOOLEANnull
requiredbooleanThis indicates whether the field is required in the output.
parentIdstringThis is the ID of the parent field for nested structures.
deprecatedbooleanThis is true if this endpoint is deprecated.