Launch Week 02 wrapped — explore all five launches

Create Version

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

Creates a new version of the specified or latest commit on your Confident AI project.

POST/v1/prompts/{alias}/versions
curl -X POST "https://api.confident-ai.com/v1/prompts/{alias}/versions" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "hash": "string"
}'
200
{
  "success": true,
  "data": {
    "version": "string",
    "hash": "string"
  },
  "deprecated": true
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • aliasstringRequired

    The unique alias of the prompt.

Request body

  • hashstring

    The hash of the commit you wanna release a new version of. Only commits above the last versioned commit can be released as new versions. If ommited, the most recent commit will be versioned.

Response

  • successboolean

    This is true prompt version was successfully created

  • dataobject

    Show 2 propertiesHide 2 properties
    • versionstring

      The version id generated by Confident AI of the new version you just released, it is always incremental.

    • hashstring

      The hash code of the commit that was just versioned. This is the same hash you pass in request or the hash of the most recent commit on the Confident AI platform.

  • deprecatedboolean

    This is true if this endpoint is deprecated.

Built byConfident AI