Launch Week 02 wrapped — explore all five launches

Create Branch

POSThttps://api.confident-ai.com/v1/prompts/{alias}/branches

Creates a new branch with the specified name diverging from the main branch's head commit of your prompt.

POST/v1/prompts/{alias}/branches
curl -X POST "https://api.confident-ai.com/v1/prompts/{alias}/branches" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "branch": "NewBranch"
}'
200
{
  "success": true,
  "data": {
    "name": "NewBranch",
    "id": "br_123456"
  },
  "link": "https://app.confident-ai.com/project/<PROJECT_ID>/prompt-studio/<PROMPT_ID>?branch=NewBranch",
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • aliasstringRequired

    The unique alias of the prompt.

Request body

  • branchstringRequired

    The unique name of the branch to create in the prompt.

Response

  • successboolean

    This is true if the prompt branch was successfully created.

  • dataobject

    Show 2 propertiesHide 2 properties
    • namestring

      This is the name of the newly created prompt branch.

    • idstring

      This is the ID of the newly created prompt branch.

  • linkstring

    This is the URL to the prompt branch on the Confident AI platform.

  • deprecatedboolean

    This is true if this endpoint is deprecated.

Built byConfident AI