PromptLayer Prompt Registry API

Retrieve and publish versioned prompt templates.

Operations 2

POST /prompt-templates/{identifier} Get a prompt template #
POST /rest/prompt-templates Publish a prompt template version #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/promptlayer-prompt-registry-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

promptlayer-prompt-registry-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PromptLayer Evaluations & Datasets Prompt Registry API
  description: 'REST API for PromptLayer, a prompt engineering, prompt management, and LLM observability platform. The API logs and tracks LLM requests, manages a versioned prompt registry with release labels, ingests OpenTelemetry-style spans and traces, and runs evaluations against datasets. All requests are authenticated with an `X-API-KEY` header. Note: some legacy tracking endpoints are served under the `/rest` path prefix while newer endpoints are served at the API root.'
  termsOfService: https://www.promptlayer.com/terms-of-service
  contact:
    name: PromptLayer Support
    email: hello@promptlayer.com
  version: '1.0'
servers:
- url: https://api.promptlayer.com
security:
- ApiKeyAuth: []
tags:
- name: Prompt Registry
  description: Retrieve and publish versioned prompt templates.
paths:
  /prompt-templates/{identifier}:
    post:
      operationId: getPromptTemplate
      tags:
      - Prompt Registry
      summary: Get a prompt template
      description: Retrieves a prompt template by name or id, resolving an optional version or release label and optionally formatting it with provided input variables for a given provider and model.
      parameters:
      - name: identifier
        in: path
        required: true
        description: The prompt name or prompt template id.
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetPromptTemplateRequest'
      responses:
        '200':
          description: Prompt template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplate'
        '401':
          description: Unauthorized
        '404':
          description: Template not found
  /rest/prompt-templates:
    post:
      operationId: publishPromptTemplate
      tags:
      - Prompt Registry
      summary: Publish a prompt template version
      description: Creates a new prompt template (or a new version of an existing one), optionally assigning release labels and external ids.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishPromptTemplateRequest'
      responses:
        '200':
          description: Prompt template published
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishPromptTemplateResponse'
        '401':
          description: Unauthorized
        '409':
          description: External id conflict
        '422':
          description: Validation error
components:
  schemas:
    PublishPromptTemplateRequest:
      type: object
      required:
      - prompt_template
      - prompt_version
      properties:
        prompt_template:
          type: object
          required:
          - prompt_name
          properties:
            prompt_name:
              type: string
              minLength: 1
              maxLength: 512
            tags:
              type: array
              items:
                type: string
            folder_id:
              type: integer
            workspace_id:
              type: integer
        prompt_version:
          type: object
          properties:
            prompt_template:
              $ref: '#/components/schemas/PromptBlueprint'
            commit_message:
              type: string
              maxLength: 72
            metadata:
              type: object
              additionalProperties: true
        release_labels:
          type: array
          items:
            type: string
        external_ids:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
              external_id:
                type: string
    PromptBlueprint:
      type: object
      description: Prompt Blueprint payload, either a chat prompt (messages array) or a completion prompt (content string). Provider-agnostic representation.
      additionalProperties: true
    PublishPromptTemplateResponse:
      type: object
      properties:
        id:
          type: integer
        prompt_name:
          type: string
        prompt_version_id:
          type: integer
        version_number:
          type: integer
        tags:
          type: array
          items:
            type: string
        release_labels:
          type: array
          items:
            type: string
        prompt_template:
          $ref: '#/components/schemas/PromptBlueprint'
        metadata:
          type: object
          additionalProperties: true
        commit_message:
          type: string
    PromptTemplate:
      type: object
      properties:
        id:
          type: integer
        prompt_name:
          type: string
        prompt_template:
          $ref: '#/components/schemas/PromptBlueprint'
        metadata:
          type: object
          additionalProperties: true
        commit_message:
          type: string
        llm_kwargs:
          type: object
          additionalProperties: true
        version:
          type: integer
    GetPromptTemplateRequest:
      type: object
      properties:
        version:
          type: integer
          minimum: 1
        label:
          type: string
          description: Release label such as "prod" or "staging".
        provider:
          type: string
          enum:
          - openai
          - anthropic
        input_variables:
          type: object
          additionalProperties:
            type: string
        model:
          type: string
        model_parameter_overrides:
          type: object
          additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY