Skip to main content
The OpenLIT REST API lets you integrate Prompt Hub and Vault directly into any application or script — without installing an SDK. All endpoints accept JSON request bodies and return JSON responses.

Authentication

Every request must include your OpenLIT API key in the Authorization header:
To create an API key, navigate to API Keys in OpenLIT and click Create API Key.

Base URL

Replace the base URL below with the address of your OpenLIT instance:
If OpenLIT is deployed on a remote host, substitute the appropriate hostname or IP address.

Endpoints

POST /api/prompt/get-compiled

Fetch a prompt from Prompt Hub and optionally compile it with runtime variables.

Request parameters

string
required
Bearer <api-key> — your OpenLIT API key.
string
Name of the prompt to retrieve. Use either name or promptId.
string
Unique ID of the prompt. Use either promptId or name.
string
Specific semantic version to retrieve (e.g. 3.2.1). Omit to get the latest version.
boolean
When true, replaces {{variableName}} placeholders in the prompt with values from variables.
object
Key-value pairs substituted into the prompt when shouldCompile is true.
object
Additional metadata stored in the prompt’s access history.

Response

200
null | string
null on success, or an error message string on failure.
object

POST /api/vault/get-secrets

Retrieve secrets from Vault. Optionally filter by key or tag.

Request parameters

string
required
Bearer <api-key> — your OpenLIT API key.
string
Fetch a single secret by its key (e.g. OPENAI_API_KEY). Omit to fetch all secrets.
string[]
Fetch only secrets that have all of the specified tags assigned.

Response

200
null | string
null on success, or an error message string on failure.
object
A flat object where each key is the secret’s key name and each value is the secret’s value.

Prompt Hub

Manage and version prompts in the OpenLIT UI

Vault

Store and manage LLM API keys and secrets centrally