# Image to Image (AI Art Effects)

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/aiart/img2img:
    post:
      summary: Image to Image (AI Art Effects)
      deprecated: false
      description: >-
        ## Image to Image Styles


        [Image to Image
        Styles](https://docs.fotor.com/reference/img2img/styles/)
      tags:
        - Reference
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: true
          example: Bearer <your api key>
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: >-
                    Describe the content of the image you want to generate, for
                    example, "a boy."
                templateId:
                  type: string
                  description: >-
                    [Template
                    ID](https://docs.fotor.com/reference/img2img/styles/): Used
                    to specify the specific style template for generating the
                    image. Refer to the template table for available options.
                negativePrompt:
                  type: string
                  description: >-
                    Describe the content to avoid in the generated image, for
                    example, "girl."
                userImageUrl:
                  type: string
                  description: >-
                    The URL or BASE64 encoded image of the initial image
                    provided by the user. Images should not exceed a maximum
                    dimension of 1536.
                format:
                  type: string
                  description: jpg or png, default is jpg
                strength:
                  type: number
                  description: >-
                    A parameter that affects the similarity between the original
                    image and the generated image, ranging from 0 to 1.
              required:
                - templateId
                - userImageUrl
              x-apifox-orders:
                - content
                - templateId
                - negativePrompt
                - userImageUrl
                - format
                - strength
            example:
              content: ''
              templateId: ca39d44f-e8c8-4a3e-9d09-c3f96cb2fe60
              negativePrompt: ''
              userImageUrl: >-
                https://pub-static.fotor.com/assets/goart-effects/examples/mini-figure-after.jpg
              strength: 0.5
              format: jpg
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: '000: Success，999: Unknown error'
                    x-apifox-mock: '000'
                    examples:
                      - '000'
                  msg:
                    type: string
                    x-apifox-mock: success
                    examples:
                      - success
                  data:
                    type: object
                    properties:
                      taskId:
                        type: string
                        description: Task ID, used to query task information.
                        x-apifox-mock: e0dc194703174b6eafeacb4ee8e02850
                        examples:
                          - e0dc194703174b6eafeacb4ee8e02850
                    required:
                      - taskId
                    x-apifox-orders:
                      - taskId
                required:
                  - code
                  - msg
                  - data
                x-apifox-orders:
                  - code
                  - msg
                  - data
          headers: {}
          x-apifox-name: success
      security: []
      x-apifox-folder: Reference
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5562290/apis/api-240777221-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api-b.fotor.com
    description: 正式环境
security: []

```
