Prompt

Creates a new commit for an existing prompt, or creates a new prompt with the given alias otherwise.

post/v1/prompts

Request

Request body

aliasstring required

The unique alias of the prompt.

textstring

The text content of the prompt. Supply this only if you are creating a text-based prompt.

interpolationType'MUSTACHE' | 'MUSTACHE_WITH_SPACE' | 'FSTRING' | 'DOLLAR_BRACKETS'

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

outputType'TEXT' | 'JSON' | 'SCHEMA'

The type of output expected from the prompt.

branchstring

The name of the branch you want to push the new commit to. Defaults to "main" if not specified.

Response

successboolean required

This is true if the prompt was successfully created.

linkstring required

This is the URL to redirect to after the prompt is created.

deprecatedboolean required

This is true if this endpoint is deprecated.

Changes

    • info

      added the new ARRAY enum value to the request property ///

    • info

      added the new ARRAY enum value to the request property /////

    • info

      added the new optional request property