SAP Business Technology Platform Prompt Templates API

Lifecycle management of prompt templates

GitHub OpenAPI

Operations 11

POST /lm/promptTemplates Prompt template create #
GET /lm/promptTemplates Prompt template list #
DELETE /lm/scenarios/{scenario}/promptTemplates Prompt template scenario delete #
DELETE /lm/scenarios/{scenario}/promptTemplates/{name}/versions/{version}/history Prompt template history delete #
GET /lm/scenarios/{scenario}/promptTemplates/{name}/versions/{version}/history Prompt template history #
GET /lm/promptTemplates/{promptTemplateId} Prompt template get #
DELETE /lm/promptTemplates/{promptTemplateId} Prompt template delete #
POST /lm/promptTemplates/import Prompt template create #
GET /lm/promptTemplates/{promptTemplateId}/export Prompt template export #
POST /lm/promptTemplates/{promptTemplateId}/substitution Prompt template fill #
POST /lm/scenarios/{scenario}/promptTemplates/{name}/versions/{version}/substitution Prompt template fill #

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/sap-btp:sap-btp-prompt-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

sap-btp-prompt-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sap Btp Prompt Templates API
  version: 0.14.4
  description: 'Operations tagged Prompt Templates across 2 of this provider''s published API definitions: prompt-registry.yaml, sap-btp-prompt-registry-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.ai.{region}.ml.hana.ondemand.com/v2
  description: Production endpoint for SAP AI Core
  variables:
    region:
      enum:
      - prod.eu-central-1.aws
      - prodeuonly.eu-central-1.aws
      - prod.us-east-1.aws
      - prod.ap-northeast-1.aws
      - prod.ap-southeast-2.aws
      - prod-eu20.westeurope.azure
      - prod-us21.eastus.azure
      - prod-eu30.europe-west3.gcp
      - prod-us30.us-central1.gcp
      default: prod.eu-central-1.aws
tags:
- name: Prompt Templates
  description: Lifecycle management of prompt templates
