---
title: "Get All"
method: GET
path: "/prompt-templates"
tags: ["prompt-templates"]
---

# Get All

`GET /prompt-templates`

## Query parameters

- `page` integer
- `per_page` integer
- `label` string
- `name` string
- `tags` union
  - string
  - string[]
- `status` 'active' | 'deleted' | 'all'
- `external_source` string
- `external_id` string
- `created_by_email` string
- `created_after` string, date-time
- `created_before` string, date-time
- `updated_after` string, date-time
- `updated_before` string, date-time
- `sort_by` 'created_at' | 'updated_at' | 'name' | 'id'
- `sort_order` 'asc' | 'desc'
- `is_snippet` boolean

## Response `200`

Successful Response

- ListPromptTemplates
  - `has_next` boolean, required
  - `has_prev` boolean, required
  - `items` ListPromptTemplateItem[], required
    - `id` integer, required
    - `prompt_name` string, required
    - `prompt_template` union, required
      - CompletionPrompt
        - `content` union[], required
          - union
            - TextContent
              - …
            - ThinkingContent
              - …
            - CodeContent — Code content block (e.g. from code execution tools).
              - …
            - ImageContent
              - …
            - MediaContent
              - …
            - MediaVariable
              - …
            - OutputMediaContent — LLM-generated media output (e.g. from image generation tools).
              - …
            - ServerToolUseContent — Server-side tool use block (e.g. web search, code execution).
              - …
            - WebSearchToolResultContent — Results from a web search tool invocation.
              - …
            - CodeExecutionResultContent — Result from a code execution tool.
              - …
            - McpListToolsContent — MCP list tools response block.
              - …
            - McpCallContent — MCP tool call block.
              - …
            - McpApprovalRequestContent — MCP tool approval request block.
              - …
            - McpApprovalResponseContent — MCP tool approval response block.
              - …
            - BashCodeExecutionToolResultContent — Result from bash code execution tool.
              - …
            - TextEditorCodeExecutionToolResultContent — Result from text editor code execution tool.
              - …
            - ShellCallContent — Shell tool call block.
              - …
            - ShellCallOutputContent — Shell tool output block.
              - …
            - ApplyPatchCallContent — Apply patch tool call block.
              - …
            - ApplyPatchCallOutputContent — Apply patch tool output block.
              - …
        - `input_variables` string[]
        - `template_format` 'f-string' | 'jinja2'
        - `type` 'completion'
      - ChatPrompt
        - `messages` union[], required
          - union
            - SystemMessage
              - …
            - UserMessage
              - …
            - AssistantMessage
              - …
            - FunctionMessage
              - …
            - ToolMessage
              - …
            - PlaceholderMessage
              - …
            - DeveloperMessage
              - …
        - `functions` Function[], nullable
          - `name` string, required
          - `description` string
          - `strict` boolean — Whether to enable strict schema validation for the function parameters.
          - `parameters` object
        - `tools` Tool[], nullable
          - union
            - FunctionTool — A custom function tool definition.
              - …
            - BuiltInTool — A provider-native built-in tool (e.g. web search, code interpreter, bash).
              - …
        - `function_call` union
          - string
          - MessageFunctionCall
            - `name` string, required
        - `tool_choice` union
          - string
          - ChatToolChoice
            - `type` 'function'
            - `function` MessageFunctionCall, required
              - …
        - `type` 'chat'
        - `input_variables` string[]
    - `metadata` Metadata — Metadata associated with the prompt blueprint. Supports additional custom fields beyond the model field.
      - `model` Model
        - `provider` string, required — The LLM provider (e.g. openai, anthropic, google, openai.azure, vertexai, mistral, cohere, amazon.bedrock, huggingface).
        - `model_config_display_name` string, nullable — Optional display name for the model configuration.
        - `base_model` string, nullable — The base model name (e.g. for fine-tuned models).
        - `name` string, required — The model name (e.g. gpt-4o, claude-sonnet-4-20250514).
        - `parameters` object — Model parameters (e.g. temperature, max_tokens, top_p).
        - `display_params` object — Display-friendly parameter values shown in the UI.
        - `api_type` string, nullable — The API type (e.g. chat.completions, responses, images). Used to select the correct API endpoint for the provider.
    - `commit_message` string, nullable
    - `llm_kwargs` object, nullable — When you optionally specify `provider` in the body, `llm_kwargs` will be returned for that specific provider and you can pass these kwargs to the provider's API directly. **Important:** This object's structure is provider-specific and may change without notice as LLM providers update their APIs. For stable, provider-agnostic prompt data, use `prompt_template` instead.
    - `version` integer
    - `external_ids` ExternalId[], required — External ID mappings attached to the prompt template.
      - `source` string, required — The external system or namespace that owns the ID.
      - `external_id` string, required — The identifier for this entity in the external system.
    - `is_snippet` boolean — Whether this prompt template record is a snippet.
  - `next_num` integer, required
  - `prev_num` integer, required
  - `page` integer, required
  - `pages` integer, required
  - `total` integer, required

## Other responses

- `401` — Unauthorized - missing or invalid API key.
- `422` — Validation error - request parameters or body are invalid.

---

[API](https://skmtc.dev/promptlayer/apis/promptlayer-api.md) · [All operations](https://skmtc.dev/promptlayer/apis/promptlayer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/promptlayer/promptlayer-api/revisions/a23093a0a506/schema)
