Get detailed information about a prompt, including its variables and available versions.
const { value } = await basalt.prompt.describe('my-prompt-slug')
// Using object syntax const { value } = await basalt.prompt.describe({ slug: 'welcome-message', version: '1.0.0' }) // Using parameter syntax const { value } = await basalt.prompt.describe('welcome-message', { version: '1.0.0' })
production
// Using object syntax const { value } = await basalt.prompt.describe({ slug: 'welcome-message', tag: 'staging' }) // Using parameter syntax const { value } = await basalt.prompt.describe('welcome-message', { tag: 'staging' })
interface PromptDetailResponse { slug?: string; status: 'live' | 'draft'; name: string; description?: string; availableVersions: string[]; availableTags: string[]; variables: { label: string; description?: string; type: string; }[]; version: string; tag?: string; }
{ "slug": "welcome-message", "status": "live", "name": "Welcome Message", "description": "A friendly welcome message for new users", "availableVersions": ["1.0.0", "1.1.0", "2.0.0"], "availableTags": ["production", "staging"], "variables": [ { "label": "name", "description": "The user's full name", "type": "string" }, { "label": "company", "description": "The user's company name", "type": "string" } ], "version": "2.0.0", "tag": "production" }
Was this page helpful?