> ## 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/set-autorenew.json PUT /gpus/v2/instances/{instance_id}/auto-renew
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}/auto-renew:
    put:
      summary: 设置实例自动续费
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
          description: 枚举值：application/json。
        - 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 字符。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - auto_renew
              properties:
                auto_renew:
                  type: object
                  description: 自动续费配置。
                  properties:
                    enabled:
                      type: boolean
                      description: 是否开启自动续费。
                      example: true
                    months:
                      type: integer
                      description: 自动续费月数。整数,取值 >= 0。
                      example: 1
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                type: object

````