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

# List Prompts

> Retrieve all prompts



## OpenAPI

````yaml get /sdk/v1/prompts
openapi: 3.0.0
info:
  title: Prompt Foundry API
  version: 1.0.0
  description: The API for managing prompts, tools, evaluations, and evaluation assertions.
servers:
  - url: https://api.promptfoundry.ai
    description: Prompt Foundry Production API
security: []
paths:
  /sdk/v1/prompts:
    get:
      summary: List Prompts
      description: Retrieve all prompts
      operationId: getPrompts
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PromptConfiguration'
        '400':
          description: Missing or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import PromptFoundry from '@prompt-foundry/typescript-sdk';

            const client = new PromptFoundry({
              apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const promptConfigurations = await client.prompts.list();

              console.log(promptConfigurations);
            }

            main();
        - lang: Python
          source: |-
            import os
            from prompt_foundry_python_sdk import PromptFoundry

            client = PromptFoundry(
                # This is the default and can be omitted
                api_key=os.environ.get("PROMPT_FOUNDRY_API_KEY"),
            )
            prompt_configurations = client.prompts.list()
            print(prompt_configurations)
components:
  schemas:
    PromptConfiguration:
      type: object
      properties:
        id:
          type: string
          description: 'Example: "PROMPT_1"'
        name:
          type: string
          description: 'Example: "Check the weather"'
        parameters:
          type: object
          properties:
            provider:
              $ref: '#/components/schemas/LLMProviders'
            name:
              type: string
              description: The name of the model for the provider.
            responseFormat:
              type: string
              enum:
                - JSON
                - TEXT
              description: 'Example: PromptResponseFormat.TEXT'
            temperature:
              type: number
              description: 'Example: 1'
            topP:
              type: number
              description: 'Example: 1'
            topK:
              type: number
              nullable: true
              minimum: 1
              description: 'Example: 50'
            frequencyPenalty:
              type: number
              description: 'Example: 0'
            presencePenalty:
              type: number
              description: 'Example: 0'
            maxTokens:
              type: number
              nullable: true
              description: 'Example: 100'
            seed:
              type: number
              nullable: true
              description: 'Example: 97946543'
            toolChoice:
              type: string
              nullable: true
            stream:
              type: boolean
            parallelToolCalls:
              type: boolean
          required:
            - provider
            - name
            - responseFormat
            - temperature
            - topP
            - topK
            - frequencyPenalty
            - presencePenalty
            - maxTokens
            - seed
            - toolChoice
            - stream
            - parallelToolCalls
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ConversationMessage'
          description: The configured messages WITHOUT variables replaced.
        tools:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: >-
                  The initial messages to be included with your call to the LLM
                  API.
              name:
                type: string
                pattern: ^[a-zA-Z0-9_-]{1,64}$
                description: >-
                  The name of the tool to be called. Must be a-z, A-Z, 0-9, or
                  contain underscores and dashes, with a maximum length of 64.
              description:
                type: string
                description: >-
                  A description of what the tool does, used by the model to
                  choose when and how to call the tool.
              parameters:
                $ref: '#/components/schemas/ToolParameters'
            required:
              - id
              - name
              - description
              - parameters
      required:
        - id
        - name
        - parameters
        - messages
        - tools
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: 'Example: "Prompt ID is required."'
      required:
        - error
    LLMProviders:
      type: string
      enum:
        - ANTHROPIC
        - OPENAI
      description: The LLM model provider.
    ConversationMessage:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/MessageContentBlockSchema'
        role:
          $ref: '#/components/schemas/PromptMessageRole'
      required:
        - content
        - role
    ToolParameters:
      type: object
      additionalProperties:
        nullable: true
      description: >-
        The parameters the functions accepts, described as a JSON Schema object.
        This schema is designed to match the TypeScript Record<string, unknown>,
        allowing for any properties with values of any type.
    MessageContentBlockSchema:
      oneOf:
        - $ref: '#/components/schemas/TextContentBlock'
        - $ref: '#/components/schemas/ImageBase64ContentBlock'
        - $ref: '#/components/schemas/ToolCallContentBlock'
        - $ref: '#/components/schemas/ToolResultContentBlock'
      discriminator:
        propertyName: type
        mapping:
          TEXT: '#/components/schemas/TextContentBlock'
          IMAGE_BASE64: '#/components/schemas/ImageBase64ContentBlock'
          TOOL_CALL: '#/components/schemas/ToolCallContentBlock'
          TOOL_RESULT: '#/components/schemas/ToolResultContentBlock'
    PromptMessageRole:
      type: string
      enum:
        - assistant
        - system
        - tool
        - user
    TextContentBlock:
      type: object
      properties:
        type:
          type: string
          enum:
            - TEXT
        text:
          type: string
      required:
        - type
        - text
      title: TextContentBlock
    ImageBase64ContentBlock:
      type: object
      properties:
        type:
          type: string
          enum:
            - IMAGE_BASE64
        imageBase64:
          type: string
        mediaType:
          type: string
      required:
        - type
        - imageBase64
        - mediaType
      title: ImageBase64ContentBlock
    ToolCallContentBlock:
      type: object
      properties:
        type:
          type: string
          enum:
            - TOOL_CALL
        toolCall:
          $ref: '#/components/schemas/ToolFunctionCall'
      required:
        - type
        - toolCall
      title: ToolCallContentBlock
    ToolResultContentBlock:
      type: object
      properties:
        type:
          type: string
          enum:
            - TOOL_RESULT
        toolCallId:
          type: string
        result:
          type: string
      required:
        - type
        - toolCallId
        - result
      title: ToolResultContentBlock
    ToolFunctionCall:
      type: object
      properties:
        toolCallId:
          type: string
          description: TOOL_CALL_1
        type:
          type: string
          enum:
            - function
          description: The type of the tool. Currently, only `function` is supported.
        function:
          type: object
          properties:
            arguments:
              type: string
              description: >-
                The arguments to call the function with, as generated by the
                model in JSON format. Note that the model does not always
                generate valid JSON, and may hallucinate parameters not defined
                by your function schema. Validate the arguments in your code
                before calling your function.
            name:
              type: string
              description: The name of the function to call.
          required:
            - arguments
            - name
      required:
        - toolCallId
        - type
        - function

````