Skip to main content
POST
/
v1
/
prompts
/
{slug}
/
render
Render Live Prompt Version
curl --request POST \
  --url http://localhost:3000/v1/prompts/{slug}/render \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "variables": {
    "name": "Alice",
    "count": 5
  }
}
'
{
  "rendered": "Hello, Alice! Count is 5.",
  "version": 1,
  "slug": "my_prompt",
  "tags": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Use an access token retrieved from login (Bearer sess_...) or a programmatic API key (Bearer ak_...).

Path Parameters

slug
string
required

Unique prompt slug.

Body

application/json
variables
object

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

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

Response

Rendered template string

rendered
string
required

Fully parsed template response with variable replacements.

Example:

"Hello, Alice! Count is 5."

version
integer
required

Sequence version number that was executed.

Example:

1

slug
string
required

Unique prompt slug.

Example:

"my_prompt"

tags
string[]
required

List of tag strings assigned to this version.