paths:
  /lm/promptTemplates:
    post:
      operationId: registry.controller.prompt_controller.create_update_prompt_template
      x-sap-cloud-sdk-operation-name: createUpdatePromptTemplate
      description: Create or update a prompt template
      summary: Prompt template create
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromptTemplatePostRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplatePostResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        default:
          $ref: '#/components/responses/CommonError'
    get:
      operationId: registry.controller.prompt_controller.list_prompt_templates
      x-sap-cloud-sdk-operation-name: listPromptTemplates
      description: List prompt templates
      summary: Prompt template list
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      - name: scenario
        in: query
        description: Scenario field of the resource.
        schema:
          type: string
      - name: name
        in: query
        description: Name field of the resource.
        schema:
          type: string
      - name: version
        in: query
        description: Version field of the resource.
        schema:
          type: string
      - name: retrieve
        in: query
        description: Whether to retrieve 'imperative', 'declarative', or 'both'.
        schema:
          type: string
          default: both
      - name: includeSpec
        in: query
        description: Whether include the spec section or not.
        schema:
          type: boolean
          default: false
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/skip'
      responses:
        '200':
          description: Successful response
          headers:
            Link:
              description: Pagination links (rel=next, rel=prev)
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplateListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        default:
          $ref: '#/components/responses/CommonError'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          default: prod.eu-central-1.aws
  /lm/scenarios/{scenario}/promptTemplates:
    delete:
      operationId: registry.controller.prompt_controller.delete_prompt_templates_by_scenario
      x-sap-cloud-sdk-operation-name: deletePromptTemplatesByScenario
      summary: Prompt template scenario delete
      description: Delete all imperatively managed prompt templates in a scenario
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      - name: scenario
        in: path
        required: true
        description: Scenario field of the resource.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplateScenarioDeleteResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/CommonError'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          default: prod.eu-central-1.aws
  /lm/scenarios/{scenario}/promptTemplates/{name}/versions/{version}/history:
    delete:
      operationId: registry.controller.prompt_controller.delete_prompt_template_history
      x-sap-cloud-sdk-operation-name: deletePromptTemplateHistory
      summary: Prompt template history delete
      description: Delete the version history of an imperatively managed prompt template
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      - name: scenario
        in: path
        required: true
        description: Scenario field of the resource.
        schema:
          type: string
      - name: version
        in: path
        required: true
        description: Version field of the resource.
        schema:
          type: string
      - name: name
        in: path
        required: true
        description: Name field of the resource.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplateHistoryDeleteResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/CommonError'
    get:
      operationId: registry.controller.prompt_controller.list_prompt_template_history
      x-sap-cloud-sdk-operation-name: listPromptTemplateHistory
      description: List prompt template history
      summary: Prompt template history
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      - name: scenario
        in: path
        description: Scenario field of the resource.
        required: true
        schema:
          type: string
      - name: version
        in: path
        description: Version field of the resource.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: Name field of the resource.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/skip'
      responses:
        '200':
          description: Successful response
          headers:
            Link:
              description: Pagination links (rel=next, rel=prev)
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplateListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        default:
          $ref: '#/components/responses/CommonError'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          default: prod.eu-central-1.aws
  /lm/promptTemplates/{promptTemplateId}:
    get:
      operationId: registry.controller.prompt_controller.get_prompt_template_by_uuid
      x-sap-cloud-sdk-operation-name: getPromptTemplateByUuid
      description: Get prompt template by UUID
      summary: Prompt template get
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      - name: promptTemplateId
        in: path
        required: true
        description: UUID of the prompt template.
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplateGetResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        default:
          $ref: '#/components/responses/CommonError'
    delete:
      operationId: registry.controller.prompt_controller.delete_prompt_template
      x-sap-cloud-sdk-operation-name: deletePromptTemplate
      description: Delete an imperatively managed prompt template
      summary: Prompt template delete
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      - name: promptTemplateId
        in: path
        description: UUID of the prompt template.
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplateDeleteResponse'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/CommonError'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          default: prod.eu-central-1.aws
  /lm/promptTemplates/import:
    post:
      operationId: registry.controller.prompt_controller.import_prompt_template
      x-sap-cloud-sdk-operation-name: importPromptTemplate
      summary: Prompt template create
      description: Create an imperatively managed prompt template from a file
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplatePostResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        default:
          $ref: '#/components/responses/CommonError'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          default: prod.eu-central-1.aws
  /lm/promptTemplates/{promptTemplateId}/export:
    get:
      operationId: registry.controller.prompt_controller.export_prompt_template
      x-sap-cloud-sdk-operation-name: exportPromptTemplate
      summary: Prompt template export
      description: Download a prompt template as a file
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      - name: promptTemplateId
        in: path
        required: true
        description: UUID of the prompt template.
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/BadRequest'
        default:
          $ref: '#/components/responses/CommonError'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          default: prod.eu-central-1.aws
  /lm/promptTemplates/{promptTemplateId}/substitution:
    post:
      operationId: registry.controller.prompt_controller.parse_prompt_template_by_id
      x-sap-cloud-sdk-operation-name: parsePromptTemplateById
      summary: Prompt template fill
      description: Fill the placeholders of a prompt template that is identified by its UUID
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      - name: promptTemplateId
        in: path
        required: true
        description: UUID of the prompt template.
        schema:
          type: string
          format: uuid
      - name: metadata
        description: Whether to not include metadata in the response.
        in: query
        schema:
          type: boolean
          default: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromptTemplateSubstitutionRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplateSubstitutionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        default:
          $ref: '#/components/responses/CommonError'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          default: prod.eu-central-1.aws
  /lm/scenarios/{scenario}/promptTemplates/{name}/versions/{version}/substitution:
    post:
      operationId: registry.controller.prompt_controller.parse_prompt_template_by_name_version
      x-sap-cloud-sdk-operation-name: parsePromptTemplateByNameVersion
      summary: Prompt template fill
      description: Fill the placeholders of a prompt template that is identified by its scenario, name and version
      tags:
      - Prompt Templates
      parameters:
      - $ref: '#/components/parameters/ai-resource-group'
      - $ref: '#/components/parameters/ai-resource-group-scope'
      - name: scenario
        in: path
        required: true
        description: Scenario field of the resource.
        schema:
          type: string
      - name: version
        in: path
        required: true
        description: Version field of the resource.
        schema:
          type: string
      - name: name
        in: path
        required: true
        description: Name field of the resource.
        schema:
          type: string
      - name: metadata
        in: query
        description: Whether to not include metadata in the response.
        schema:
          type: boolean
          default: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromptTemplateSubstitutionRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptTemplateSubstitutionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        default:
          $ref: '#/components/responses/CommonError'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          default: prod.eu-central-1.aws
