Launch Week 02 wrapped — explore all five launches

Create Branch

POSThttps://api.confident-ai.com/v2/prompts/{promptId}/branches

Creates a branch of the prompt diverging from the head commit of main.

POST/v2/prompts/{promptId}/branches
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"
}'
200
{
  "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_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • promptIdstringRequired

    The unique id of the prompt.

Request body

  • namestringRequired

    The name of the branch to create. It diverges from the head commit of main.

Response

Create Branch succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    Show 2 propertiesHide 2 properties
    • idstring

      This is the unique id of the prompt branch.

    • namestring

      This is the name of the prompt branch.

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI