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

# Create Custom Avatar

> Submits a custom avatar generation job from a base64-encoded source image. Requires `x-api-key` authentication.



## OpenAPI

````yaml POST /v2/custom-avatar
openapi: 3.0.3
info:
  title: TruGen Developer Platform API
  version: 1.0.0
  description: OpenAPI specification for MCP endpoint
servers:
  - url: https://api.trugen.ai/v1
security: []
paths:
  /v2/custom-avatar:
    servers:
      - url: https://api.trugen.ai
    post:
      summary: Create Custom Avatar
      description: >-
        Submits a custom avatar generation job from a base64-encoded source
        image. Requires `x-api-key` authentication.
      operationId: createCustomAvatar
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - avatar_name
                - gender
                - input_image
              properties:
                avatar_name:
                  type: string
                  description: Human-readable name for your custom avatar.
                  example: my_avatar
                gender:
                  type: string
                  enum:
                    - male
                    - female
                  example: male
                input_image:
                  type: string
                  description: >-
                    Source photo as a base64 data URI. Max ~12 MB base64 (~9 MB
                    binary).
                  example: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...
      responses:
        '200':
          description: Custom avatar job accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    example: 3b6f4c8a-1234-5678-9abc-def012345678
                  job_id:
                    type: string
                    example: sync-abcd-1234
                  avatar_key_id:
                    type: string
                    example: a1b2c3d4e5
                  avatar_id:
                    type: string
                    example: a1b2c3d4e5
                  avatar_name:
                    type: string
                    example: my_avatar
                  gender:
                    type: string
                    example: male
                  category:
                    type: string
                    example: trugen
                  status:
                    type: string
                    example: QUEUED
                  is_private:
                    type: boolean
                    example: true
        '400':
          description: Invalid request or image failed the content-policy check
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  reason:
                    type: string
              example:
                error: Image does not meet avatar creation guidelines
                reason: Image appears to depict a public figure
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````