Launch Week 02 wrapped — explore all five launches

Pull Prompts By Commit

GEThttps://api.confident-ai.com/v1/prompts/{alias}/commits/{hash}

Retrieves a prompt with alias and the specific hash from your Confident AI account.

GET/v1/prompts/{alias}/commits/{hash}
curl -X GET "https://api.confident-ai.com/v1/prompts/{alias}/commits/{hash}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "id": "prv_abc123",
    "version": "00.00.01",
    "label": "my-label",
    "hash": "bab04ce",
    "text": "Hello, {{name}}!",
    "type": "TEXT",
    "interpolationType": "FSTRING",
    "outputType": "TEXT",
    "modelSettings": {
      "provider": "OPEN_AI",
      "name": "gpt-4o",
      "temperature": 0.7
    }
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • aliasstringRequired

    The unique alias of the prompt.

  • hashstringRequired

    The unique hash of the commit.

Query parameters

  • branchstring

    The unique name of a branch.

Response

  • successboolean

    This is true if the prompt was successfully retrieved.

  • dataobject

    Show 12 propertiesHide 12 properties
    • idstring

      This is the id of the prompt version generated by Confident AI, not to be confused with the alias you supplied or version number.

    • versionstring

      The version number of the prompt.

    • hashstring

      This is the commit hash of the prompt pulled

    • labelstring

      The user-defined label for a specific version of the prompt.

    • textstring

      This is the text content of the prompt, which is null if the prompt is a list prompt.

    • messageslist of objects

      This is the list of messages associated with the prompt, which is null if the prompt is a text prompt.

      Show 2 propertiesHide 2 properties
      • rolestring

        This is the role of the message, which can be user, assistant, system, or developer.

      • contentstring

        This is the text content of the message.

    • typeenum

      This is the type of the prompt, which can be either simple text or a list of messages.

      Show 2 enum valuesHide 2 enum values
      • TEXT
      • LIST
    • interpolationTypeenum

      The type of interpolation format used in the prompt to insert dynamic variables.

      Show 4 enum valuesHide 4 enum values
      • MUSTACHE
      • MUSTACHE_WITH_SPACE
      • FSTRING
      • DOLLAR_BRACKETS
    • modelSettingsobject

      This is the model settings for the prompt.

      Show 10 propertiesHide 10 properties
      • providerenum

        This is the model provider for evaluation.

        Show 2 enum valuesHide 2 enum values
        • OPEN_AI
        • ANTHROPIC
      • namestring

        This is the name of the model.

      • temperaturenumber

        This controls randomness in the model's output. Higher values make output more random.

      • maxTokensinteger

        This is the maximum number of tokens to generate.

      • topPnumber

        This controls diversity via nucleus sampling. Lower values focus on more likely tokens.

      • frequencyPenaltynumber

        This is the penalty for tokens based on their frequency in the text so far.

      • presencePenaltynumber

        This is the penalty for tokens based on whether they appear in the text so far.

      • stopSequencelist of strings

        This is the sequences where the model will stop generating further tokens.

      • reasoningEffortenum

        This is the level of reasoning effort for the model.

        Show 4 enum valuesHide 4 enum values
        • MINIMAL
        • LOW
        • MEDIUM
        • HIGH
      • verbosityenum

        This is the verbosity level for model output.

        Show 3 enum valuesHide 3 enum values
        • LOW
        • MEDIUM
        • HIGH
    • outputTypeenum

      The type of output expected from the prompt.

      Show 3 enum valuesHide 3 enum values
      • TEXT
      • JSON
      • SCHEMA
    • outputSchemaobject

      This is the output schema definition when outputType is SCHEMA.

      Show 2 propertiesHide 2 properties
      • namestring

        This is the name of the output schema.

      • fieldslist of objects

        This is the array of fields that define the output schema structure.

        Show 5 propertiesHide 5 properties
        • idstring

          This is the unique identifier for the schema field.

        • namestring

          This is the name of the schema field.

        • typeenum

          This is the data type for schema fields.

          Show 7 enum valuesHide 7 enum values
          • OBJECT
          • ARRAY
          • STRING
          • FLOAT
          • INTEGER
          • BOOLEAN
          • null
        • requiredboolean

          This indicates whether the field is required in the output.

        • parentIdstring

          This is the ID of the parent field for nested structures.

    • toolslist of objects

      Show 5 propertiesHide 5 properties
      • idstring

        This is the unique identifier for the schema field.

      • namestring

        This is the name of the tool

      • descriptionstring

        This is the description of the tool

      • modeenum

        This is the mode for your tool input fields

        Show 3 enum valuesHide 3 enum values
        • STRICT
        • ADDITIONAL
        • NO_ADDITIONAL
      • structuredSchemaobject

        This is the schema for your tool input

        Show 2 propertiesHide 2 properties
        • namestring

          This is the name of the output schema.

        • fieldslist of objects

          This is the array of fields that define the output schema structure.

          Show 5 propertiesHide 5 properties
          • idstring

            This is the unique identifier for the schema field.

          • namestring

            This is the name of the schema field.

          • typeenum

            This is the data type for schema fields.

            Show 7 enum valuesHide 7 enum values
            • OBJECT
            • ARRAY
            • STRING
            • FLOAT
            • INTEGER
            • BOOLEAN
            • null
          • requiredboolean

            This indicates whether the field is required in the output.

          • parentIdstring

            This is the ID of the parent field for nested structures.

  • deprecatedboolean

    This is true if this endpoint is deprecated.

Built byConfident AI