> ## 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.

# Get Model Parameters

> Fetches the configured model parameters and messages rendered with the provided variables mapped to the set LLM provider. This endpoint abstracts the need to handle mapping between different providers, while still allowing direct calls to the providers.



## OpenAPI

````yaml post /sdk/v1/prompts/{id}
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/{id}:
    post:
      summary: Get Model Parameters
      description: >-
        Fetches the configured model parameters and messages rendered with the
        provided variables mapped to the set LLM provider. This endpoint
        abstracts the need to handle mapping between different providers, while
        still allowing direct calls to the providers.
      operationId: getModelParams
      parameters:
        - schema:
            type: string
            example: '1212121'
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetModelParametersBody'
      responses:
        '200':
          description: Successfully retrieved the prompt configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelNonStreamingParameters'
        '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'
        '404':
          description: Not found
          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 response = await client.prompts.getParameters('1212121');

              console.log(response);
            }

            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"),
            )
            response = client.prompts.get_parameters(
                id="1212121",
            )
            print(response)
components:
  schemas:
    GetModelParametersBody:
      type: object
      properties:
        variables:
          $ref: '#/components/schemas/PromptVariables'
        overrideMessages:
          type: array
          items:
            $ref: '#/components/schemas/ConversationMessage'
          description: Replaces the configured prompt messages when running the prompt.
        appendMessages:
          type: array
          items:
            $ref: '#/components/schemas/ConversationMessage'
          description: >-
            Appended the the end of the configured prompt messages before
            running the prompt.
        user:
          type: string
          description: >-
            A unique identifier representing your end-user, which can help
            monitor and detect abuse.
    ModelNonStreamingParameters:
      oneOf:
        - type: object
          properties:
            provider:
              type: string
              enum:
                - anthropic
            name:
              type: string
            parameters:
              $ref: >-
                #/components/schemas/AnthropicMessageCreateParamsNonStreamingSchema
          required:
            - provider
            - name
            - parameters
          title: AnthropicModelNonStreamingParameters
        - type: object
          properties:
            provider:
              type: string
              enum:
                - openai
            name:
              type: string
            parameters:
              $ref: >-
                #/components/schemas/OpenAIChatCompletionCreateParamsNonStreaming
          required:
            - provider
            - name
            - parameters
          title: OpenAIModelNonStreamingParameters
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: 'Example: "Prompt ID is required."'
      required:
        - error
    PromptVariables:
      type: object
      additionalProperties:
        type: string
        nullable: true
      description: The template variables added to the prompt when executing the prompt.
    ConversationMessage:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/MessageContentBlockSchema'
        role:
          $ref: '#/components/schemas/PromptMessageRole'
      required:
        - content
        - role
    AnthropicMessageCreateParamsNonStreamingSchema:
      allOf:
        - $ref: '#/components/schemas/AnthropicMessageCreateParamsBase'
        - type: object
          properties:
            stream:
              type: boolean
              enum:
                - false
          required:
            - stream
    OpenAIChatCompletionCreateParamsNonStreaming:
      allOf:
        - $ref: '#/components/schemas/OpenAIChatCompletionCreateParamsBase'
        - type: object
          properties:
            stream:
              type: boolean
              enum:
                - false
          required:
            - stream
    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
    AnthropicMessageCreateParamsBase:
      type: object
      properties:
        max_tokens:
          type: number
        messages:
          type: array
          items:
            $ref: '#/components/schemas/AnthropicMessageParam'
        model:
          anyOf:
            - type: string
            - type: string
              enum:
                - claude-3-5-sonnet-20240620
                - claude-3-opus-20240229
                - claude-3-sonnet-20240229
                - claude-3-haiku-20240307
        metadata:
          type: object
          properties:
            user_id:
              type: string
              nullable: true
          title: MessageCreateParamsMetadata
        stop_sequences:
          type: array
          items:
            type: string
        system:
          type: string
        temperature:
          type: number
        tool_choice:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - auto
              required:
                - type
              title: MessageCreateParamsToolChoiceAuto
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - any
              required:
                - type
              title: MessageCreateParamsToolChoiceAny
            - type: object
              properties:
                name:
                  type: string
                type:
                  type: string
                  enum:
                    - tool
              required:
                - name
                - type
              title: MessageCreateParamsToolChoiceTool
        tools:
          type: array
          items:
            type: object
            properties:
              input_schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - object
                  properties:
                    nullable: true
                required:
                  - type
                additionalProperties:
                  nullable: true
                title: ToolInputSchema
              name:
                type: string
              description:
                type: string
            required:
              - input_schema
              - name
            title: ToolSchema
        top_k:
          type: number
        top_p:
          type: number
      required:
        - max_tokens
        - messages
        - model
    OpenAIChatCompletionCreateParamsBase:
      type: object
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/OpenAIChatCompletionRequestMessage'
          minItems: 1
        model:
          type: string
        frequency_penalty:
          type: number
          nullable: true
          minimum: -2
          maximum: 2
          default: 0
        logit_bias:
          type: object
          nullable: true
          additionalProperties:
            type: integer
        logprobs:
          type: boolean
          nullable: true
          default: false
        top_logprobs:
          type: integer
          nullable: true
          minimum: 0
          maximum: 20
        max_tokens:
          type: integer
          nullable: true
        'n':
          type: integer
          nullable: true
          minimum: 1
          maximum: 128
          default: 1
        presence_penalty:
          type: number
          nullable: true
          minimum: -2
          maximum: 2
          default: 0
        response_format:
          oneOf:
            - $ref: '#/components/schemas/OpenAIResponseFormatText'
            - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject'
            - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema'
          discriminator:
            propertyName: type
            mapping:
              text: '#/components/schemas/OpenAIResponseFormatText'
              json_object: '#/components/schemas/OpenAIResponseFormatJSONObject'
              json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema'
        seed:
          type: integer
          nullable: true
          minimum: -9223372036854776000
          maximum: 9223372036854776000
        stop:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
        temperature:
          type: number
          nullable: true
          minimum: 0
          maximum: 2
          default: 1
        top_p:
          type: number
          nullable: true
          minimum: 0
          maximum: 1
          default: 1
        tools:
          type: array
          items:
            $ref: '#/components/schemas/OpenAIChatCompletionTool'
        tool_choice:
          $ref: '#/components/schemas/OpenAIChatCompletionToolChoiceOption'
        parallel_tool_calls:
          $ref: '#/components/schemas/OpenAIParallelToolCalls'
        user:
          type: string
      required:
        - messages
        - model
        - response_format
    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
    AnthropicMessageParam:
      type: object
      properties:
        content:
          anyOf:
            - type: string
            - type: array
              items:
                anyOf:
                  - type: object
                    properties:
                      text:
                        type: string
                      type:
                        type: string
                        enum:
                          - text
                    required:
                      - text
                      - type
                    title: TextBlockParam
                  - type: object
                    properties:
                      source:
                        type: object
                        properties:
                          data:
                            type: string
                          media_type:
                            type: string
                            enum:
                              - image/jpeg
                              - image/png
                              - image/gif
                              - image/webp
                          type:
                            type: string
                            enum:
                              - base64
                        required:
                          - data
                          - media_type
                          - type
                        title: ImageBlockParamSource
                      type:
                        type: string
                        enum:
                          - image
                    required:
                      - source
                      - type
                    title: ImageBlockParam
                  - type: object
                    properties:
                      id:
                        type: string
                      input:
                        type: object
                        additionalProperties:
                          type: string
                      name:
                        type: string
                      type:
                        type: string
                        enum:
                          - tool_use
                    required:
                      - id
                      - input
                      - name
                      - type
                    title: ToolUseBlockParam
                  - type: object
                    properties:
                      tool_use_id:
                        type: string
                      type:
                        type: string
                        enum:
                          - tool_result
                      content:
                        anyOf:
                          - type: string
                          - type: array
                            items:
                              anyOf:
                                - type: object
                                  properties:
                                    text:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - text
                                  required:
                                    - text
                                    - type
                                  title: TextBlockParam
                                - type: object
                                  properties:
                                    source:
                                      type: object
                                      properties:
                                        data:
                                          type: string
                                        media_type:
                                          type: string
                                          enum:
                                            - image/jpeg
                                            - image/png
                                            - image/gif
                                            - image/webp
                                        type:
                                          type: string
                                          enum:
                                            - base64
                                      required:
                                        - data
                                        - media_type
                                        - type
                                      title: ImageBlockParamSource
                                    type:
                                      type: string
                                      enum:
                                        - image
                                  required:
                                    - source
                                    - type
                                  title: ImageBlockParam
                      is_error:
                        type: boolean
                    required:
                      - tool_use_id
                      - type
                    title: ToolResultBlockParam
        role:
          type: string
          enum:
            - user
            - assistant
      required:
        - content
        - role
    OpenAIChatCompletionRequestMessage:
      anyOf:
        - $ref: '#/components/schemas/OpenAIChatCompletionRequestSystemMessage'
        - $ref: '#/components/schemas/OpenAIChatCompletionRequestUserMessage'
        - $ref: '#/components/schemas/OpenAIChatCompletionRequestAssistantMessage'
        - $ref: '#/components/schemas/OpenAIChatCompletionRequestToolMessage'
        - $ref: '#/components/schemas/OpenAIChatCompletionRequestFunctionMessage'
      title: OpenAIChatCompletionRequestMessage
    OpenAIResponseFormatText:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
      required:
        - type
      title: OpenAIResponseFormatText
    OpenAIResponseFormatJSONObject:
      type: object
      properties:
        type:
          type: string
          enum:
            - json_object
      required:
        - type
      title: OpenAIResponseFormatJSONObject
    OpenAIResponseFormatJSONSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - json_schema
        json_schema:
          type: object
          properties:
            name:
              type: string
            description:
              type: string
            schema:
              type: object
              additionalProperties:
                nullable: true
            strict:
              type: boolean
              nullable: true
          required:
            - name
            - strict
      required:
        - type
        - json_schema
      title: OpenAIResponseFormatJSONSchema
    OpenAIChatCompletionTool:
      type: object
      properties:
        type:
          type: string
          enum:
            - function
        function:
          $ref: '#/components/schemas/OpenAIFunctionObject'
      required:
        - type
        - function
      title: OpenAIChatCompletionTool
    OpenAIChatCompletionToolChoiceOption:
      anyOf:
        - type: string
          enum:
            - none
            - auto
            - required
        - $ref: '#/components/schemas/OpenAIChatCompletionNamedToolChoice'
      title: OpenAIChatCompletionToolChoiceOption
    OpenAIParallelToolCalls:
      type: boolean
      default: true
    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
    OpenAIChatCompletionRequestSystemMessage:
      type: object
      properties:
        content:
          type: string
        role:
          type: string
          enum:
            - system
        name:
          type: string
      required:
        - content
        - role
      title: OpenAIChatCompletionRequestSystemMessage
    OpenAIChatCompletionRequestUserMessage:
      type: object
      properties:
        content:
          anyOf:
            - type: string
            - type: array
              items:
                $ref: >-
                  #/components/schemas/OpenAIChatCompletionRequestMessageContentPart
        role:
          type: string
          enum:
            - user
        name:
          type: string
      required:
        - content
        - role
      title: OpenAIChatCompletionRequestUserMessage
    OpenAIChatCompletionRequestAssistantMessage:
      type: object
      properties:
        content:
          type: string
          nullable: true
        role:
          type: string
          enum:
            - assistant
        name:
          type: string
        tool_calls:
          type: array
          items:
            $ref: '#/components/schemas/OpenAIChatCompletionMessageToolCall'
        function_call:
          type: object
          nullable: true
          properties:
            arguments:
              type: string
            name:
              type: string
          required:
            - arguments
            - name
      required:
        - role
      title: OpenAIChatCompletionRequestAssistantMessage
    OpenAIChatCompletionRequestToolMessage:
      type: object
      properties:
        role:
          type: string
          enum:
            - tool
        content:
          type: string
        tool_call_id:
          type: string
      required:
        - role
        - content
        - tool_call_id
      title: OpenAIChatCompletionRequestToolMessage
    OpenAIChatCompletionRequestFunctionMessage:
      type: object
      properties:
        role:
          type: string
          enum:
            - function
        content:
          type: string
          nullable: true
        name:
          type: string
      required:
        - role
        - content
        - name
      title: OpenAIChatCompletionRequestFunctionMessage
    OpenAIFunctionObject:
      type: object
      properties:
        description:
          type: string
        name:
          type: string
        parameters:
          $ref: '#/components/schemas/OpenAIFunctionParameters'
      required:
        - name
      title: OpenAIFunctionObject
    OpenAIChatCompletionNamedToolChoice:
      type: object
      properties:
        type:
          type: string
          enum:
            - function
        function:
          type: object
          properties:
            name:
              type: string
          required:
            - name
      required:
        - type
        - function
      title: OpenAIChatCompletionNamedToolChoice
    OpenAIChatCompletionRequestMessageContentPart:
      anyOf:
        - $ref: >-
            #/components/schemas/OpenAIChatCompletionRequestMessageContentPartText
        - $ref: >-
            #/components/schemas/OpenAIChatCompletionRequestMessageContentPartImage
      title: OpenAIChatCompletionRequestMessageContentPart
    OpenAIChatCompletionMessageToolCall:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - function
        function:
          type: object
          properties:
            name:
              type: string
            arguments:
              type: string
          required:
            - name
            - arguments
      required:
        - id
        - type
        - function
      title: OpenAIChatCompletionMessageToolCall
    OpenAIFunctionParameters:
      type: object
      additionalProperties:
        nullable: true
    OpenAIChatCompletionRequestMessageContentPartText:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
      required:
        - type
        - text
      title: OpenAIChatCompletionRequestMessageContentPartText
    OpenAIChatCompletionRequestMessageContentPartImage:
      type: object
      properties:
        type:
          type: string
          enum:
            - image_url
        image_url:
          type: object
          properties:
            url:
              type: string
              format: uri
            detail:
              type: string
              enum:
                - auto
                - low
                - high
              default: auto
          required:
            - url
      required:
        - type
        - image_url
      title: OpenAIChatCompletionRequestMessageContentPartImage

````