Together AI Hardware API

The Hardware API from Together AI — 1 operation(s) for hardware.

Documentation

Specifications

Other Resources

OpenAPI Specification

together-ai-hardware-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: remediation.proto Audio Hardware API
  version: version not set
servers:
- url: https://api.together.xyz/v1
security:
- bearerAuth: []
tags:
- name: Hardware
paths:
  /hardware:
    get:
      tags:
      - Hardware
      summary: List available hardware configurations
      description: 'Returns a list of available hardware configurations for deploying models. When a model parameter is provided, it returns only hardware configurations compatible with that model, including their current availability status.

        '
      x-codeSamples:
      - lang: Python
        label: Together AI SDK (v2)
        source: "# Docs for v1 can be found by changing the above selector ^\nfrom together import Together\nimport os\n\nclient = Together(\n    api_key=os.environ.get(\"TOGETHER_API_KEY\"),\n)\n\nresponse = client.endpoints.list_hardware()\n\nfor hardware in response.data:\n    print(hardware.id)\n"
      - lang: Python
        label: Together AI SDK (v1)
        source: "from together import Together\nimport os\n\nclient = Together(\n    api_key=os.environ.get(\"TOGETHER_API_KEY\"),\n)\n\nresponse = client.endpoints.list_hardware()\n\nfor hardware in response:\n    print(hardware.id)\n"
      - lang: TypeScript
        label: Together AI SDK (TypeScript)
        source: "import Together from \"together-ai\";\n\nconst client = new Together({\n  apiKey: process.env.TOGETHER_API_KEY,\n});\n\nconst hardware = await client.endpoints.list_hardware();\n\nconsole.log(hardware);\n"
      - lang: JavaScript
        label: Together AI SDK (JavaScript)
        source: "import Together from \"together-ai\";\n\nconst client = new Together({\n  apiKey: process.env.TOGETHER_API_KEY,\n});\n\nconst hardware = await client.endpoints.list_hardware();\n\nconsole.log(hardware);\n"
      - lang: Shell
        label: cURL
        source: "curl \"https://api.together.ai/v1/hardware\" \\\n     -H \"Authorization: Bearer $TOGETHER_API_KEY\" \\\n     -H \"Content-Type: application/json\"\n"
      operationId: listHardware
      parameters:
      - name: model
        in: query
        required: false
        schema:
          type: string
          description: 'Filter hardware configurations by model compatibility. When provided,

            the response includes availability status for each compatible configuration.

            [See all of Together AI''s dedicated models](https://docs.together.ai/docs/dedicated-models)

            '
          example: deepseek-ai/DeepSeek-R1
      responses:
        '200':
          description: List of available hardware configurations
          content:
            application/json:
              schema:
                type: object
                required:
                - object
                - data
                properties:
                  object:
                    description: The object type, which is always `list`.
                    const: list
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/HardwareWithStatus'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
components:
  schemas:
    ErrorData:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              nullable: false
            type:
              type: string
              nullable: false
            param:
              type: string
              nullable: true
              default: null
            code:
              type: string
              nullable: true
              default: null
          required:
          - type
          - message
    HardwareWithStatus:
      type: object
      description: Hardware configuration details with optional availability status
      required:
      - object
      - id
      - pricing
      - specs
      - updated_at
      properties:
        object:
          description: The object type, which is always `hardware`.
          const: hardware
        id:
          type: string
          description: Unique identifier for the hardware configuration
          examples:
          - 2x_nvidia_a100_80gb_sxm
        pricing:
          $ref: '#/components/schemas/EndpointPricing'
        specs:
          $ref: '#/components/schemas/HardwareSpec'
        availability:
          $ref: '#/components/schemas/HardwareAvailability'
        updated_at:
          type: string
          format: date-time
          description: Timestamp of when the hardware status was last updated
    HardwareSpec:
      type: object
      description: Detailed specifications of a hardware configuration
      required:
      - gpu_type
      - gpu_link
      - gpu_memory
      - gpu_count
      properties:
        gpu_type:
          type: string
          description: The type/model of GPU
          examples:
          - a100-80gb
        gpu_link:
          type: string
          description: The GPU interconnect technology
          examples:
          - sxm
        gpu_memory:
          type: number
          format: float
          description: Amount of GPU memory in GB
          examples:
          - 80
        gpu_count:
          type: integer
          format: int32
          description: Number of GPUs in this configuration
          examples:
          - 2
    HardwareAvailability:
      type: object
      description: Indicates the current availability status of a hardware configuration
      required:
      - status
      properties:
        status:
          type: string
          description: The availability status of the hardware configuration
          enum:
          - available
          - unavailable
          - insufficient
    EndpointPricing:
      type: object
      description: Pricing details for using an endpoint
      required:
      - cents_per_minute
      properties:
        cents_per_minute:
          type: number
          format: float
          description: Cost per minute of endpoint uptime in cents
          examples:
          - 5.42
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-bearer-format: bearer
      x-default: default