llm_prompts

get/api/projects/{project_id}/llm_prompts/name/{prompt_name}/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/llm_prompts/name/{prompt_name}/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

prompt_namestring required

Query parameters

content'full' | 'preview' | 'none'

Controls how much prompt content is included in the response. 'full' includes the full prompt, 'preview' includes a short prompt_preview, and 'none' omits prompt content entirely. The config field is only included with 'full'. The outline field is always included.

  • full - full
  • preview - preview
  • none - none
labelstring

Fetch the version this label currently points to, e.g. 'production'. Lowercase letters, numbers, dots, hyphens and underscores. Mutually exclusive with version.

resolveboolean

Replace @@@prompt:...@@@ references with the referenced prompts' content before returning. Set to false to get the raw text with the reference tags, e.g. for editing or export. Only applies when content is 'full'.

versioninteger

Specific prompt version to fetch. If omitted, the latest version is returned.

Response

idstring uuid required
namestring required
promptunknown
configobject nullable

JSON object with model parameters or any agent configuration stored with this version, or null when the version has none. Omitted when 'content=preview' or 'content=none'.

prompt_previewstring

First 160 characters of the prompt. Only present when 'content=preview'.

versioninteger required
labelstring

The label this prompt was fetched by. Only present when fetching with the label parameter.

created_atstring date-time required
updated_atstring date-time required
deletedboolean required
is_latestboolean required
latest_versioninteger required
version_countinteger required
first_version_created_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.