v51

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-08-01131107332.8 KB
Versions
AI

Render a prompt template

Renders a prompt template artifact by substituting the provided variables into the template. The artifact must be of type PROMPT_TEMPLATE. Variables are validated against the template's variable schema before rendering.

This operation can fail for the following reasons:

  • No artifact with this artifactId exists (HTTP error 404)
  • No version with this version exists (HTTP error 404)
  • The artifact is not a PROMPT_TEMPLATE (HTTP error 400)
  • Required variables are missing or have invalid types (HTTP error 400)
  • A server error occurred (HTTP error 500)
post/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/render

Request body

variablesobject required

A map of variable names to their values. These will be substituted into the prompt template.

Example request

{
  "variables": {
    "document": "The quick brown fox jumps over the lazy dog.",
    "max_words": 100,
    "style": "concise"
  }
}

Response

The rendered prompt template.

renderedstring required

The rendered prompt with all variables substituted.

groupIdstring

The group ID of the artifact.

artifactIdstring

The artifact ID.

versionstring

The version of the artifact that was rendered.

Example response

{
  "rendered": "Style: concise\nMaximum length: 100 words\nDocument: The quick brown fox jumps over the lazy dog.",
  "groupId": "default",
  "artifactId": "summarization-v1",
  "version": "1.2",
  "validationErrors": []
}