Prompt Library

Centralized prompt management with version control, folder organization, template variables, and partial composition.

Features

Version Control

Every prompt edit creates a new version. Compare versions side-by-side, roll back to any previous version, and see who made each change.

Folders & Organization

Organize prompts into folders by use case, team, or application. Search across your entire library by name, content, or tags.

Templates & Variables

Use {{variable}} syntax for dynamic prompt content. Variables are validated at call time and can have default values, types, and descriptions.

Partials & Composition

Create reusable prompt fragments (partials) and compose them into full prompts with {{> partial_name}}. Changes to a partial propagate to all prompts that use it.

Variable Interpolation

At request time, pass variables as headers or request body fields. CloudVera resolves templates before forwarding to the LLM provider.

Code Examples

Using Prompt Templates

// Reference a prompt template by ID in your request
const response = await fetch('https://api.cloudvera.io/v1/chat/completions', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer cvk_your_key',
    'X-Provider-Key': 'sk-your-openai-key',
    'X-Prompt-Template': 'tmpl_customer_support_v3',
  },
  body: JSON.stringify({
    model: 'gpt-4o',
    variables: {
      customer_name: 'Alice',
      issue_category: 'billing',
      tone: 'empathetic',
    },
  }),
});