Launch Week 02 wrapped — explore all five launches

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.

POST/v2/prompts/{promptId}/versions
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"
}'
200
{
  "success": true,
  "data": {
    "version": "00.00.02",
    "hash": "bab04ce"
  },
  "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

  • hashstring

    The 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 main is versioned.

Response

Create Version succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    Show 2 propertiesHide 2 properties
    • versionstring

      The version number generated by Confident AI for the new version. It is always incremental.

    • hashstring

      The hash of the commit that was versioned. This is the hash you passed, or the head of main when you omitted it.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI