Get Prompt
AI-generatedSummary
Fetch a prompt template by its name from the LaikaTest API, optionally specifying a version ID and injecting variables into placeholders within the prompt content.
Inputs
- Prompt Name (required) — Name of the prompt template to fetch.
- Version ID — Specific version ID to retrieve (optional).
- Variables — Variables to inject into any {{placeholder}} syntax within the prompt content, provided as key-value pairs.
Output shape
A single record containing the prompt content (string or object depending on prompt type), the prompt type, and the prompt version ID (if available).
If variables are provided, they will be injected into the prompt content at corresponding placeholders using {{key}} syntax. An error is thrown if the API request is unsuccessful.