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

# Get model

> Get a model by its ID.



## OpenAPI

````yaml /openapi.json get /api/svc/v1/models/{id}
openapi: 3.1.0
info:
  title: TrueFoundry API
  description: API for TrueFoundry
  version: 0.1.0
  contact: {}
servers:
  - url: https://{controlPlaneURL}
    variables:
      controlPlaneURL:
        default: example-company.truefoundry.cloud
        description: Control Plane URL
security: []
tags:
  - name: Agent
  - name: Agent Skills
  - name: Applications
  - name: Metrics
  - name: Apply
  - name: Artifacts
  - name: Audit Logs
  - name: Clusters
  - name: Jobs
  - name: LLM Gateway Budgets
  - name: Logs
  - name: MCP Registry
  - name: MCP Servers V2
  - name: MLRepos
  - name: Model Deployments
  - name: Models
  - name: Personal Access Tokens
  - name: Prompts
  - name: Provider Integrations
  - name: SCIM v2
  - name: Secret Groups
  - name: Secrets
  - name: Teams
  - name: Traces
  - name: Users
  - name: Virtual Accounts
  - name: Role Bindings
  - name: Workspaces
  - name: Provider Accounts
paths:
  /api/svc/v1/models/{id}:
    get:
      tags:
        - Models
      summary: Get model
      description: Get a model by its ID.
      operationId: Model.getModel
      parameters:
        - name: id
          required: true
          in: path
          description: Unique identifier of the model.
          schema:
            type: string
      responses:
        '200':
          description: The model data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetModelResponse'
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
      security:
        - jwt: []
