Skip to main content
POST
POST /v1/prompts/{slug}/run Execute a saved prompt from the dashboard by its slug. The gateway fetches the prompt’s template, interpolates your variables, and routes through the normal chat completions pipeline. By default the published version is used. Use the version query parameter to target a specific version.

Auth

All three schemes are accepted:
Bearer (OIDC) is supported but in Alpha. Contact us if you need OIDC auth.

Path parameters

Query parameters

Version values:

Request body

Examples

Response

Same shape as /v1/chat/completions. Response headers include x-gatelit-request-id and x-gatelit-model.

Errors

Authorizations

Authorization
string
header
required

OIDC JWT issued by your auth provider (Alpha). Full self-serve configuration is coming soon — contact us for early access. Use this for browser/frontend clients where a user is signed in.

Path Parameters

slug
string
required

The prompt slug from the dashboard.

Pattern: ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$

Query Parameters

version
string
default:published

Which version of the prompt to execute.

  • published — published version (default)
  • current — latest saved version, even if unpublished
  • <number> — a specific version number (e.g. 3)
Examples:

"published"

"current"

"3"

Body

application/json

Variables to inject into the saved prompt's template. Which variables are required depends on the prompt's definition in the dashboard.

variables
object

Key-value map of variable name → value.

metadata
object

Arbitrary tags attached to the request — see the chat completions metadata field. Stored on the log entry, stripped before forwarding.

user
string

End-user identifier — see the chat completions user field.

stream
boolean
default:false
max_tokens
integer
temperature
number
Required range: 0 <= x <= 2

Response

Same response shape as /v1/chat/completions. Headers include x-gatelit-request-id and x-gatelit-model.

OpenAI-compatible chat completion response. Returned when stream is false (default).

id
string
object
string
Example:

"chat.completion"

created
integer
model
string

The upstream model that handled the request.

choices
object[]
usage
object