Update Prompt

View as Markdown

Update an existing prompt (full replacement of mutable fields).

Path parameters

workspacestringRequired
namestringRequired

Request

This endpoint expects an object.
projectstringOptionalformat: "^[\w\-./]+$"<=255 characters
The URN of the project associated with this prompt.
descriptionstringOptional<=1000 characters
messageslist of objectsOptional
input_variableslist of stringsOptional
toolslist of objectsOptional
tool_choicestring or map from strings to anyOptional
response_formatmap from strings to anyOptional
inference_paramsobjectOptional
Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.
tagslist of stringsOptional

Response

Update an existing prompt
namestringformat: "^[\w\-.]+$"<=255 characters

Name of the entity. Name/workspace combo must be unique across all entities. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots.

workspacestringformat: "^[\w\-.]+$"<=255 characters

The workspace of the entity. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots.

created_atdatetime
The timestamp of model entity creation
updated_atdatetime
The timestamp of the last model entity update
idstring
Unique identifier for the prompt.
projectstringformat: "^[\w\-./]+$"<=255 characters
The URN of the project associated with this entity.
descriptionstring<=1000 characters
Optional description of the prompt.
messageslist of objects
Ordered list of chat messages that make up the prompt.
input_variableslist of strings
Names of the Jinja2 template variables the prompt expects.
toolslist of objects

Optional OpenAI-compatible tool definitions to send with the prompt.

tool_choicestring or map from strings to any

Controls which (if any) tool is called: ‘none’, ‘auto’, ‘required’, or a named-tool object.

response_formatmap from strings to any

Optional OpenAI-compatible response_format, e.g. a json_schema structured-output spec.

inference_paramsobject

Optional default model and sampling parameters (temperature, top_p, max_tokens, …).

tagslist of strings

Optional free-form tags for organizing prompts.

Errors

422
Unprocessable Entity Error