Skip to main content
GET
/
prompt-templates
Get All
curl --request GET \
  --url https://api.promptlayer.com/prompt-templates \
  --header 'X-API-KEY: <api-key>'
{
  "has_next": true,
  "has_prev": true,
  "items": [
    {
      "id": 123,
      "prompt_name": "<string>",
      "prompt_template": {
        "content": [
          {
            "text": "<string>",
            "type": "text",
            "id": "<string>",
            "annotations": [
              {
                "type": "<string>",
                "title": "<string>",
                "url": "<string>",
                "start_index": 123,
                "end_index": 123,
                "cited_text": "<string>",
                "encrypted_index": "<string>"
              }
            ],
            "thought_signature": "<string>"
          }
        ],
        "input_variables": [],
        "template_format": "f-string",
        "type": "completion"
      },
      "external_ids": [
        {
          "source": "<string>",
          "external_id": "<string>"
        }
      ],
      "metadata": {
        "model": {
          "provider": "<string>",
          "name": "<string>",
          "model_config_display_name": "<string>",
          "base_model": "<string>",
          "parameters": {},
          "display_params": {},
          "api_type": "<string>"
        }
      },
      "commit_message": "<string>",
      "llm_kwargs": {},
      "version": 123,
      "is_snippet": true
    }
  ],
  "next_num": 123,
  "prev_num": 123,
  "page": 123,
  "pages": 123,
  "total": 123
}

Documentation Index

Fetch the complete documentation index at: https://promptlayer-claude-nice-fermi-nop3f.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Get a paginated list of all prompt templates in your workspace. Results are ordered by creation date, newest first. Each returned prompt template includes the latest version by default. When filtering by label, the version associated with that label is returned instead.

Authorizations

X-API-KEY
string
header
required

Query Parameters

page
integer
per_page
integer
label
string

Filter prompt templates by release label (e.g., 'prod', 'dev', 'staging')

name
string

Filter prompt templates by name (case-insensitive partial match)

tags

Filter prompt templates by tags. Can be a single tag or a list of tags. Only templates whose tags contain all specified values are returned.

status
enum<string>
default:active

Filter prompt templates by status: 'active' (default) returns only active templates, 'deleted' returns only deleted/archived templates, 'all' returns both

Available options:
active,
deleted,
all
external_source
string

External ID source to filter by. Must be provided with external_id.

external_id
string

External ID value to filter by. Must be provided with external_source.

created_by_email
string

Filter by the creator's email address.

created_after
string<date-time>

Filter resources created at or after this timestamp.

created_before
string<date-time>

Filter resources created at or before this timestamp.

updated_after
string<date-time>

Filter resources updated at or after this timestamp.

updated_before
string<date-time>

Filter resources updated at or before this timestamp.

sort_by
enum<string>

Sort field.

Available options:
created_at,
updated_at,
name,
id
sort_order
enum<string>
default:desc

Sort direction.

Available options:
asc,
desc
is_snippet
boolean

When true, return snippets only. When false, exclude snippets. When omitted, return both prompts and snippets.

Response

Successful Response

has_next
boolean
required
has_prev
boolean
required
items
ListPromptTemplateItem · object[]
required
next_num
integer
required
prev_num
integer
required
page
integer
required
pages
integer
required
total
integer
required