GET /v1/ai-cache-keyGenerate deterministic AI cache keys
VPS Browser lf-vps-browser
Makes the same short key every time for the same AI request, so the answer can be cached and reused. Generates a deterministic cache key from LLM request parameters (prompt, model, temperature). Returns a prefix:model:contentHash style key.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Prompt text to hash |
model | string | No | Model identifier |
temperature | string | No | Temperature value |
extra | string | No | Extra context to mix in |
Response Schema
cacheKey (string): Deterministic cache key
strategy (string): Key construction strategy
components (object): Broken-down key parts
cURL Example
curl 'https://lf-vps-browser.laminarforge.dev/v1/ai-cache-key?prompt=<prompt>' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-vps-browser.laminarforge.dev/v1/ai-cache-key'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'prompt': '<prompt>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())