llm_prompts

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

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/llm_prompts/
  • 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/.

Query parameters

archivedboolean

Return archived prompts instead of active ones. Each archived prompt appears once, at its most recent version.

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
created_by_idinteger

Filter prompts by the ID of the user who created them.

labelstring

Return each prompt at the version this label points to, e.g. 'production'. Prompts that do not carry the label are omitted. If omitted, the latest version of every prompt is returned.

limitinteger

Number of results to return per page.

offsetinteger

The initial index from which to return the results.

order_by'name' | '-name' | 'created_at' | '-created_at' | 'updated_at' | '-updated_at' | 'version' | '-version' | 'latest_version' | '-latest_version' | 'version_count' | '-version_count' | 'first_version_created_at' | '-first_version_created_at' | 'prompt_size_bytes' | '-prompt_size_bytes'

Field to sort the prompt list by. Prefix with '-' for descending order.

  • name - name
  • -name - -name
  • created_at - created_at
  • -created_at - -created_at
  • updated_at - updated_at
  • -updated_at - -updated_at
  • version - version
  • -version - -version
  • latest_version - latest_version
  • -latest_version - -latest_version
  • version_count - version_count
  • -version_count - -version_count
  • first_version_created_at - first_version_created_at
  • -first_version_created_at - -first_version_created_at
  • prompt_size_bytes - prompt_size_bytes
  • -prompt_size_bytes - -prompt_size_bytes
resolveboolean

Replace @@@prompt:...@@@ references with the referenced prompts' content in labeled results with full content. Set to false to get the raw text with the reference tags.

searchstring

Optional substring filter applied to prompt names and prompt content.

Response

countinteger required
nextstring uri nullable
previousstring uri nullable

Example response

{
  "count": 123,
  "next": "http://api.example.org/accounts/?offset=400&limit=100",
  "previous": "http://api.example.org/accounts/?offset=200&limit=100"
}

Changes

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