> ## 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-instance.json GET /gpus/v2/instances/{instance_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/instances/{instance_id}:
    get:
      summary: 查询实例详情
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Bearer 身份验证格式,例如:Bearer `{{API 密钥}}`。
        - name: instance_id
          in: path
          required: true
          schema:
            type: string
          description: 实例 ID。字符串,长度限制:1-255 字符。
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 实例 ID
                    example: ca338f12f3
                  name:
                    type: string
                    description: 实例名称
                    example: example-instance
                  type:
                    type: string
                    description: 实例类型。可选值:`gpu`、`cpu`
                    example: gpu
                  product_id:
                    type: string
                    description: 产品 ID
                    example: product-id
                  image:
                    type: string
                    description: 镜像地址
                    example: registry.example.com/namespace/image:tag
                  registry_auth_id:
                    type: string
                    description: 镜像仓库认证 ID
                    example: registry-auth-id
                  entrypoint:
                    type: string
                    description: 容器 entrypoint
                    example: ''
                  command:
                    type: string
                    description: 容器启动命令
                    example: ''
                  billing:
                    type: object
                    description: 计费配置
                    properties:
                      mode:
                        type: string
                        description: 计费模式。可选值:`postpaid`、`prepaid`、`spot`
                        example: prepaid
                      prepaid:
                        type: object
                        description: 包年包月配置,`mode=prepaid` 时存在
                        properties:
                          months:
                            type: integer
                            description: 购买月数
                            example: 1
                          end_time:
                            type: integer
                            description: 包年包月结束时间。Unix 时间戳
                            example: 1714464000
                          auto_renew:
                            type: object
                            description: 自动续费配置
                            properties:
                              enabled:
                                type: boolean
                                description: 是否开启自动续费
                                example: true
                              months:
                                type: integer
                                description: 自动续费月数
                                example: 1
                              status:
                                type: string
                                description: 自动续费状态
                                example: active
                  envs:
                    type: array
                    description: 环境变量列表
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                          description: 环境变量名
                          example: ENV_NAME
                        value:
                          type: string
                          description: 环境变量值
                          example: ENV_VALUE
                  ports:
                    type: array
                    description: 暴露端口列表
                    items:
                      type: object
                      properties:
                        port:
                          type: integer
                          description: 端口号
                          example: 8080
                        protocol:
                          type: string
                          description: 端口协议
                          example: tcp
                        endpoint:
                          type: string
                          description: 外部访问地址(运行时分配)
                          example: http://1.2.3.4:8080
                  resource_specs:
                    type: object
                    description: 资源规格(含系统分配信息)
                    properties:
                      rootfs_size_gb:
                        type: integer
                        description: 系统盘大小。单位为 GB
                        example: 20
                      gpu_num:
                        type: integer
                        description: GPU 数量
                        example: 1
                      cpu_num:
                        type: integer
                        description: CPU 核数(系统分配)
                        example: 8
                      memory_gb:
                        type: integer
                        description: 内存大小。单位为 GB(系统分配)
                        example: 32
                      gpu_ids:
                        type: array
                        items:
                          type: integer
                        description: 分配到的 GPU 卡序号
                        example:
                          - 0
                  network:
                    type: object
                    description: VPC 网络配置
                    properties:
                      id:
                        type: string
                        description: Network VPC ID
                        example: vpc-550e8400-e29b-41d4-a716-446655440000
                      ip:
                        type: string
                        description: VPC 给实例分配的 IP
                        example: 10.2.1.1
                  volumes:
                    type: array
                    description: 数据盘/网络存储挂载列表
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          description: 存储类型。可选值:`local`、`network`
                          example: network
                        id:
                          type: string
                          description: 存储 ID,通常用于 `network` 类型
                          example: network-storage-id
                        mount_point:
                          type: string
                          description: 挂载路径
                          example: /data
                  region:
                    type: string
                    description: 实例所在区域
                    example: region-id
                  tools:
                    type: object
                    description: 实例工具信息
                    properties:
                      jupyter:
                        type: object
                        description: Jupyter 工具信息
                        properties:
                          endpoint:
                            type: string
                            description: Jupyter 访问地址
                            example: https://jupyter.example.com/instance/ca338f12f3
                          enabled:
                            type: boolean
                            description: Jupyter 是否启用
                            example: true
                          port:
                            type: integer
                            description: Jupyter 端口
                            example: 8888
                      ssh:
                        type: object
                        description: SSH 工具信息
                        properties:
                          command:
                            type: string
                            description: SSH 连接命令
                            example: >-
                              ssh -p 51039
                              root@proxy.cn-south-nas-1.gpu-instance.ppinfra.com
                          password:
                            type: string
                            description: SSH 密码
                            example: xxx
                          username:
                            type: string
                            description: SSH 用户名
                            example: xxx
                      web_terminal:
                        type: object
                        description: Web Terminal 工具信息
                        properties:
                          endpoint:
                            type: string
                            description: Web Terminal 访问地址
                            example: wss://terminal.example.com/instance/ca338f12f3
                          enabled:
                            type: boolean
                            description: Web Terminal 是否启用
                            example: true
                          username:
                            type: string
                            description: Web Terminal 用户名
                            example: root
                          password:
                            type: string
                            description: Web Terminal 密码
                            example: xxx
                      log:
                        type: object
                        description: 日志工具信息
                        properties:
                          instance_endpoint:
                            type: string
                            description: 实例日志地址
                            example: https://log.example.com/system/ca338f12f3
                          system_endpoint:
                            type: string
                            description: 系统日志地址
                            example: https://log.example.com/instance/ca338f12f3
                  auto_migrate:
                    type: object
                    description: 自动迁移配置
                    properties:
                      enabled:
                        type: boolean
                        description: 是否开启自动迁移
                        example: false
                      include_system_disk:
                        type: boolean
                        description: 自动迁移时是否包含系统盘
                        example: false
                  status:
                    type: object
                    description: 实例状态信息
                    properties:
                      status:
                        type: string
                        description: 实例状态
                        example: running
                      error:
                        type: string
                        description: 错误码
                        example: ''
                      message:
                        type: string
                        description: 状态描述
                        example: ''
                  pricing:
                    type: object
                    description: 计费/价格信息
                    properties:
                      instance_price:
                        type: integer
                        description: 实例价格
                        example: 100
                      instance_base_price:
                        type: integer
                        description: 实例原价
                        example: 120
                      rootfs_storage_price:
                        type: integer
                        description: 系统盘存储价格
                        example: 10
                      prepaid:
                        type: object
                        description: 包年包月计费信息,仅 `billing.mode=prepaid` 时存在
                        properties:
                          monthly_price:
                            type: array
                            description: 包月价格列表
                            items:
                              type: object
                              properties:
                                price:
                                  type: integer
                                  description: 包月价格
                                  example: 1000
                                base_price:
                                  type: integer
                                  description: 包月原价
                                  example: 1200
                                month:
                                  type: integer
                                  description: 月数
                                  example: 1
                                price_precision:
                                  type: integer
                                  description: 价格精度
                                  example: 2
                                month_spec_id:
                                  type: string
                                  description: 月度规格 ID
                                  example: spec-1m
                      spot:
                        type: object
                        description: Spot 计费信息,仅 `billing.mode=spot` 时存在
                        properties:
                          spot_status:
                            type: string
                            description: Spot 实例状态
                          spot_reclaim_time:
                            type: integer
                            description: Spot 实例回收时间。Unix 时间戳
                  created_at:
                    type: integer
                    description: 实例创建时间。Unix 时间戳
                    example: 1714464000
                  last_started_at:
                    type: integer
                    description: 最近一次启动时间。Unix 时间戳
                    example: 1714467600
                  last_stopped_at:
                    type: integer
                    description: 最近一次停止时间。Unix 时间戳
                    example: 0
                  member_id:
                    type: string
                    description: 创建者 member ID
                    example: member-id
                  owner_id:
                    type: string
                    description: 所属用户 ID(团队所有者 UUID)
                    example: 550e8400-e29b-41d4-a716-446655440000
                  region_version:
                    type: string
                    description: 实例版本
                    example: v1.0

````