Skip to main content

Prompt library

The prompt library lets you store reusable prompt texts as named entities. Prompts can be referenced by ID from multiple plugins, guardrails, and other features, providing a single source of truth for your prompt texts.

Entity structure

{
"id": "prompt_xxx",
"name": "English translator",
"description": "A system prompt for translating content to English",
"prompt": "You are a professional translator. Translate the following content to English. Return only the translation, no explanation."
}
FieldTypeDescription
idstringAuto-generated with prompt_ prefix
namestringA descriptive name for the prompt
descriptionstringWhat this prompt is used for
promptstringThe actual prompt text

Where prompts can be referenced

Prompts can be referenced via their ID (prompt_ref) from:

Testing prompts

The admin UI includes a built-in prompt tester. Select a provider and test your prompt directly from the Otoroshi back-office without creating a route.

Admin API

ai-gateway.extensions.cloud-apim.com/v1/prompts

Standard CRUD operations are supported.