v18

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-2112360218.7 KB
Prompt Renders

Render Live Prompt Version

Renders the active 'live' template version of a prompt using supplied variables. The prompt is resolved by slug within the given project, so the same slug may be reused across projects.

post/v1/projects/{projectID}/prompts/{slug}/render

Path parameters

projectIDstring uuid required

The ID of the project the prompt belongs to.

slugstring required

Prompt slug, unique within the project.

Request body

variablesobject

Key-value dictionary of arguments interpolated into the prompt template.

Example request

{
  "variables": {
    "name": "Alice",
    "count": 5
  }
}

Response

Rendered template string

renderedstring required

Fully parsed template response with variable replacements.

versioninteger required

Sequence version number that was executed.

slugstring required

Unique prompt slug.

tagsstring[] required

List of tag strings assigned to this version.

modelstring nullable required

Optional provider/model identifier intended to execute this prompt version.

model_paramsobject nullable required

Optional provider-specific model parameters. Nested values are supported.

Example response

{
  "rendered": "Hello, Alice! Count is 5.",
  "version": 1,
  "slug": "my_prompt",
  "model": "anthropic/claude-opus-4-6",
  "model_params": {
    "temperature": 0.7,
    "max_tokens": 1024
  }
}