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

# 查询模板详情



## OpenAPI

````yaml gpus/v2-spec/get-template.json GET /gpus/v2/templates/{template_id}
openapi: 3.0.0
info:
  title: PPIO GPU API v2
  version: 2.0.0
servers:
  - url: https://api.ppio.com
security: []
paths:
  /gpus/v2/templates/{template_id}:
    get:
      summary: 查询模板详情
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Bearer 身份验证格式,例如:Bearer `{{API 密钥}}`。
        - name: template_id
          in: path
          required: true
          schema:
            type: string
          description: 模板 ID。字符串,长度限制:1-255 字符。
          example: tpl-001
        - name: is_community
          in: query
          required: false
          schema:
            type: boolean
          description: 是否查询社区模板。
          example: true
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 模板 ID
                    example: tpl-001
                  owner_id:
                    type: string
                    description: 所属用户 ID
                    example: owner-001
                  name:
                    type: string
                    description: 模板名称
                    example: pytorch-2.3-cuda12
                  type:
                    type: string
                    description: 模板类型
                    example: instance
                  visibility:
                    type: string
                    description: 可见性
                    example: community
                  image:
                    type: string
                    description: 镜像地址
                    example: registry.example.com/ml/pytorch:2.3-cuda12
                  registry_auth_id:
                    type: string
                    description: 镜像仓库认证 ID
                    example: auth-001
                  command:
                    type: string
                    description: 启动命令
                    example: ''
                  entrypoint:
                    type: string
                    description: 镜像入口命令
                    example: /bin/bash
                  rootfs_size_gb:
                    type: integer
                    description: 系统盘大小。单位为 GB
                    example: 50
                  ports:
                    type: array
                    description: 暴露端口配置
                    items:
                      type: object
                      properties:
                        protocol:
                          type: string
                          description: 协议或端口类型
                          example: http
                        port:
                          type: integer
                          description: 端口
                          example: 8888
                  envs:
                    type: array
                    description: 环境变量
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                          description: 环境变量名
                          example: ENV
                        value:
                          type: string
                          description: 环境变量值
                          example: prod
                  metadata:
                    type: object
                    description: 模板元数据
                    properties:
                      readme:
                        type: string
                        description: 模板说明
                        example: PyTorch 2.3 with CUDA 12
                      logo:
                        type: string
                        description: 图标 URL
                        example: https://example.com/logo.png
                      description:
                        type: string
                        description: 简短描述
                        example: PyTorch development template
                      author:
                        type: string
                        description: 作者
                        example: PAI
                      tags:
                        type: array
                        items:
                          type: string
                        description: 标签
                        example:
                          - pytorch
                          - cuda
                  min_cuda_version:
                    type: string
                    description: 最低 CUDA 版本
                    example: '12.2'
                  created_at:
                    type: integer
                    description: 创建时间。Unix 时间戳
                    example: 1715750400
                  updated_at:
                    type: integer
                    description: 更新时间。Unix 时间戳
                    example: 1715750400
                  member_id:
                    type: string
                    description: 创建成员 ID
                    example: 550e8400-e29b-41d4-a716-446655440000

````