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

# Get Model

> ### Description
Gets the details of a model

### Details
This API can be used to get information about a single model by ID. To use this API, pass in the `id` that was returned from your Create Model API call as a path parameter.

Review the response schema to see the fields that will be returned.



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml get /v4/models/{model_id}
openapi: 3.1.0
info:
  title: EGP API V4
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/models/{model_id}:
    get:
      tags:
        - Models
      summary: Get Model
      description: >-
        ### Description

        Gets the details of a model


        ### Details

        This API can be used to get information about a single model by ID. To
        use this API, pass in the `id` that was returned from your Create Model
        API call as a path parameter.


        Review the response schema to see the fields that will be returned.
      operationId: GET-V4-/models/{model_id}
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
        - name: view
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/ModelInstanceViewsOptions'
              - type: 'null'
            title: View
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelInstanceResponseWithViews'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from scale_gp import SGPClient

            client = SGPClient(
                api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
            )
            model_instance_with_views = client.models.retrieve(
                model_id="model_id",
            )
            print(model_instance_with_views.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/sgp-go\"\n\t\"github.com/stainless-sdks/sgp-go/option\"\n)\n\nfunc main() {\n\tclient := sgp.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmodelInstanceWithViews, err := client.Models.Get(\n\t\tcontext.TODO(),\n\t\t\"model_id\",\n\t\tsgp.ModelGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", modelInstanceWithViews.ID)\n}\n"
