Create Branch
POSThttps://api.confident-ai.com/v2/prompts/{promptId}/branches
Creates a branch of the prompt diverging from the head commit of main.
curl -X POST "https://api.confident-ai.com/v2/prompts/{promptId}/branches" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "experiment"
}'{
"success": true,
"data": {
"id": "<BRANCH-ID>",
"name": "experiment"
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/prompt-studio/<PROMPT-ID>?branch=<BRANCH-NAME>",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
promptIdstringRequiredThe unique id of the prompt.
Request body
namestringRequiredThe name of the branch to create. It diverges from the head commit of
main.
Response
Create Branch succeeded.
successbooleanIndicates if the request was successful.
dataobjectShow 2 propertiesHide 2 properties
idstringThis is the unique id of the prompt branch.
namestringThis is the name of the prompt branch.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.