components:
  schemas:
    GetModelResponse:
      type: object
      properties:
        data:
          description: The requested model.
          allOf:
            - $ref: '#/components/schemas/Model'
      required:
        - data
      title: GetModelResponse
      x-fern-type-name: GetModelResponse
    HttpError:
      type: object
      properties:
        statusCode:
          type: integer
          description: HTTP Status Code
        message:
          type: string
          description: Error Message
        code:
          oneOf:
            - type: integer
            - type: string
          description: Error code
          nullable: true
        details:
          type: array
          description: Error details
          items:
            type: object
          nullable: true
      required:
        - statusCode
        - message
      title: HttpError
      x-fern-type-name: HttpError
    Model:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the model.
        ml_repo_id:
          type: string
          description: Identifier of the ML Repo the model belongs to.
        type:
          type: string
          description: Discriminator for the artifact type; always `model` for a model.
          enum:
            - model
          example: model
          default: model
        name:
          type: string
          description: Name of the model.
        fqn:
          type: string
          description: Fully Qualified Name uniquely identifying the model.
        created_by_subject:
          description: Subject (user, team, or service account) that created the model.
          allOf:
            - $ref: '#/components/schemas/Subject'
        created_at:
          format: date-time
          type: string
          nullable: true
          description: Timestamp when the model was created.
        updated_at:
          format: date-time
          type: string
          nullable: true
          description: Timestamp when the model was last updated.
        latest_version:
          nullable: true
          description: Most recently created version of the model, if any exist.
          type: object
          allOf:
            - $ref: '#/components/schemas/ModelVersion'
        run_steps:
          nullable: true
          description: Run steps associated with the model.
          type: array
          items:
            type: number
      required:
        - id
        - ml_repo_id
        - name
        - fqn
        - created_by_subject
      title: Model
      x-fern-type-name: Model
    Subject:
      type: object
      properties:
        subjectId:
          type: string
          description: Subject ID
        subjectType:
          type: string
          description: Subject type
          enum:
            - user
            - team
            - serviceaccount
            - virtualaccount
            - agent-identity
            - agent
            - agent-channel-identity
            - role
        subjectSlug:
          type: string
          description: Subject slug
          nullable: true
        subjectDisplayName:
          type: string
          description: Subject display name
          nullable: true
        subjectPatName:
          type: string
          description: Subject PAT name
          nullable: true
        subjectControllerName:
          type: string
          nullable: true
        subjectExternalIdentitySlug:
          type: string
          description: External identity slug (external_identity_id:sub:email)
          nullable: true
      required:
        - subjectId
        - subjectType
      title: Subject
      x-fern-type-name: Subject
    ModelVersion:
      type: object
      properties:
        created_at:
          format: date-time
          type: string
          description: Timestamp when the model version was created.
          nullable: true
        updated_at:
          format: date-time
          type: string
          description: Timestamp when the model version was last updated.
          nullable: true
        manifest:
          description: Manifest describing the model version.
          oneOf:
            - $ref: '#/components/schemas/ModelManifest'
        id:
          type: string
          description: Unique identifier of the model version.
        fqn:
          type: string
          description: Fully Qualified Name uniquely identifying the model version.
        created_by_subject:
          description: >-
            Subject (user, team, or service account) that created the model
            version.
          allOf:
            - $ref: '#/components/schemas/Subject'
        ml_repo_id:
          type: string
          description: Identifier of the ML Repo the model version belongs to.
        usage_code_snippet:
          type: string
          description: Code snippet showing how to use the model version.
          nullable: true
        tags:
          description: Tags associated with the model version.
          default: []
          type: array
          items:
            type: string
        model_id:
          type: string
          description: Identifier of the model this version belongs to.
        metrics:
          description: Metrics logged for the model version.
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/Metric'
        deployable:
          type: boolean
          description: Whether the model version can be deployed.
          default: false
          nullable: true
      required:
        - manifest
        - id
        - fqn
        - created_by_subject
        - ml_repo_id
        - model_id
      title: ModelVersion
      x-fern-type-name: ModelVersion
    ModelManifest:
      description: Log a new Model Version containing model files and folders with metadata
      type: object
      properties:
        type:
          description: Model Version
          type: string
          enum:
            - model-version
          default: model-version
        description:
          description: Description
          type: string
          maxLength: 512
          nullable: true
        version_alias:
          description: >-
            Version alias is alternate, ideally human readable, version string
            to reference an artifact version. It should start with `v` followed
            by alphanumeric and it can include `.` and `-` in between (e.g.
            `v1.0.0`, `v1-prod`, `v3-dev`, etc)
          type: string
          maxLength: 128
          pattern: ^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$
        source:
          description: Model Source
          type: object
          oneOf:
            - $ref: '#/components/schemas/TrueFoundryManagedSource'
            - $ref: '#/components/schemas/ExternalBlobStorageSource'
            - $ref: '#/components/schemas/LocalModelSource'
          discriminator:
            propertyName: type
        framework:
          description: >-
            Framework for the model version like Transformers, PyTorch, Sklearn,
            Xgboost etc with framework specific metadata. This will be used to
            infer model deployment configuration
          type: object
          oneOf:
            - $ref: '#/components/schemas/TransformersFramework'
            - $ref: '#/components/schemas/TensorFlowFramework'
            - $ref: '#/components/schemas/SklearnFramework'
            - $ref: '#/components/schemas/PyTorchFramework'
            - $ref: '#/components/schemas/KerasFramework'
            - $ref: '#/components/schemas/XGBoostFramework'
            - $ref: '#/components/schemas/LightGBMFramework'
            - $ref: '#/components/schemas/FastAIFramework'
            - $ref: '#/components/schemas/H2OFramework'
            - $ref: '#/components/schemas/ONNXFramework'
            - $ref: '#/components/schemas/SpaCyFramework'
            - $ref: '#/components/schemas/StatsModelsFramework'
            - $ref: '#/components/schemas/GluonFramework'
            - $ref: '#/components/schemas/PaddleFramework'
          discriminator:
            propertyName: type
        environment:
          $ref: '#/components/schemas/ModelVersionEnvironment'
        step:
          description: >-
            Step/Epoch number in an iterative training loop the model version
            was created. Generally useful when logging a model version from a
            MLRepo Run
          type: integer
          minimum: 0
          default: 0
        run_id:
          description: ID of the MLRepo Run that generated the model version
          type: string
      allOf:
        - $ref: '#/components/schemas/BaseArtifactVersion'
      required:
        - type
        - source
        - step
      title: ModelManifest
      x-fern-type-name: ModelManifest
    Metric:
      type: object
      properties:
        key:
          type: string
          description: Name of the metric.
        value:
          type: number
          description: Numeric value of the metric.
          nullable: true
        timestamp:
          type: number
          description: Unix timestamp in milliseconds when the metric was logged.
          nullable: true
        step:
          type: number
          description: Training step at which the metric was logged.
          nullable: true
      required:
        - key
      title: Metric
      x-fern-type-name: Metric
    TrueFoundryManagedSource:
      description: TrueFoundry Managed Source
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the source
          type: string
          enum:
            - truefoundry
          default: truefoundry
        uri:
          description: URI
          type: string
          pattern: ^(s3|gs|wasbs)://.*
      title: TrueFoundryManagedSource
      x-fern-type-name: TrueFoundryManagedSource
    ExternalBlobStorageSource:
      description: External Blob Storage Source
      type: object
      required:
        - type
        - uri
      properties:
        type:
          description: Type of the source
          type: string
          enum:
            - external
          default: external
        uri:
          description: >-
            URI referencing a path in the blob storage bucket linked to the
            MLRepo
          type: string
          pattern: ^(s3|gs|wasbs)://.*
      title: ExternalBlobStorageSource
      x-fern-type-name: ExternalBlobStorageSource
    LocalModelSource:
      type: object
      required:
        - type
        - file_or_folder
      properties:
        type:
          description: Type of the source
          type: string
          enum:
            - local
          default: local
        file_or_folder:
          description: Path to the model file or folder
          type: string
      title: LocalModelSource
      x-fern-type-name: LocalModelSource
    TransformersFramework:
      description: Transformers
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - transformers
          default: transformers
        library_name:
          $ref: '#/components/schemas/LibraryName'
        pipeline_tag:
          description: >-
            The `pipeline()` task this model can be used with e.g.
            `text-generation`. See [huggingface
            docs](https://huggingface.co/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline.task)
            for all possible values
          type: string
          default: null
          nullable: true
        base_model:
          description: >-
            Base model Id from HuggingFace Hub. If this is a finetuned model,
            this points to the base model id used for finetuning.
          type: string
          default: null
          nullable: true
      title: TransformersFramework
      x-fern-type-name: TransformersFramework
    TensorFlowFramework:
      description: Tensorflow
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - tensorflow
          default: tensorflow
      title: TensorFlowFramework
      x-fern-type-name: TensorFlowFramework
    SklearnFramework:
      description: Sklearn
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - sklearn
          default: sklearn
        model_filepath:
          description: Relative path to the model file in the model version contents
          type: string
        serialization_format:
          $ref: '#/components/schemas/SklearnSerializationFormat'
        model_schema:
          $ref: '#/components/schemas/SklearnModelSchema'
      title: SklearnFramework
      x-fern-type-name: SklearnFramework
    PyTorchFramework:
      description: PyTorch
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - pytorch
          default: pytorch
      title: PyTorchFramework
      x-fern-type-name: PyTorchFramework
    KerasFramework:
      description: Keras
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - keras
          default: keras
      title: KerasFramework
      x-fern-type-name: KerasFramework
    XGBoostFramework:
      description: XGBoost
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - xgboost
          default: xgboost
        serialization_format:
          $ref: '#/components/schemas/XGBoostSerializationFormat'
        model_filepath:
          description: Relative path to the model file in the model version contents
          type: string
        model_schema:
          $ref: '#/components/schemas/XGBoostModelSchema'
      title: XGBoostFramework
      x-fern-type-name: XGBoostFramework
    LightGBMFramework:
      description: LightGBM
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - lightgbm
          default: lightgbm
      title: LightGBMFramework
      x-fern-type-name: LightGBMFramework
    FastAIFramework:
      description: FastAI
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - fastai
          default: fastai
      title: FastAIFramework
      x-fern-type-name: FastAIFramework
    H2OFramework:
      description: H2O
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - h2o
          default: h2o
      title: H2OFramework
      x-fern-type-name: H2OFramework
    ONNXFramework:
      description: ONNX
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - onnx
          default: onnx
      title: ONNXFramework
      x-fern-type-name: ONNXFramework
    SpaCyFramework:
      description: SpaCy
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - spacy
          default: spacy
      title: SpaCyFramework
      x-fern-type-name: SpaCyFramework
    StatsModelsFramework:
      description: StatsModels
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - statsmodels
          default: statsmodels
      title: StatsModelsFramework
      x-fern-type-name: StatsModelsFramework
    GluonFramework:
      description: Gluon
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - gluon
          default: gluon
      title: GluonFramework
      x-fern-type-name: GluonFramework
    PaddleFramework:
      description: Paddle
      type: object
      required:
        - type
      properties:
        type:
          description: Type of the framework
          type: string
          enum:
            - paddle
          default: paddle
      title: PaddleFramework
      x-fern-type-name: PaddleFramework
    ModelVersionEnvironment:
      description: >-
        Runtime environment describing python version and dependencies for
        running the model
      type: object
      properties:
        python_version:
          description: Python version to use when running the model
          type: string
          pattern: ^\d+(\.\d+){1,2}([\-\.a-z0-9]+)?$
        pip_packages:
          description: pip dependencies needed for running the model
          type: array
          items:
            type: string
      title: ModelVersionEnvironment
      x-fern-type-name: ModelVersionEnvironment
    BaseArtifactVersion:
      type: object
      required:
        - metadata
      properties:
        name:
          description: Name of the entity
          type: string
          maxLength: 256
          pattern: ^[A-Za-z0-9_\-]+$
        metadata:
          description: >-
            Key value metadata. Should be valid JSON. For e.g.
            `{"business-unit": "sales", "quality": "good", "rating": 4.5}`
          type: object
        ml_repo:
          description: Name of the ML Repo
          type: string
          pattern: ^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$
        version:
          description: Version of the entity
          type: integer
          minimum: 1
      title: BaseArtifactVersion
      x-fern-type-name: BaseArtifactVersion
    LibraryName:
      description: Name of the library for the framework
      type: string
      enum:
        - transformers
        - sentence-transformers
        - diffusers
      default: transformers
      nullable: true
      title: LibraryName
      x-fern-type-name: LibraryName
    SklearnSerializationFormat:
      description: Serialization format used to save the sklearn model
      type: string
      enum:
        - cloudpickle
        - joblib
        - pickle
      title: SklearnSerializationFormat
      x-fern-type-name: SklearnSerializationFormat
    SklearnModelSchema:
      description: Scikit Learn Model Schema
      type: object
      required:
        - infer_method_name
        - inputs
        - outputs
      properties:
        infer_method_name:
          $ref: '#/components/schemas/InferMethodName'
        inputs:
          description: Schema of the input
          type: array
          items:
            type: object
        outputs:
          description: Schema of the output
          type: array
          items:
            type: object
      title: SklearnModelSchema
      x-fern-type-name: SklearnModelSchema
    XGBoostSerializationFormat:
      description: Serialization format used to save the xgboost model
      type: string
      enum:
        - cloudpickle
        - joblib
        - pickle
        - json
      title: XGBoostSerializationFormat
      x-fern-type-name: XGBoostSerializationFormat
    XGBoostModelSchema:
      description: Schema of the XGBoost model
      type: object
      required:
        - infer_method_name
        - inputs
        - outputs
      properties:
        infer_method_name:
          description: Name of the method used for inference
          type: string
          enum:
            - predict
        inputs:
          description: Schema of the input
          type: array
          items:
            type: object
        outputs:
          description: Schema of the output
          type: array
          items:
            type: object
      title: XGBoostModelSchema
      x-fern-type-name: XGBoostModelSchema
    InferMethodName:
      description: Name of the method used for inference
      type: string
      enum:
        - predict
        - predict_proba
      title: InferMethodName
      x-fern-type-name: InferMethodName
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````