Skip to main content
Gatelit prompts are more than saved strings. They’re versioned templates with variables, reusable partials, structured output schemas, and fallback chains — all configured in the dashboard and editable without a deploy.

Variables

Variables let you inject dynamic content at runtime without touching the prompt in the dashboard.

Defining variables

In the prompt editor, add variables with a name, type, and whether they’re required:

Using variables

Reference variables with {{double_braces}}:
When the prompt runs, the gateway replaces each {{name}} with the value passed in the request body.

Passing variables at runtime

Required variables that aren’t passed return a 400 error with the missing variable name.

Partials

Partials are reusable prompt fragments shared across multiple prompts. Like prompts, they’re versioned and published independently.

Creating a partial

Go to Partials → create a new partial with a name and content:

Using a partial

Reference partials with <<partial-slug>>:
When a prompt is published, the gateway resolves all <<references>> and bakes the current published versions into the prompt.

Why partials?

  • Consistency — update one partial, every prompt that uses it picks up the change
  • Separation of concerns — keep JSON formatting rules, brand voice, or compliance disclaimers in one place
  • Versioned independently — partials version separately from prompts, so you can test a partial change without republishing every prompt

Fallback chains

Fallback chains keep your prompts working when a provider is down, rate-limited, or returns an error.

Configuring a fallback chain

In the prompt editor, add fallback entries. Each entry has a model and optional triggers:

Chain strategy

Order matters. Put cheaper/faster models last:
  1. Primaryopenai/gpt-4o (best quality, most expensive)
  2. First fallback (rate_limit) — another gpt-4o deployment or same model different region
  3. Second fallback (provider_error, timeout) — anthropic/claude-3-5-sonnet-20241022
  4. Last resort (no triggers — catches anything) — google/gemini-2.5-flash
The gateway tries each entry in order until one succeeds. If all fail, it returns a 502.

In the response

When a fallback triggers, the response includes headers:

Structured output

Enforce a JSON schema on the model’s response. Define it in the prompt editor with the visual schema builder:
The gateway translates this to each provider’s native format:
  • OpenAI → response_format: { type: "json_schema", json_schema: ... }
  • Anthropic → tool use with input_schema
  • Google → response_schema
  • Mistral → response_format: { type: "json_object" }
You write the schema once — the gateway handles the rest.

Testing prompts

The dashboard includes a playground (/playground) where you can test prompts interactively before publishing. Fill in variables, toggle streaming, and see the model’s output in real time. For automated testing, define scenarios on each prompt — test cases with expected assertions. Run evals against both the published version and a draft to compare results before publishing.