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

# Head shot

> This endpoint allows you to generate head shot image.

<Warning>
  Image url generated will not be accessible after 24 hours, kindly save your image generations accordingly
</Warning>

### Head Shot

<img src="https://mintcdn.com/mod/i8dYICFkuz1vpdrI/images/image-editing/assets/images/Head-Shot-f4982ff9247a211781404e0a6badb559.jpg?fit=max&auto=format&n=i8dYICFkuz1vpdrI&q=85&s=1307cb2c451f655cd5feefbabd70f668" alt="Head-Shot endpoint result" width="691" height="518" data-path="images/image-editing/assets/images/Head-Shot-f4982ff9247a211781404e0a6badb559.jpg" />

## Request

Make a `POST` request to below endpoint and pass the required parameters as a request body to the endpoint.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v6/image_editing/head_shot' \
```

## Body

```json json theme={null}
{  
  "key": "your_api_key",  
  "prompt": "pretty woman",  
  "negative_prompt": "anime, cartoon, drawing, big nose, long nose, fat, ugly, big lips, big mouth, face proportion mismatch, unrealistic, monochrome, lowres, bad anatomy, worst quality, low quality, blurry",  
  "face_image":"https://assets.modelslab.ai/generations/568d6320-8b6c-4af8-8725-51c0c9f633a3",  
  "width": "512",  
  "height": "512",  
  "samples": "1",  
  "num_inference_steps": "21",  
  "safety_checker": false,  
  "base64": false, 
  "seed": null,  
  "guidance_scale": 7.5,  
  "webhook": null,  
  "track_id": null
}
```


## OpenAPI

````yaml POST /image_editing/head_shot
openapi: 3.1.0
info:
  title: ModelsLab Image Editing API
  description: >-
    Image editing endpoints for ModelsLab API including background removal,
    super resolution, face generation, fashion try-on, and various image
    manipulation tools
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6
    description: Image Editing API v6 server
security: []
paths:
  /image_editing/head_shot:
    post:
      summary: Head shot generator
      description: This endpoint allows you to generate head shot image
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HeadShotRequest'
      responses:
        '200':
          description: Head shot response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ImageEditingSuccessResponse'
                  - $ref: '#/components/schemas/ImageEditingProcessingResponse'
                  - $ref: '#/components/schemas/ImageEditingErrorResponse'
components:
  schemas:
    HeadShotRequest:
      type: object
      required:
        - key
        - prompt
        - face_image
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        prompt:
          type: string
          description: Text prompt describing the content you want in the generated image
        face_image:
          type: string
          description: >-
            Link or valid base64 data of the face you want your generations to
            resemble
        width:
          type: integer
          maximum: 512
          description: >-
            Width of your generated image, If not provide width of face_image is
            used
        height:
          type: integer
          maximum: 768
          description: >-
            Height of your generated image, If not provide height of face_image
            is used
        num_inference_steps:
          type: integer
          enum:
            - 21
            - 31
            - 41
          description: Number of denoising steps
        guidance_scale:
          type: integer
          minimum: 1
          maximum: 5
          description: Scale for classifier-free guidance
        s_scale:
          type: number
          minimum: 0
          maximum: 2
          default: 1
          description: Adjust the weight of the face structure
        samples:
          type: integer
          maximum: 2
          description: The number of images to be returned in response
        safety_checker:
          type: boolean
          description: Whether to run the safety checker
        safety_checker_type:
          type: string
          enum:
            - black
            - blur
            - sensitive_content_text
            - pixelate
        base64:
          type: boolean
          default: false
          description: Set to true for base64 response
        webhook:
          type: string
          format: uri
          description: URL to receive POST API call when complete
        track_id:
          type: integer
          description: ID for webhook identification
    ImageEditingSuccessResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        generationTime:
          type: number
          description: Time taken to generate the image in seconds
        id:
          type: integer
          description: Unique identifier for the generation request
        output:
          type: array
          items:
            type: string
            format: uri
          description: Array of generated image URLs
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy image URLs
        meta:
          type: object
          description: Metadata about the generation process
          additionalProperties: true
    ImageEditingProcessingResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - processing
        tip:
          type: string
          description: Information about the processing status
        eta:
          type: integer
          description: Estimated time remaining in seconds
        message:
          type: string
          description: Processing status message
        fetch_result:
          type: string
          format: uri
          description: URL to fetch the result when ready
        id:
          type: integer
          description: Unique identifier for the generation request
        output:
          type: array
          items:
            type: string
          description: Empty array during processing
        future_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of future image URLs
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy image URLs
        meta:
          type: object
          description: Metadata about the generation process
          additionalProperties: true
    ImageEditingErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message describing what went wrong

````