> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# [HS1] Generate Headshots

> Generates AI professional headshots from reference photos using Gemini Pro Image. Supports configurable style, background, attire, count (1-4), quality (standard 1K / high 2K), aspect ratio, and custom prompts. Includes 3-layer content moderation.



## OpenAPI

````yaml /api-reference/v1/v1.1.0_openapi.json post /action/instant_headshot_run_headshot_generation
openapi: 3.0.0
info:
  version: 1.1.0
  title: AI Actions - Get Data
  description: API specifications for 'Get Data' category AI actions.
  license:
    name: MIT
servers:
  - url: https://api-lr.agent.ai/v1
security:
  - bearerAuth: []
paths:
  /action/instant_headshot_run_headshot_generation:
    post:
      tags:
        - Headshot Generator
      summary: '[HS1] Generate Headshots'
      description: >-
        Generates AI professional headshots from reference photos using Gemini
        Pro Image. Supports configurable style, background, attire, count (1-4),
        quality (standard 1K / high 2K), aspect ratio, and custom prompts.
        Includes 3-layer content moderation.
      operationId: instantHeadshotRunHeadshotGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                photos_json:
                  type: string
                  x-ui: textarea
                  description: >-
                    JSON array of photo objects: [{"base64": "...", "mimeType":
                    "image/jpeg"}]. Up to 3 photos.
                style:
                  type: string
                  enum:
                    - professional
                    - casual
                    - creative
                    - executive
                    - friendly
                    - editorial
                  default: professional
                background:
                  type: string
                  enum:
                    - studio_white
                    - studio_gray
                    - office
                    - outdoor
                    - gradient
                    - abstract
                  default: studio_white
                attire:
                  type: string
                  enum:
                    - business_formal
                    - business_casual
                    - smart_casual
                    - casual
                    - scrubs
                    - keep_original
                  default: keep_original
                count:
                  type: string
                  enum:
                    - '1'
                    - '2'
                    - '3'
                    - '4'
                  description: How many variation images to generate (1-4).
                  default: '1'
                quality:
                  type: string
                  enum:
                    - standard
                    - high
                  description: >-
                    Standard: 1K output, ~15s/image. High: 2K output,
                    ~30s/image.
                  default: standard
                aspect_ratio:
                  type: string
                  enum:
                    - '1:1'
                    - '3:4'
                    - '4:3'
                    - '2:3'
                    - '3:2'
                    - '9:16'
                    - '16:9'
                  default: '1:1'
                custom_prompt:
                  type: string
                  x-ui: textarea
                  description: >-
                    Optional: override the auto-generated prompt. Pose angles
                    are appended per variation.
                output_variable_name:
                  type: string
                  description: >-
                    Reference results as {{headshot_result.images}},
                    {{headshot_result.run_id}}, etc.
                  default: headshot_result
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
              required:
                - photos_json
                - style
                - background
                - attire
                - output_variable_name
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '401':
          description: Unauthorized - invalid or missing bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
components:
  schemas:
    ActionResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
          description: HTTP status code of the action response
        response:
          type: object
          description: Response data from the action
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from your account
        ([https://agent.ai/user/integrations#api](https://agent.ai/user/integrations#api))

````