# 改写

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/rewrite/single:
    post:
      summary: 改写
      deprecated: false
      description: |-
        根据不同的强度重写文本，直至达到实时响应所允许的最大文本长度。

        ### 文字成本

        **字数成本：** 1x
        **字数成本说明：**字数由输入文本决定。 API 字数成本是字数的 1 倍。
      tags:
        - 改写
      parameters:
        - name: content-type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                language:
                  type: string
                text:
                  type: string
                strength:
                  type: number
              required:
                - language
                - strength
                - text
              x-apifox-orders:
                - language
                - text
                - strength
            example:
              language: auto
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  language:
                    type: string
                  predictedLanguage:
                    type: string
                  settings:
                    type: object
                    properties:
                      method:
                        type: string
                      strength:
                        type: integer
                    required:
                      - method
                      - strength
                    x-apifox-orders:
                      - method
                      - strength
                  rewrites:
                    type: array
                    items:
                      type: object
                      properties:
                        text:
                          type: string
                        rewrite:
                          type: string
                        stats:
                          type: object
                          properties:
                            diceScore:
                              type: integer
                          required:
                            - diceScore
                          x-apifox-orders:
                            - diceScore
                      x-apifox-orders:
                        - text
                        - rewrite
                        - stats
                required:
                  - language
                  - predictedLanguage
                  - settings
                  - rewrites
                x-apifox-orders:
                  - language
                  - predictedLanguage
                  - settings
                  - rewrites
              example:
                language: string
                predictedLanguage: string
                settings:
                  method: rewrite
                  strength: 0
                rewrites:
                  - text: string
                    rewrite: string
                    stats:
                      diceScore: 0
          headers: {}
          x-apifox-name: 成功
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  error:
                    type: string
                  statusCode:
                    type: integer
                required:
                  - message
                  - error
                  - statusCode
                x-apifox-orders:
                  - message
                  - error
                  - statusCode
          headers: {}
          x-apifox-name: 请求有误
      security: []
      x-apifox-folder: 改写
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/4355615/apis/api-166434380-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: http://dev-cn.your-api-server.com
    description: 开发环境
  - url: http://test-cn.your-api-server.com
    description: 测试环境
  - url: https://api.smodin.io
    description: 正式环境
security: []

```