components:
  schemas:
    PromptTemplateGetResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        version:
          type: string
        scenario:
          type: string
        creationTimestamp:
          type: string
          format: timestamp
        managedBy:
          type: string
        isVersionHead:
          type: boolean
        resourceGroupId:
          type: string
        spec:
          $ref: '#/components/schemas/PromptTemplateSpec'
    ResponseFormatJsonSchemaSchema:
      type: object
      description: The schema for the response format, described as a JSON Schema object.
      additionalProperties: true
    PromptTemplateDeleteResponse:
      type: object
      required:
      - message
      properties:
        message:
          type: string
    PromptTemplatePostResponse:
      type: object
      required:
      - message
      - id
      - scenario
      - name
      - version
      properties:
        message:
          type: string
        id:
          type: string
          format: uuid
        scenario:
          type: string
        name:
          type: string
        version:
          type: string
    ResponseFormatJsonObject:
      type: object
      additionalProperties: false
      properties:
        type:
          type: string
          description: 'The type of response format being defined: `json_object`'
          enum:
          - json_object
      required:
      - type
    FunctionParameters:
      type: object
      description: The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.  Omitting `parameters` defines a function with an empty parameter list.
      additionalProperties: true
    ErrorResponse:
      type: object
      required:
      - request_id
      - message
      properties:
        request_id:
          type: string
        message:
          type: string
    PromptTemplateScenarioDeleteResponse:
      type: object
      required:
      - message
      - deleted
      properties:
        message:
          type: string
        deleted:
          type: integer
    PromptTemplateListResponse:
      type: object
      required:
      - count
      - resources
      properties:
        count:
          type: integer
        resources:
          type: array
          items:
            $ref: '#/components/schemas/PromptTemplateGetResponse'
    ChatCompletionTool:
      type: object
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
          - function
          description: The type of the tool. Currently, only `function` is supported.
        function:
          $ref: '#/components/schemas/FunctionObject'
      required:
      - type
      - function
    PromptTemplateSubstitutionResponse:
      type: object
      properties:
        parsedPrompt:
          type: array
          items:
            $ref: '#/components/schemas/PromptTemplate'
        resource:
          $ref: '#/components/schemas/PromptTemplateGetResponse'
    ResponseFormatText:
      type: object
      additionalProperties: false
      properties:
        type:
          type: string
          description: 'The type of response format being defined: `text`'
          enum:
          - text
      required:
      - type
    PromptTemplateSpec:
      type: object
      required:
      - template
      additionalProperties:
        type: object
      properties:
        template:
          type: array
          items:
            $ref: '#/components/schemas/PromptTemplate'
        defaults:
          type: object
        additionalFields:
          type: object
          description: 'DEPRECATED. Please use additional_fields instead.

            '
          deprecated: true
        response_format:
          description: 'Response format that the model output should adhere to. This is the same as the OpenAI definition.

            Compatible with GPT-4o, GPT-4o mini, GPT-4 (Turbo) and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.

            '
          oneOf:
          - $ref: '#/components/schemas/ResponseFormatText'
          - $ref: '#/components/schemas/ResponseFormatJsonObject'
          - $ref: '#/components/schemas/ResponseFormatJsonSchema'
        tools:
          type: array
          description: 'A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.

            '
          items:
            $ref: '#/components/schemas/ChatCompletionTool'
    ResponseFormatJsonSchema:
      type: object
      additionalProperties: false
      properties:
        type:
          type: string
          description: 'The type of response format being defined: `json_schema`'
          enum:
          - json_schema
        json_schema:
          type: object
          additionalProperties: false
          properties:
            description:
              type: string
              description: A description of what the response format is for, used by the model to determine how to respond in the format.
            name:
              type: string
              description: The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
              pattern: ^[a-zA-Z0-9-_]+$
              maxLength: 64
            schema:
              $ref: '#/components/schemas/ResponseFormatJsonSchemaSchema'
            strict:
              type:
              - boolean
              - 'null'
              default: false
              description: Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
          required:
          - name
      required:
      - type
      - json_schema
    MultiChatContent:
      oneOf:
      - $ref: '#/components/schemas/ImageContent'
      - $ref: '#/components/schemas/TextContent'
    PromptTemplateHistoryDeleteResponse:
      type: object
      required:
      - message
      - deleted
      properties:
        message:
          type: string
        deleted:
          type: integer
    PromptTemplateSubstitutionRequest:
      type: object
      required:
      - inputParams
      properties:
        inputParams:
          type: object
    PromptTemplate:
      oneOf:
      - $ref: '#/components/schemas/SingleChatTemplate'
      - $ref: '#/components/schemas/MultiChatTemplate'
    PromptTemplatePostRequest:
      type: object
      required:
      - name
      - version
      - scenario
      - spec
      properties:
        name:
          type: string
          maxLength: 120
          pattern: ^[a-zA-Z0-9_-]+$
        version:
          type: string
          maxLength: 10
          pattern: ^[a-zA-Z0-9._-]+$
        scenario:
          type: string
          maxLength: 120
          pattern: ^[a-zA-Z0-9_-]+$
        spec:
          $ref: '#/components/schemas/PromptTemplateSpec'
    ImageContent:
      type: object
      required:
      - type
      - image_url
      properties:
        type:
          type: string
          enum:
          - image_url
        image_url:
          type: object
          required:
          - url
          additionalProperties: false
          properties:
            url:
              type: string
            detail:
              type: string
              default: auto
    MultiChatTemplate:
      type: object
      required:
      - role
      - content
      additionalProperties: false
      properties:
        role:
          type: string
        content:
          type: array
          items:
            $ref: '#/components/schemas/MultiChatContent'
    FunctionObject:
      type: object
      additionalProperties: false
      properties:
        description:
          type: string
          description: A description of what the function does, used by the model to choose when and how to call the function.
        name:
          type: string
          description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
          pattern: ^[a-zA-Z0-9-_]+$
          maxLength: 64
        parameters:
          $ref: '#/components/schemas/FunctionParameters'
        strict:
          type:
          - boolean
          - 'null'
          default: false
          description: Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).
      required:
      - name
    SingleChatTemplate:
      type: object
      required:
      - role
      - content
      additionalProperties: false
      properties:
        role:
          type: string
        content:
          type: string
    TextContent:
      type: object
      required:
      - type
      - text
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
          - text
        text:
          type: string
  responses:
    NotFound:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    PayloadTooLarge:
      description: Payload Too Large — result set exceeds maximum allowed rows; use $top and $skip to paginate
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    CommonError:
      description: Common Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ForbiddenError:
      description: Forbidden Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  parameters:
    top:
      name: $top
      in: query
      description: Number of results to return (1–500). When omitted the full result set is returned (up to the server limit).
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 500
    ai-resource-group-scope:
      name: AI-Resource-Group-Scope
      in: header
      description: Specify whether the resource group scope is to be used
      required: false
      schema:
        type: string
        enum:
        - 'true'
        - 'True'
        - 'false'
        - 'False'
    ai-resource-group:
      name: AI-Resource-Group
      in: header
      description: Specify a resource group id to use
      required: false
      schema:
        type: string
    skip:
      name: $skip
      in: query
      description: Number of results to skip before returning the page.
      required: false
      schema:
        type: integer
        minimum: 0
        default: 0
  securitySchemes:
    Oauth2:
      type: oauth2
      description: OAuth client credentials (client ID and secret) are required. These can be requested from SAP BTP cloud cockpit.
      flows:
        clientCredentials:
          tokenUrl: https://(subdomain_identity_zone).authentication.(host)/oauth/token
          scopes: {}
externalDocs:
  description: Documentation for SAP AI Core - Prompt Registry
  url: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/prompt-registry?version=CLOUD
x-refined-from:
- prompt-registry.yaml
- sap-btp-prompt-registry-openapi.yml
x-sap-shortText: Create and manage AI scenarios, trainings, deployments, and artifacts in SAP AI Core.