Features
Send Variables
Send Variables
Create your Propmt Template on Portkey UI, define variables, and pass them with this API:
- String Variables
- JSON Variables
Override Prompt Settings
Override Prompt Settings
You can override any model hyperparameter saved in the prompt template by sending its new value at the time of making a request:
Call Specific Prompt Version
Call Specific Prompt Version
Passing the
{promptId} always calls the Published version of your prompt.But, you can also call a specific template version by appending its version number, like {promptId@12}:Version Tags:@latest: Calls the@{NUMBER}(like@12): Calls the specified version numberNo Suffix: Here, Portkey defaults to thePublishedversion
Streaming
Streaming
Prompts API also supports streaming responses, and completely follows the OpenAI schema.
- Set
stream:Trueexplicitly in your request to enable streaming
Authorizations
Path Parameters
The unique identifier of the prompt template to use
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 to substitute in the prompt template
Default: False. Set to True if you want to stream the response
Note: All hyperparameters are optional. Pass them at the root level, and not nested under hyperparameters. Their grouping here is for educational purposes only.
- Chat Completions
- Completions

