Launch Week 02 wrapped — explore all five launches

Push Prompt

POSThttps://api.confident-ai.com/v2/prompts

Creates a new commit for the prompt with the given alias, creating the prompt first when it does not exist. Send text for a text prompt or messages for a messages prompt, not both.

POST/v2/prompts
curl -X POST "https://api.confident-ai.com/v2/prompts" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Hello, {{name}}! How can I help you today?",
  "alias": "greeting",
  "interpolationType": "MUSTACHE",
  "modelSettings": {
    "provider": "OPEN_AI",
    "name": "gpt-4o",
    "temperature": 0.7,
    "maxTokens": 1024,
    "topP": 1,
    "topK": 40,
    "frequencyPenalty": 0,
    "presencePenalty": 0,
    "stopSequence": [
      "\n\nHuman:",
      "###"
    ],
    "reasoningEffort": "MINIMAL",
    "verbosity": "LOW"
  },
  "outputType": "TEXT",
  "outputSchema": {
    "name": "Greeting",
    "fields": [
      {
        "id": "<FIELD-ID>",
        "name": "greeting",
        "type": "OBJECT",
        "required": true,
        "parentId": null
      }
    ]
  },
  "tools": [
    {
      "id": "<TOOL-ID>",
      "name": "get_customer_name",
      "description": "Looks up the customer'\''s name by id.",
      "mode": "ALLOW_ADDITIONAL",
      "structuredSchema": {
        "id": "<STRUCTURED-SCHEMA-ID>",
        "name": "GetCustomerNameInput",
        "fields": [
          {
            "id": "<FIELD-ID>",
            "name": "customerId",
            "description": "The id of the customer to look up.",
            "type": "OBJECT",
            "required": true,
            "parentId": null
          }
        ]
      }
    }
  ],
  "branch": "main"
}'
200
{
  "success": true,
  "data": {
    "promptId": "<PROMPT-ID>",
    "hash": "bab04ce"
  },
  "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.

Request body

  • Push Text Promptobject

    Pushes a commit to a text prompt. interpolationType defaults to FSTRING when omitted.

    Show 8 propertiesHide 8 properties
    • textstringRequired

      The text content of the prompt.

    • aliasstringRequired

      The alias of the prompt, unique within your project. A new prompt is created when no prompt with this alias exists.

    • interpolationTypeenum

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

      Show 5 enum valuesHide 5 enum values
      • MUSTACHE
      • MUSTACHE_WITH_SPACE
      • FSTRING
      • DOLLAR_BRACKETS
      • JINJA
    • modelSettingsobject

      This is the model settings the prompt was authored for.

      Show 11 propertiesHide 11 properties
      • providerenum

        This is the provider of the model.

        Show 18 enum valuesHide 18 enum values
        • OPEN_AI
        • CUSTOM
        • CONFIDENT_AI
        • BEDROCK
        • ANTHROPIC
        • GEMINI
        • X_AI
        • DEEPSEEK
        • MOONSHOT_AI
        • VERTEX_AI
        • AZURE
        • MISTRAL
        • PERPLEXITY
        • OPEN_ROUTER
        • PORTKEY
        • LITE_LLM
        • TRUE_FOUNDRY
        • HUGGING_FACE
      • namestring

        This is the name of the model.

      • temperaturenumber

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

      • maxTokensnumber

        This is the maximum number of tokens to generate.

      • topPnumber

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

      • topKnumber

        This limits sampling to the K most likely tokens at each step.

      • 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, used when outputType is SCHEMA.

      Show 2 propertiesHide 2 properties
      • namestringRequired

        This is the name of the output schema.

      • fieldslist of objectsRequired

        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. Use it as the parentId of nested fields.

        • namestringRequired

          This is the name of the schema field.

        • typeenumRequired

          This is the data type of a schema field.

          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 | null

          This is the id of the parent field for nested structures, or null for a top-level field.

    • toolslist of objects

      This is the list of tools to make available to the prompt.

      Show 5 propertiesHide 5 properties
      • idstring

        This is the id of the tool assigned by Confident AI.

      • namestringRequired

        This is the name of the tool.

      • descriptionstring | null

        This is the description of the tool.

      • modeenumRequired

        This is the mode for your tool input fields, which controls whether fields outside the schema are allowed.

        Show 3 enum valuesHide 3 enum values
        • ALLOW_ADDITIONAL
        • NO_ADDITIONAL
        • STRICT
      • structuredSchemaobjectRequired

        This is the schema for your tool's input.

        Show 3 propertiesHide 3 properties
        • idstring

          This is the id of the schema assigned by Confident AI.

        • namestring | null

          This is the name of the schema.

        • fieldslist of objectsRequired

          This is the array of fields that define the tool's input structure.

          Show 6 propertiesHide 6 properties
          • idstringRequired

            This is the unique identifier for the schema field. Use it as the parentId of nested fields.

          • namestring | null

            This is the name of the schema field.

          • descriptionstring | null

            This is the description of the schema field.

          • typeenumRequired

            This is the data type of a schema field.

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

            This indicates whether the field is required in the input.

          • parentIdstring | null

            This is the id of the parent field for nested structures, or null for a top-level field.

    • branchstring

      The name of the branch to push the new commit to. The branch is created from main when it does not exist yet.

  • OR
  • Push Messages Promptobject

    Pushes a commit to a messages prompt. interpolationType defaults to FSTRING when omitted.

    Show 8 propertiesHide 8 properties
    • messageslist of objectsRequired

      The list of messages that make up the prompt.

      Show 2 propertiesHide 2 properties
      • rolestringRequired

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

      • contentstringRequired

        This is the text content of the message.

    • aliasstringRequired

      The alias of the prompt, unique within your project. A new prompt is created when no prompt with this alias exists.

    • interpolationTypeenum

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

      Show 5 enum valuesHide 5 enum values
      • MUSTACHE
      • MUSTACHE_WITH_SPACE
      • FSTRING
      • DOLLAR_BRACKETS
      • JINJA
    • modelSettingsobject

      This is the model settings the prompt was authored for.

      Show 11 propertiesHide 11 properties
      • providerenum

        This is the provider of the model.

        Show 18 enum valuesHide 18 enum values
        • OPEN_AI
        • CUSTOM
        • CONFIDENT_AI
        • BEDROCK
        • ANTHROPIC
        • GEMINI
        • X_AI
        • DEEPSEEK
        • MOONSHOT_AI
        • VERTEX_AI
        • AZURE
        • MISTRAL
        • PERPLEXITY
        • OPEN_ROUTER
        • PORTKEY
        • LITE_LLM
        • TRUE_FOUNDRY
        • HUGGING_FACE
      • namestring

        This is the name of the model.

      • temperaturenumber

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

      • maxTokensnumber

        This is the maximum number of tokens to generate.

      • topPnumber

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

      • topKnumber

        This limits sampling to the K most likely tokens at each step.

      • 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, used when outputType is SCHEMA.

      Show 2 propertiesHide 2 properties
      • namestringRequired

        This is the name of the output schema.

      • fieldslist of objectsRequired

        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. Use it as the parentId of nested fields.

        • namestringRequired

          This is the name of the schema field.

        • typeenumRequired

          This is the data type of a schema field.

          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 | null

          This is the id of the parent field for nested structures, or null for a top-level field.

    • toolslist of objects

      This is the list of tools to make available to the prompt.

      Show 5 propertiesHide 5 properties
      • idstring

        This is the id of the tool assigned by Confident AI.

      • namestringRequired

        This is the name of the tool.

      • descriptionstring | null

        This is the description of the tool.

      • modeenumRequired

        This is the mode for your tool input fields, which controls whether fields outside the schema are allowed.

        Show 3 enum valuesHide 3 enum values
        • ALLOW_ADDITIONAL
        • NO_ADDITIONAL
        • STRICT
      • structuredSchemaobjectRequired

        This is the schema for your tool's input.

        Show 3 propertiesHide 3 properties
        • idstring

          This is the id of the schema assigned by Confident AI.

        • namestring | null

          This is the name of the schema.

        • fieldslist of objectsRequired

          This is the array of fields that define the tool's input structure.

          Show 6 propertiesHide 6 properties
          • idstringRequired

            This is the unique identifier for the schema field. Use it as the parentId of nested fields.

          • namestring | null

            This is the name of the schema field.

          • descriptionstring | null

            This is the description of the schema field.

          • typeenumRequired

            This is the data type of a schema field.

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

            This indicates whether the field is required in the input.

          • parentIdstring | null

            This is the id of the parent field for nested structures, or null for a top-level field.

    • branchstring

      The name of the branch to push the new commit to. The branch is created from main when it does not exist yet.

Response

Push Prompt succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    Show 2 propertiesHide 2 properties
    • promptIdstring

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

    • hashstring

      This is the hash of the commit created by this push, not to be confused with a version number.

  • linkstring

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

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI