Prompt Manage

View as Markdown

Prompt Manage lets your team create reusable prompt templates in the Alephant SaaS dashboard, assign each template a stable ID, and call it at runtime through the Alephant AI Gateway.

Instead of hardcoding prompts in application code, create the prompt once in Alephant, promote the tested version to production, and send the prompt ID with each request.

1Alephant-Prompt-ID: support-triage

Alephant applies the production prompt template, forwards the request to the selected model, and records token usage, cost, latency, route, agent, user, and session metadata.

Core Flow

  1. Create a prompt template in the Alephant dashboard.

    image
  2. Set a stable prompt ID, such as support-triage.

  3. Add system, user, or assistant message segments.

  4. Configure model binding and parameters.

  5. Promote the tested version to production.

  6. Call the gateway with Alephant-Prompt-ID.

Create A Template

In Prompt Manage, create a new template and configure:

FieldDescription
IDRuntime ID used in the Alephant-Prompt-ID header.
Template NameDisplay name in the dashboard.
LLM BindingProvider/model configuration for the prompt.
ParametersTemperature, max tokens, and top P.
MessagesReusable prompt messages.
VariablesDynamic placeholders such as {{customer_name}}.
StatusDraft, Production, or Archived.

Use stable IDs that your application can depend on:

support-triage
security-code-audit
hermes-planner
openclaw-browser-agent

Call A Prompt At Runtime

Send a normal OpenAI-compatible request to Alephant and include the prompt ID header.

1curl https://api.alephant.io/v1/chat/completions \
2 -H "Authorization: Bearer $ALEPHANT_VIRTUAL_KEY" \
3 -H "Content-Type: application/json" \
4 -H "Alephant-Prompt-ID: support-triage" \
5 -d '{
6 "model": "openai/gpt-4o-mini",
7 "messages": [
8 {
9 "role": "user",
10 "content": "Customer says their AI invoice increased last night. Explain what happened."
11 }
12 ]
13 }'

Alephant prepends the production template messages before the runtime messages you send.

Use Variables

Prompt templates can contain variables:

You are helping {customer_name} on the {plan_name} plan Limit the response to {max_items} action items

Pass variable values in inputs:

1{
2 "model": "openai/gpt-4o-mini",
3 "inputs": {
4 "customer_name": "Acme",
5 "plan_name": "Team",
6 "max_items": 3
7 },
8 "messages": [
9 {
10 "role": "user",
11 "content": "Summarize the usage spike."
12 }
13 ]
14}

If required variables are missing, Alephant rejects the request before provider dispatch.

Versioning

Each save creates a new prompt version.

StatusUse
DraftEdit and test safely.
ProductionRuntime version used by Alephant-Prompt-ID.
ArchivedRetired version kept for history.

Promote a version to production when you want future runtime calls for the same prompt ID to use it.

Cost And Observability

Prompt-managed requests are attributed by prompt ID and version.

The dashboard can show:

  • calls
  • token usage
  • prompt cost
  • model and provider
  • route
  • latency
  • linked agent, virtual key, user, and session
  • errors or blocked requests

This helps teams understand which prompts are driving spend and whether a new prompt version increases token usage or cost.

Notes

CaseBehavior
No Alephant-Prompt-IDRequest runs normally without prompt injection.
Valid production prompt IDAlephant applies the production template.
Missing inputs for variablesRequest is rejected before provider dispatch.
Draft-only promptPromote a version before relying on runtime calls.

Header names are case-insensitive. The recommended form is:

1curl https://api.alephant.io/v1/chat/completions \
2 -H "Authorization: Bearer $ALEPHANT_API_KEY" \
3 -H "Content-Type: application/json" \
4 -H "Alephant-Prompt-ID: support-triage" \
5 -d '{
6 "model": "openai/gpt-4o-mini",
7 },
8 "messages": [
9 {
10 "role": "user",
11 "content": "The customer asks why AI usage increased last night."
12 }
13 ]
14 }'