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

# Get environment's available model metadata



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/sambanova/openapi.documented.yml get /models/{model_id}
openapi: 3.1.1
info:
  title: SambaNova cloud API
  description: SambaNova cloud API Specification
  version: 1.2.0
  termsOfService: https://sambanova.ai/cloud-end-user-license-agreement
  contact:
    email: info@sambanova.ai
    name: SambaNova information
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.sambanova.ai/v1
security:
  - api_key: []
externalDocs:
  description: Find out more in the official SambaNova docs
  url: https://docs.sambanova.ai/docs/en/api-reference/overview
paths:
  /models/{model_id}:
    get:
      tags:
        - Models
      summary: Get environment's available model metadata
      operationId: getModel
      parameters:
        - in: path
          name: model_id
          required: true
          schema:
            title: Model Id
            type: string
            description: model id to get metadata
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelMetadata'
          description: Successful Response
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import SambaNova from 'sambanova';

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

            const modelResponse = await client.models.retrieve('model_id');

            console.log(modelResponse.id);
        - lang: Python
          source: |-
            import os
            from sambanova import SambaNova

            client = SambaNova(
                api_key=os.environ.get("SAMBANOVA_API_KEY"),  # This is the default and can be omitted
            )
            model_response = client.models.retrieve(
                "model_id",
            )
            print(model_response.id)
components:
  schemas:
    ModelMetadata:
      title: Model Metadata
      type: object
      description: model metadata
      additionalProperties: true
      properties:
        id:
          title: Id
          type: string
          description: model id
        object:
          title: Object
          type: string
          description: type
          const: model
          default: model
          enum:
            - model
        owned_by:
          title: OwnedBy
          type: string
          description: model owner
        context_length:
          title: context length
          type: integer
          description: model context length
        max_completion_tokens:
          title: max completion tokens
          type: integer
          description: model max completion tokens
        sn_metadata:
          title: sn metadata
          type: object
          description: additional sn metadata
        pricing:
          title: pricing
          type: object
          description: pricing details
          additionalProperties: true
          properties:
            prompt:
              title: prompt
              type: number
              description: price per prompt token in USD
            completion:
              title: completion
              type: number
              description: price per completion token in USD
            duration_per_hour:
              title: duration per hour
              type: number
              description: price per input hour
              nullable: true
      required:
        - id
    SimpleError:
      title: SimpleError
      type: object
      description: other kind of simple schema errors
      properties:
        error:
          title: error
          type: string
          description: error detail.
          nullable: true
      required:
        - error
  securitySchemes:
    api_key:
      type: http
      description: >-
        SambaNova API key, sent as a bearer token in the `Authorization` header
        (`Authorization: Bearer <key>`). Default authentication scheme used by
        the SambaNova SDK across every OpenAI compatible endpoint.
      scheme: bearer
      bearerFormat: apiKey

````