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

# Generate a portrait image from a prompt

> Calls the image-generation backend (Grok via the LiteLLM proxy)
using the provided prompt to produce a single 512x512 portrait. The
generated image is fetched into Mind's storage so the response never
leaks the provider URL. Use `/profile/generatePortraitPrompt` first to
build a polished prompt from descriptive selections.




## OpenAPI

````yaml https://dev.enneo.dev/api/mind/docs/open-api post /profile/generatePortrait
openapi: 3.0.0
info:
  version: '1'
  title: enneo.MIND API
  description: This describes the API of enneo Mind, the main ticketing backend
  contact:
    name: enneo GmbH
    email: richard@enneo.ai
  license:
    name: Proprietary software
    url: https://enneo.ai
servers:
  - url: https://demo.enneo.ai/api/mind
    description: Production server, demo client
  - url: https://main.enneo.dev/api/mind
    description: Development main branch
  - url: http://localhost:8005/api/mind
    description: Local development server
security:
  - bearerAuth:
      - api
  - cookieAuth:
      - api
paths:
  /profile/generatePortrait:
    post:
      tags:
        - Profile
      summary: Generate a portrait image from a prompt
      description: |
        Calls the image-generation backend (Grok via the LiteLLM proxy)
        using the provided prompt to produce a single 512x512 portrait. The
        generated image is fetched into Mind's storage so the response never
        leaks the provider URL. Use `/profile/generatePortraitPrompt` first to
        build a polished prompt from descriptive selections.
      operationId: generatePortrait
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - prompt
              properties:
                prompt:
                  type: string
                  description: The full image-generation prompt to send to the image API
                  example: >-
                    A cheerful watercolor portrait of a pixie at the edge of a
                    glowing enchanted forest...
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  portrait:
                    type: object
                    properties:
                      imageUrl:
                        type: string
                        description: Internal Mind storage URL for the generated image
                        example: /api/mind/storage/temp/2026-04-30_a1b2c3d4e5f6g7h8.png
                      imageBase64:
                        type: string
                        description: Base64-encoded bytes of the generated image
                      prompt:
                        type: string
                        description: >-
                          The prompt that was sent to the image API (echo of the
                          request)
                        example: A cheerful watercolor portrait of a pixie...
        '400':
          description: Missing or empty prompt
        '403':
          description: Unauthorized
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      description: Data format of Enneo error messages
      properties:
        error:
          type: string
          example: Contract 121 could not be processed
          description: Readable error message that should be shown to the user
        details:
          type: string
          example: >-
            Uncatched null point exception in testFunction() in
            /app/src/file:212
          description: Not easily readable error message that is for the developer
        txId:
          type: string
          example: c916167c94
          description: >-
            Internal transaction id. Useful for debugging. Corresponds to the
            OpenTelemetry trace ID.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT-based authentication
      x-scopes:
        api: Full access to the API
    cookieAuth:
      type: apiKey
      in: cookie
      name: connect.sid
      description: Cookie-based authentication
      x-scopes:
        api: Full access to the API

````