Overview
Use this endpoint to retrieve the contents of a prompt template from a specific project, either by version number or by tag. This is useful if you want to render the prompt locally, inspect its structure, or execute it manually with your own runtime.Endpoint
Query Parameters
| Param | Type | Required | Description |
|---|---|---|---|
projectId | string | ✅ Yes | The UUID of the project |
version | number | ❌ Yes* | The specific version number of the prompt |
tag | string | ❌ Yes* | A named alias like "prod" or "dev" |
⚠️ You must provide eitherversionortag, but not both.
Example Request
Example Response
Validation Logic
If bothversion and tag are provided, the API will return:
Use Cases
- Fetch prompt content for rendering inside your app or chatbot
- Validate prompt structure before executing it
- Preview and compare different versions for auditing
Error Codes
| Code | Meaning |
|---|---|
| 400 | Both version and tag provided |
| 401 | Unauthorized or invalid API key |
| 404 | Project or prompt version/tag not found |
Coming Soon
- Ability to fetch schema alongside prompt
- Support for fetching multiple prompt variants in batch