POST
/
prompts
/
{promptId}
/
render

Given a prompt ID, variable values, and optionally any hyperparameters, this API returns a JSON object containing the raw prompt template.

Example: Using Prompt Render output in a new request

Authorizations

x-portkey-api-key
string
headerrequired

Path Parameters

promptId
string
required

The unique identifier of the prompt template to render

Body

application/json

Note: Although hyperparameters are shown grouped here (like messages, max_tokens, temperature, etc.), they should only be passed at the root level, alongside 'variables' and 'stream'.

variables
object
required

Variables to substitute in the prompt template

hyperparameters
object

Note: All hyperparameters are optional. Pass them at the root level, and not nested under hyperparameters. Their grouping here is for educational purposes only.

Response

200 - application/json
success
boolean
required

Indicates if the render was successful

data
object
required