> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asserto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt by slug

> Get single prompt by slug.

Get only major versions



## OpenAPI

````yaml GET /api/prompts/{slug}
openapi: 3.1.0
info:
  title: Asserto AI - API
  description: API for Asserto  AI
  version: 0.1.0
servers:
  - url: https://app.asserto.ai
    description: Production server
security: []
paths:
  /api/prompts/{slug}:
    get:
      tags:
        - API
      summary: Prompt by Slug
      description: |-
        Get single prompt by slug.

        Get only major versions
      operationId: prompts_get_api_prompts__slug__get
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            title: Slug
        - name: authorization
          in: header
          required: false
          schema:
            type: string
            description: 'API Key in the format: `Authorization: ApiKey <key>`'
            title: Authorization
          description: 'API Key in the format: `Authorization: ApiKey <key>`'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PromptSchema:
      properties:
        slug:
          type: string
          title: Slug
        messages:
          items:
            $ref: '#/components/schemas/MCP_PromptMessage'
          type: array
          title: Messages
        model:
          $ref: '#/components/schemas/ModelInfo'
        genParams:
          $ref: '#/components/schemas/GenerationParams'
        respFormat:
          type: string
          title: Respformat
        outputSchema:
          anyOf:
            - $ref: '#/components/schemas/SchemaJsonFormat'
            - type: 'null'
        variables:
          items:
            type: string
          type: array
          title: Variables
          default: []
        tools:
          anyOf:
            - items:
                $ref: '#/components/schemas/MCP_ToolDef'
              type: array
            - type: 'null'
          title: Tools
      type: object
      required:
        - slug
        - messages
        - model
        - genParams
        - respFormat
        - tools
      title: PromptSchema
      description: Prompt info with nested tool definitions
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MCP_PromptMessage:
      properties:
        role:
          type: string
          title: Role
        content:
          $ref: '#/components/schemas/ContentText'
      type: object
      required:
        - role
        - content
      title: MCP_PromptMessage
      description: prompt message as used in MCP protocol
    ModelInfo:
      properties:
        id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Id
        name:
          type: string
          title: Name
        kind:
          type: string
          enum:
            - system
            - custom
          title: Kind
        provider:
          type: string
          title: Provider
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config
        pricing:
          anyOf:
            - $ref: '#/components/schemas/LLMPricing'
            - type: 'null'
      type: object
      required:
        - name
        - kind
        - provider
      title: ModelInfo
    GenerationParams:
      properties:
        temperature:
          type: number
          title: Temperature
          default: 0.1
      type: object
      title: GenerationParams
    SchemaJsonFormat:
      properties:
        name:
          type: string
          pattern: ^[a-zA-Z0-9_-]+$
          title: Name
          description: 'Schema name. Must match pattern: ^[a-zA-Z0-9_-]+$'
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: A brief description of the Schema.
        schema:
          $ref: '#/components/schemas/SchemaJsonProperties'
          description: Schema that describes the output.
        strict:
          type: boolean
          title: Strict
          default: false
      type: object
      required:
        - name
        - schema
      title: SchemaJsonFormat
      description: Schema for response when using response format json_schema
    MCP_ToolDef:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
          default: ''
        inputSchema:
          $ref: '#/components/schemas/MCP_Tool_InputSchema'
      type: object
      required:
        - name
        - inputSchema
      title: MCP_ToolDef
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ContentText:
      properties:
        type:
          type: string
          const: text
          title: Type
        text:
          type: string
          title: Text
      type: object
      required:
        - type
        - text
      title: ContentText
    LLMPricing:
      properties:
        tkInput:
          type: string
          title: Tkinput
        tkOutput:
          type: string
          title: Tkoutput
        tkCacheWrite:
          anyOf:
            - type: string
            - type: 'null'
          title: Tkcachewrite
        tkCacheRead:
          anyOf:
            - type: string
            - type: 'null'
          title: Tkcacheread
      type: object
      required:
        - tkInput
        - tkOutput
      title: LLMPricing
      description: Pricing in USD per 1M tokens
    SchemaJsonProperties:
      properties:
        type:
          type: string
          const: object
          title: Type
          default: object
        properties:
          additionalProperties:
            $ref: '#/components/schemas/SchemaJsonProp'
          type: object
          title: Properties
          description: Dictionary of parameter names to their definitions.
        required:
          items:
            type: string
          type: array
          title: Required
          description: List of required parameters.
          default: []
        additionalProperties:
          type: boolean
          title: Additionalproperties
          description: Indicates if additional properties are allowed.
          default: false
      type: object
      required:
        - properties
      title: SchemaJsonProperties
    MCP_Tool_InputSchema:
      properties:
        type:
          type: string
          const: object
          title: Type
          default: object
        properties:
          additionalProperties: true
          type: object
          title: Properties
        required:
          items:
            type: string
          type: array
          title: Required
      type: object
      required:
        - properties
        - required
      title: MCP_Tool_InputSchema
    SchemaJsonProp:
      properties:
        type:
          type: string
          title: Type
          description: The data type of the parameter, e.g., 'string', 'number', 'object'.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description of the parameter.
        properties:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/SchemaJsonProp'
              type: object
            - type: 'null'
          title: Properties
          description: Dictionary of parameter names to their definitions.
      additionalProperties: true
      type: object
      required:
        - type
      title: SchemaJsonProp

````