Skip to main content

Listing Prompts

Use listing to discover available prompts, check their descriptions, and see which tags and versions exist.

Basic Listing (sync)

Basic Listing (async)

Getting Prompts

Use get when you want the actual prompt text and model configuration your app should use.

Get Latest Version

Get Specific Version

Get by Tag (environments)

Tags are ideal for mapping prompts to environments such as production and staging without changing your code.
You can point staging to a new version first, test it, then move the production tag to that same version once you’re confident.

Variable Substitution

Inject runtime data into your prompts using variables.

Simple Variable Example

You can pass any JSON-serializable values in variables. Use this to personalize responses, inject context, or conditionally render parts of your prompt via Jinja2.

Async Usage in Applications

In async frameworks (e.g. FastAPI), prefer async methods to avoid blocking the event loop.
This pattern scales cleanly as you add more prompt-dependent endpoints or background tasks.