Last updated
Was this helpful?
Last updated
Was this helpful?
POST /prompts/:id/completions
Creates a completion for the given prompt ID created in Portkey through the Prompts tab.
POST
https://api.portkey.ai/v1/prompts/:id/completions
promptParams (Object): Parameters for the prompt completion request including promptID, variables and optionally any hyperparameters for the completion.
The API expects the prompt ID, prompt variables and optionally any hyperparameters to override for this request. It returns the or object in the unified format which is OpenAI signature compliant.
The prompts.completions.create
method in the provides a way to generate a prompt completion.
id*
String
The prompt ID to use for the completion request.
variables*
Object
The variables mentioned in the prompt template being used
hyperparameters
Multiple
Add any hyperparameters to the request to override the ones set in the prompt definition
stream
boolean
Incrementally stream the response using server-sent events. Defaults to false