components:
  schemas:
    ModelInstanceViewsOptions:
      type: string
      enum:
        - Deployments
        - ModelGroup
      title: ModelInstanceViewsOptions
    ModelInstanceResponseWithViews:
      properties:
        model_group:
          $ref: '#/components/schemas/ModelGroupResponse'
        deployments:
          title: Deployments
          items:
            $ref: '#/components/schemas/ModelDeploymentResponse'
          type: array
        name:
          type: string
          title: Name
        display_name:
          title: Display Name
          type: string
        model_vendor:
          $ref: '#/components/schemas/ModelVendor'
        model_type:
          $ref: '#/components/schemas/ModelType'
        base_model_id:
          title: Base Model Id
          type: string
        base_model_metadata:
          $ref: '#/components/schemas/BaseModelMetadata'
        model_creation_parameters:
          title: Model Creation Parameters
          additionalProperties: true
          type: object
        model_card:
          title: Model Card
          type: string
        training_data_card:
          title: Training Data Card
          type: string
        description:
          title: Description
          type: string
        model_template_id:
          title: Model Template Id
          type: string
        model_group_id:
          title: Model Group Id
          type: string
        id:
          type: string
          title: Id
          description: The unique identifier of the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the entity was created in ISO format.
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
        created_by_user_id:
          type: string
          title: Created By User Id
          description: The user who originally created the entity.
        created_by_identity_type:
          $ref: '#/components/schemas/IdentifierTypeEnum'
          description: The type of identity that created the entity.
        request_schema:
          additionalProperties: true
          type: object
          title: Request Schema
          description: JSON schema for the requests to the model instance
        response_schema:
          additionalProperties: true
          type: object
          title: Response Schema
          description: JSON schema for the response to the model
        deployment_count:
          type: integer
          title: Deployment Count
          description: Number of deployments of this model instance
        supports_multi_turn:
          type: boolean
          title: Supports Multi Turn
          description: True if a model supports multi-turn conversations natively
      type: object
      required:
        - name
        - model_type
        - id
        - created_at
        - account_id
        - created_by_user_id
        - created_by_identity_type
        - request_schema
        - response_schema
        - deployment_count
        - supports_multi_turn
      title: ModelInstanceResponseWithViews
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ModelGroupResponse:
      properties:
        name:
          type: string
          title: Name
        description:
          title: Description
          type: string
        id:
          type: string
          title: Id
          description: The unique identifier of the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the entity was created in ISO format.
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
        created_by_user_id:
          type: string
          title: Created By User Id
          description: The user who originally created the entity.
        created_by_identity_type:
          $ref: '#/components/schemas/IdentifierTypeEnum'
          description: The type of identity that created the entity.
      type: object
      required:
        - name
        - id
        - created_at
        - account_id
        - created_by_user_id
        - created_by_identity_type
      title: ModelGroupResponse
    ModelDeploymentResponse:
      properties:
        name:
          type: string
          title: Name
        model_creation_parameters:
          title: Model Creation Parameters
          additionalProperties: true
          type: object
        model_endpoint_id:
          title: Model Endpoint Id
          type: string
        model_instance_id:
          title: Model Instance Id
          type: string
        vendor_configuration:
          $ref: '#/components/schemas/DeploymentVendorConfiguration'
        deployment_metadata:
          title: Deployment Metadata
          additionalProperties: true
          type: object
        id:
          type: string
          title: Id
          description: The unique identifier of the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the entity was created in ISO format.
        account_id:
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
          optional_in_request: true
          type: string
        created_by_user_id:
          type: string
          title: Created By User Id
          description: The user who originally created the entity.
        created_by_identity_type:
          $ref: '#/components/schemas/IdentifierTypeEnum'
          description: The type of identity that created the entity.
        status:
          type: string
          title: Status
          description: Status of the model's deployment.
      type: object
      required:
        - name
        - id
        - created_at
        - account_id
        - created_by_user_id
        - created_by_identity_type
        - status
      title: ModelDeploymentResponse
    ModelVendor:
      type: string
      enum:
        - OPENAI
        - COHERE
        - GOOGLE
        - VERTEX_AI
        - ANTHROPIC
        - LAUNCH
        - LLMENGINE
        - BEDROCK
        - FIREWORKS_AI
        - OTHER
      title: ModelVendor
      description: |-
        An enum representing the different types of model vendors supported.

        Attributes:
            OPENAI: Denotes that the model vendor is OpenAI.
            COHERE: Denotes that the model vendor is Cohere.
            GOOGLE: Denotes that the model vendor is Google.
            ANTHROPIC: Denotes that the model vendor is Anthropic.
            LLMENGINE: Denotes that the model vendor is LLM Engine.
            OTHER: Denotes that the model vendor is Other.
    ModelType:
      type: string
      enum:
        - COMPLETION
        - CHAT_COMPLETION
        - AGENT
        - EMBEDDING
        - RERANKING
        - GENERIC
        - BUNDLE
      title: ModelType
      description: |-
        An enum representing the different types of models supported.

        Attributes:
            COMPLETION: Denotes that the model type is completion.
            CHAT_COMPLETION: Denotes that the model type is chat completion.
            AGENT: Denotes that the model type is agent.
            EMBEDDING: Denotes that the model type is embedding.
            RERANKING: Denotes that the model type is reranking.
            GENERIC: Denotes that the model type is generic.
            BUNDLE: "Not to be used directly - type to surface a model bundle in the UI - TODO: Explicitly type a bundle
    BaseModelMetadata:
      properties:
        ui_model_section_type:
          $ref: '#/components/schemas/UiModelSectionType'
        model_developer:
          title: Model Developer
          type: string
        model_license_url:
          title: Model License Url
          type: string
        delivery_date:
          title: Delivery Date
          type: string
        modelDetails:
          $ref: '#/components/schemas/BaseModelDetails'
      type: object
      title: BaseModelMetadata
    IdentifierTypeEnum:
      type: string
      enum:
        - user
        - service_account
      title: IdentifierTypeEnum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    DeploymentVendorConfiguration:
      oneOf:
        - $ref: '#/components/schemas/LaunchDeploymentVendorConfiguration'
        - $ref: '#/components/schemas/LLMEngineDeploymentVendorConfiguration'
      title: DeploymentVendorConfiguration
      discriminator:
        propertyName: vendor
        mapping:
          LAUNCH:
            $ref: '#/components/schemas/LaunchDeploymentVendorConfiguration'
          LLMENGINE:
            $ref: '#/components/schemas/LLMEngineDeploymentVendorConfiguration'
    UiModelSectionType:
      type: string
      enum:
        - PARTNER
        - OPENSOURCE
        - CUSTOM
      title: UiModelSectionType
    BaseModelDetails:
      properties:
        number_of_parameters:
          title: Number Of Parameters
          type: integer
        token_context_window:
          title: Token Context Window
          type: integer
        languages:
          title: Languages
          type: integer
        alignments:
          title: Alignments
          type: integer
      type: object
      title: BaseModelDetails
    LaunchDeploymentVendorConfiguration:
      properties:
        min_workers:
          type: integer
          title: Min Workers
          default: 0
        max_workers:
          type: integer
          title: Max Workers
          default: 1
        per_worker:
          type: integer
          title: Per Worker
          description: >-
            The maximum number of concurrent requests that an individual worker
            can

            service. Launch automatically scales the number of workers for the
            endpoint so that

            each worker is processing ``per_worker`` requests, subject to the
            limits defined by

            ``min_workers`` and ``max_workers``.


            - If the average number of concurrent requests per worker is lower
            than

            ``per_worker``, then the number of workers will be reduced. -
            Otherwise,

            if the average number of concurrent requests per worker is higher
            than

            ``per_worker``, then the number of workers will be increased to meet
            the elevated

            traffic.


            Here is our recommendation for computing ``per_worker``:


            1. Compute ``min_workers`` and ``max_workers`` per your minimum and
            maximum

            throughput requirements. 2. Determine a value for the maximum number
            of

            concurrent requests in the workload. Divide this number by
            ``max_workers``. Doing

            this ensures that the number of workers will "climb" to
            ``max_workers``.
          default: 10
        vendor:
          type: string
          const: LAUNCH
          title: Vendor
          default: LAUNCH
      type: object
      title: LaunchDeploymentVendorConfiguration
    LLMEngineDeploymentVendorConfiguration:
      properties:
        cpus:
          type: integer
          title: Cpus
          default: 3
        memory:
          type: string
          title: Memory
          default: 8Gi
        storage:
          type: string
          title: Storage
          default: 16Gi
        gpus:
          type: integer
          title: Gpus
          default: 0
        gpu_type:
          $ref: '#/components/schemas/GPUType'
        min_workers:
          type: integer
          title: Min Workers
          default: 0
        max_workers:
          type: integer
          title: Max Workers
          default: 1
        per_worker:
          type: integer
          title: Per Worker
          description: >-
            The maximum number of concurrent requests that an individual worker
            can

            service. Launch automatically scales the number of workers for the
            endpoint so that

            each worker is processing ``per_worker`` requests, subject to the
            limits defined by

            ``min_workers`` and ``max_workers``.


            - If the average number of concurrent requests per worker is lower
            than

            ``per_worker``, then the number of workers will be reduced. -
            Otherwise,

            if the average number of concurrent requests per worker is higher
            than

            ``per_worker``, then the number of workers will be increased to meet
            the elevated

            traffic.


            Here is our recommendation for computing ``per_worker``:


            1. Compute ``min_workers`` and ``max_workers`` per your minimum and
            maximum

            throughput requirements. 2. Determine a value for the maximum number
            of

            concurrent requests in the workload. Divide this number by
            ``max_workers``. Doing

            this ensures that the number of workers will "climb" to
            ``max_workers``.
          default: 10
        vendor:
          type: string
          const: LLMENGINE
          title: Vendor
          default: LLMENGINE
        high_priority:
          title: High Priority
          default: false
          type: boolean
        num_shards:
          type: integer
          title: Num Shards
          default: 4
        checkpoint_path:
          title: Checkpoint Path
          type: string
        model_name:
          title: Model Name
          type: string
        base_model_name:
          title: Base Model Name
          type: string
        inference_framework_image_tag:
          title: Inference Framework Image Tag
          type: string
      type: object
      title: LLMEngineDeploymentVendorConfiguration
    GPUType:
      type: string
      enum:
        - nvidia-tesla-t4
        - nvidia-ampere-a10
        - nvidia-ampere-a100
        - nvidia-ampere-a100e
        - nvidia-hopper-h100
        - nvidia-hopper-h100-1g20gb
        - nvidia-hopper-h100-3g40gb
      title: GPUType

````