# AI Headshot

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/aiart/avatar:
    post:
      summary: AI Headshot
      deprecated: false
      description: >-
        Using advanced artificial intelligence technology, our AI Headshot
        Generator transforms your photo into a high-quality, personalized
        headshot. The AI intelligently recognizes your facial features and
        generates headshots in various styles based on your selection, including
        business, fashion, cartoon, and more. Whether you need a social media
        profile picture, resume photo, or any other personal image, our AI
        Headshot can meet your needs.


        ## AI Headshot Styles


        [AI Headshot Styles](https://docs.fotor.com/reference/headshot/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:
                userImageUrl:
                  type: string
                  description: >-
                    The user's image URL or BASE64 encoded image, used to
                    generate an avatar based on the user's image.
                avatarTemplateParams:
                  type: array
                  items:
                    type: object
                    properties:
                      templateId:
                        type: string
                        description: >-
                          [Headshot template
                          ID](https://docs.fotor.com/reference/headshot/styles/):
                          Specifies the specific style template used for
                          generating the headsg. Refer to the template table for
                          available options.
                      num:
                        type: integer
                        description: The number of headshots to generate.
                    x-apifox-orders:
                      - templateId
                      - num
                  description: >-
                    An array containing avatar template information, defining
                    the templates used for generating avatars and their
                    quantity.
              required:
                - userImageUrl
                - avatarTemplateParams
              x-apifox-orders:
                - userImageUrl
                - avatarTemplateParams
            example:
              userImageUrl: >-
                https://pub-static.fotor.com/assets/goart-effects/examples/mini-figure-after.jpg
              avatarTemplateParams:
                - templateId: ca39d44f-e8c8-4a3e-9d09-c3f96cb2fe60
                  num: 1
      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-240777223-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api-b.fotor.com
    description: 正式环境
security: []

```
