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

# Preprocess Trinity Face Image

> Reframes a portrait to the framing Trinity expects: the head centred with equal padding above and below, squared to the camera, on a simplified version of the image's own background. Returns the reframed PNG.



## OpenAPI

````yaml https://api.simli.ai/openapi.yaml post /faces/trinity/preprocess
openapi: 3.1.0
info:
  title: Simli
  version: 1.0.0
servers:
  - url: https://api.simli.ai/
    description: API server
security:
  - ApiKeyAuth: []
paths:
  /faces/trinity/preprocess:
    post:
      summary: Preprocess Trinity Face Image
      description: >-
        Reframes a portrait to the framing Trinity expects: the head centred
        with equal padding above and below, squared to the camera, on a
        simplified version of the image's own background. Returns the reframed
        PNG.
      operationId: preprocess_image_faces_trinity_preprocess_post
      parameters:
        - name: retry
          in: query
          required: false
          description: >-
            Render at higher quality. Substantially slower - roughly 160 seconds
            against 25 - so use it to re-run an image whose first result was
            unsatisfactory rather than as the default.
          schema:
            type: boolean
            default: false
            title: Retry
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_preprocess_image_faces_trinity_preprocess_post
components:
  schemas:
    Body_preprocess_image_faces_trinity_preprocess_post:
      properties:
        image:
          type: string
          format: binary
          title: Image
          description: >-
            JPEG, PNG or WEBP, under 5MB, at least 512x512. It must contain a
            person facing the camera whose head is at least 15% of the image
            height - a head smaller than that carries too few pixels to keep the
            likeness, and is rejected. Where several people are present, the
            largest camera-facing head is treated as the subject.
      type: object
      required:
        - image
      title: Body_preprocess_image_faces_trinity_preprocess_post
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-simli-api-key

````