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
Example request
{
"variables": {
"document": "The quick brown fox jumps over the lazy dog.",
"max_words": 100,
"style": "concise"
}
}Response
The rendered prompt template.
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": []
}