Create Version
POSThttps://api.confident-ai.com/v2/prompts/{promptId}/versions
Releases a commit as a new version of the prompt. Versions the commit with the given hash, or the head commit of main when no hash is given.
curl -X POST "https://api.confident-ai.com/v2/prompts/{promptId}/versions" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"hash": "bab04ce"
}'{
"success": true,
"data": {
"version": "00.00.02",
"hash": "bab04ce"
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
promptIdstringRequiredThe unique id of the prompt.
Request body
hashstringThe hash of the commit to release as a new version. Only commits newer than the last versioned commit can be released. When omitted, the head commit of
mainis versioned.
Response
Create Version succeeded.
successbooleanIndicates if the request was successful.
dataobjectShow 2 propertiesHide 2 properties
versionstringThe version number generated by Confident AI for the new version. It is always incremental.
hashstringThe hash of the commit that was versioned. This is the hash you passed, or the head of
mainwhen you omitted it.
deprecatedbooleanIndicates if this endpoint is deprecated.