Skip to main content

Endpoint

Executes a saved prompt from the Gatelit dashboard by its UUID. The gateway:
  1. Fetches the prompt’s published version (cached for fast retrieval).
  2. Resolves any prompt partials ({{> partial_name}}).
  3. Interpolates {{variable_name}} tokens with the values you supply.
  4. Merges any runtime overrides (model, temperature, max tokens).
  5. Routes the assembled request through the normal /v1/chat/completions pipeline.
The response format is identical to POST /v1/chat/completions.
Only published prompt versions are executed. If a prompt exists but has no published version, the gateway returns a 404. Save and publish your prompt in the dashboard before calling this endpoint.

Authentication

Same Authorization header schemes as /v1/chat/completions:

Path parameter


Request

Content-Type: application/json

Body fields

object
Key-value pairs for {{variable_name}} substitutions in the prompt’s system prompt and user message templates.Variable names must match [A-Za-z_][A-Za-z0-9_]*. Values are coerced to the type declared in the prompt’s variable definitions:If a required variable is missing, the gateway returns 400.
boolean
default:"false"
Enable Server-Sent Events streaming. Uses the same SSE format as /v1/chat/completions.
object
Runtime overrides applied on top of the prompt’s saved configuration.

Response

The response is identical in structure to POST /v1/chat/completions — an OpenAI-compatible completion object for non-streaming requests, or an SSE stream when stream: true. Response headers include x-gatelit-request-id, x-gatelit-model, and x-gatelit-auth-mode.

Examples


Partial resolution

If your prompt templates reference partials with {{> partial_name}}, the gateway resolves them automatically before variable interpolation. This means partials can themselves contain {{variable_name}} tokens — they are expanded in the correct order.
Partials not found in the dashboard are substituted with an empty string rather than causing an error, so your prompt degrades gracefully if a partial is deleted.

Error codes

See the Errors reference for the full error shape and handling guidance.