Create, version, and manage reusable prompt templates with model parameters, response formats, diffs, and API integration
The Prompt Library is your central hub for managing reusable prompt templates. Create system and user messages, attach model parameters and structured output formats, track versions with full diffs, organize with tags, and reference prompts in any API request with a single prompt_id.
The editor is where you build and refine your prompt templates. It supports multiple messages, model parameters, response formats, template variables, tags, and three view modes: Pretty, JSON, and Diff.
A prompt template is an ordered list of messages. Each message has a role (System or User) and text content.
System messages steer the AI’s behavior. They define the persona, rules, and constraints.
User messages provide context, examples, or few-shot patterns.
Use + Add Message to append a new message. Reorder messages with the arrow buttons, or delete them with the trash icon. Order matters: messages are prepended to your API request in the exact order they appear in the template.A prompt must have at least one message and supports up to 32.
Click the Parameters button next to “Messages” to configure model parameters that are applied automatically when the prompt is used. Active parameters are shown as summary badges (e.g. Temp 0.8, Reasoning high, Max 5000).The following parameters are available:
Parameter
Range
Description
Temperature
0 to 2
Controls randomness. Lower values produce more focused output, higher values more creative.
Reasoning Effort
Low, Medium, High
Applied when the model supports extended reasoning.
Max Tokens
1+
Maximum number of tokens in the model’s response.
Top P
0 to 1
Nucleus sampling. The model considers tokens with top_p cumulative probability.
N
1+
Number of completions to generate per request.
Parameters are optional. Leave any parameter unset to use the model’s default. When a parameter is set on the prompt, it overrides the corresponding value in your API request.Add a parameter by clicking its name in the “Add parameter” section of the popover. Remove it by clicking the X next to the active parameter. Each parameter includes a slider or number input for precise control.
Click Response Format next to Parameters to save the output format with the prompt. This is useful when a prompt always needs JSON or strict structured output.
Mode
API value
Description
Off
Unset
The request uses its own response_format, if any.
JSON
{"type": "json_object"}
Forces free-form JSON output. Add clear instructions in the prompt so the model knows which JSON shape to return.
JSON Schema
{"type": "json_schema"}
Enforces a named JSON Schema for supported models.
When JSON Schema is selected, configure:
Field
Required
Description
Name
Yes
Schema name sent to the provider.
Description
No
Optional guidance for the schema’s purpose.
Strict
No
Maps to provider strict schema mode where supported.
Schema
Yes
A valid, non-empty JSON object.
Use the Structured Outputs guide for schema requirements and model support. Prompt-level response formats are applied automatically when the prompt is used and override the caller’s response_format.
Prompts support Jinja-style template variables using {{variable_name}} syntax in any message. Variables are automatically detected and displayed in the Prompt Variables section below the editor.For example, a system message containing:
You are a {{animal}} and should always sound like this {{animal}}
shows {{animal}} as a recognized variable. At request time, pass values via prompt_variables in the API call.
Add tags like production, dev, staging, or any custom label to organize your prompts. Type a tag name and press Enter to add it. Tags appear in the prompts list for quick filtering.
Every save creates a new version. The version history sidebar shows all versions with their creator, timestamp, and a link to compare any version with the one before it.
Click JSON to see the raw JSON representation of your prompt messages and settings. If model parameters or a response format are configured, they appear under params; valid JSON Schema text is shown as a parsed object.
Instead of embedding long prompts in every API call, reference a prompt from your library by passing prompt_id (and optionally prompt_variables) inside the requesty extra body.When a prompt_id is provided, the router:
Fetches the prompt template from your library
Renders each message with your prompt_variables (if any)
Prepends the rendered messages to the messages array in your request
Applies any model parameters and response format configured on the prompt
If your prompt template already contains every message you need, pass an emptymessages array (messages=[]) so the request runs entirely from the template. The official OpenAI and Anthropic SDKs require the messages field to be present, so send [] rather than omitting it. Omitting the field entirely raises a client-side validation error.
"prompt_name:version" pins a specific version (e.g. "my-prompt:3")
Use specific versions (e.g. "my-prompt:1") in production for stability. Use the latest version (just "my-prompt") during development so changes take effect immediately.
When the prompt template supplies all of the messages, pass an empty messages array so the request runs entirely from the template. Combine this with prompt_variables to fill in any {{variable}} placeholders.
When a prompt with configured settings is used in a request, the router applies them in this order:
Your API request is parsed with its original parameters (temperature, max_tokens, etc.)
The prompt template messages are fetched, rendered with variables, and prepended to your messages
Any model parameters or response format set on the prompt override the corresponding values in your request
This means you can set temperature: 0.8, reasoning_effort: high, and a json_schema response format on a prompt, and every request using that prompt will inherit those settings without any client-side changes. Settings not set on the prompt are left unchanged from your request.
Click Delete to remove a prompt and all its versions. This action cannot be undone. Any API requests referencing the deleted prompt_id will return an error.