openapi: 3.0.0
info:
  title: Tengr.ai API
  description: |
    Tengr.ai's Public API allows business users to manage and generate
    artworks. It supports listing, retrieving, creating, and deleting artworks,
    as well as advanced image generation capabilities through text-to-image
    (prompt-based) generation. Users can customize outputs with options like
    styles, aspect ratios, and models.

    **Authentication.** v1 endpoints use a personal **JWT bearer token** tied to a Tengr.ai user account with a `business` subscription. Send the token in the `Authorization: Bearer <jwt>` header.
  version: 1.4.0
  contact:
    name: Tengr.ai Support Team
    url: support@tengrai.com
    email: support@tengrai.com
servers:
  - url: https://api.tengr.ai
    description: Tengr.ai API
tags:
  - name: API
    description: The API Metadata endpoints provide the current API version, a list
      of available endpoints with their supported HTTP methods, and the status
      of the API health.
  - name: Artworks
    description: Offers endpoints to create, retrieve (by ID or all), and delete artworks.
  - name: Models
    description: Provides an endpoint to list all available models used for artwork
      creation.
paths:
  /:
    get:
      description: Retrieve the API version and the list of available routes.
      operationId: getApiMetadata
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiMetadataResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      summary: Get API metadata
      tags:
        - API
  /health:
    get:
      description: Retrieve the current health status of the API.
      operationId: getHealth
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HealthResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      summary: Get API Health
      tags:
        - API
  /v1/models:
    get:
      description: Retrieve a list of models that can be used for creating various
        types of artwork.
      operationId: getModels
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Get models
      tags:
        - Models
  /v1/artworks:
    get:
      description: Retrieve a list of artworks with details including ID, type,
        parameters, duration, results, status, and creation date.
      operationId: findAllArtworks
      parameters:
        - name: offset
          required: false
          in: query
          schema:
            minimum: 0
            default: 0
            type: integer
        - name: limit
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 500
            default: 10
            type: integer
      responses:
        "200":
          description: List of artworks.
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: "#/components/schemas/Txt2ImgArtworkResponse"
                    - $ref: "#/components/schemas/UpscalingArtworkResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Find artworks
      tags:
        - Artworks
  "/v1/artworks/{id}":
    get:
      description: Retrieve an artworks with details including ID, type, parameters,
        duration, results, status, and creation date.
      operationId: findArtworkById
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        "200":
          description: Artwork response.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/Txt2ImgArtworkResponse"
                  - $ref: "#/components/schemas/UpscalingArtworkResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Artwork not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Find artwork by ID
      tags:
        - Artworks
    delete:
      description: Delete an artwork using its ID.
      operationId: deleteArtworkById
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        "204":
          description: ""
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Delete artwork by ID
      tags:
        - Artworks
  /v1/artworks/remove-background:
    post:
      description: Remove the background from an image, returning a new artwork with
        transparent background.
      operationId: removeBackground
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RemoveBackgroundRequest"
            examples:
              default-format:
                summary: Remove background with default PNG format
                description: Removes background from the image, outputting PNG format by default
                value:
                  imageUrl: https://tengrai-generated.s3.amazonaws.com/example/image.webp
              webp-format:
                summary: Remove background with WebP output
                description: Removes background from the image, outputting WebP format
                value:
                  imageUrl: https://tengrai-generated.s3.amazonaws.com/example/image.webp
                  imageFormat: webp
                  webhook: https://example.com/webhooks/artwork-complete
      responses:
        "202":
          description: Response containing the artwork with background removed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoveBackgroundArtworkResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Remove image background
      tags:
        - Artworks
  "/v1/artworks/{id}/cancel":
    post:
      description: Cancel a running artwork generation. Only works for artworks in
        'starting' or 'processing' status.
      operationId: cancelArtwork
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        "204":
          description: Artwork canceled successfully.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Artwork not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Cancel artwork
      tags:
        - Artworks
  /v1/artworks/selena:
    post:
      description: Generate artwork using text-to-image (txt2img) conversion.
      operationId: createTxt2ImgArtwork
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTxt2ImgArtworkRequest"
            examples:
              basic-prompt:
                summary: Basic text-to-image generation
                description: Simple prompt with default settings
                value:
                  prompt: A beautiful sunset over the ocean with vibrant colors
                  aspectRatio: 1:1
              detailed-prompt:
                summary: Detailed generation with custom parameters
                description: Full control over generation parameters including webhook
                  notification
                value:
                  prompt: A majestic dragon flying over a medieval castle, detailed scales,
                    dramatic lighting
                  negativePrompt: blurry, low quality
                  creativity: 4
                  details: 4
                  aspectRatio: 16:9
                  webhook: https://example.com/webhooks/artwork-complete
              custom-size:
                summary: Custom dimensions
                description: Using custom width and height instead of aspect ratio
                value:
                  prompt: Abstract art with geometric shapes and vibrant colors
                  creativity: 5
                  details: 3
                  width: 1024
                  height: 768
      responses:
        "202":
          description: Response indicating that the artwork was successfully created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Txt2ImgArtworkResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Create txt2img artwork
      tags:
        - Selena
  /v1/artworks/selena/styles:
    get:
      description: Retrieve a list of styles available for creating various types of
        artwork, including details on img2img support and associated flags.
      operationId: getStyles
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/StyleResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Get styles
      tags:
        - Selena
  /v1/artworks/selena/aspect-ratios:
    get:
      description: Get a list of aspect ratios, including width and height details,
        available for creating different types of artwork.
      operationId: getAspectRatios
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AspectRatioResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Get aspect ratios
      tags:
        - Selena
  /v1/artworks/photo-pilot:
    post:
      description: Generate artwork using image-to-image conversion.
      operationId: createPhotoPilotArtwork
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePhotoPilotArtworkV1Request"
            examples:
              low-guidance-aspect-ratio:
                summary: Guidance is set to low and image size is set by aspect ratio
                description: Width and height should not be set when aspect ratio is present
                value:
                  prompt: Change the cartoonish princess to a realistic woman with a nice dress
                    and realistic face and hair
                  imageUrl: https://tengrai-generated.s3.amazonaws.com/fd840a87-0351-4974-8d19-c9b8f16282ff/0e59ed40-f6c9-48b5-938d-ab86a8c66171/tengrai_image_1767788215_5998735.webp
                  imageGuidance: 1
                  denoise: 5
                  creativity: 5
                  effort: 3
                  aspectRatio: 9:16
              low-guidance-custom-size:
                summary: Guidance is set to low with custom image size
                description: Aspect ratio is ommited image width and height is being used, use
                  it for custom sizes other then the ones defined via aspect
                  ratio
                value:
                  prompt: Change the cartoonish princess to a realistic woman with a nice dress
                    and realistic face and hair
                  imageUrl: https://tengrai-generated.s3.amazonaws.com/fd840a87-0351-4974-8d19-c9b8f16282ff/0e59ed40-f6c9-48b5-938d-ab86a8c66171/tengrai_image_1767788215_5998735.webp
                  imageGuidance: 1
                  denoise: 5
                  creativity: 5
                  effort: 3
                  width: "800"
                  height: "800"
              stronger-guidance-size-by-src-image:
                summary: Guidance medium or high
                description: Aspect ratio is ommited image width and height is being used, use
                  it for custom sizes other then the ones defined via aspect
                  ratio
                value:
                  prompt: Change the cartoonish princess to a realistic woman with a nice dress
                    and realistic face and hair
                  imageUrl: https://tengrai-generated.s3.amazonaws.com/fd840a87-0351-4974-8d19-c9b8f16282ff/0e59ed40-f6c9-48b5-938d-ab86a8c66171/tengrai_image_1767788215_5998735.webp
                  imageGuidance: 2
                  denoise: 4
                  creativity: 4
                  effort: 2
                  webhook: https://example.com/webhooks/artwork-complete
      responses:
        "202":
          description: Response indicating that the artwork was successfully created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PhotoPilotArtworkResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Create Photo Pilot artwork
      tags:
        - Photo Pilot
  /v1/artworks/photo-pilot/aspect-ratios:
    get:
      description: Get a list of aspect ratios, including width and height details,
        available for creating different types of artwork.
      operationId: getPhotoPilotAspectRatios
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AspectRatioListResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Get aspect ratios
      tags:
        - Photo Pilot
  /v1/artworks/hamilton:
    post:
      description: Generate artwork using text-to-image generation with the Hamilton model.
      operationId: createHamiltonArtwork
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateHamiltonArtworkRequest"
            examples:
              basic-prompt:
                summary: Basic text-to-image generation
                description: Simple prompt with default settings
                value:
                  prompt: A beautiful sunset over the ocean with vibrant colors
                  aspectRatio: 16:9
              detailed-prompt:
                summary: Detailed generation with custom parameters
                description: Full control over generation parameters
                value:
                  prompt: A majestic dragon flying over a medieval castle, detailed scales,
                    dramatic lighting
                  negativePrompt: blurry, low quality
                  creativity: 4
                  details: 4
                  effort: 4
                  aspectRatio: 16:9
              custom-size:
                summary: Custom dimensions
                description: Using custom width and height instead of aspect ratio
                value:
                  prompt: Abstract art with geometric shapes and vibrant colors
                  creativity: 5
                  details: 3
                  effort: 3
                  width: 1024
                  height: 768
              high-resolution:
                summary: High resolution generation
                description: Using high resolution mode for larger output dimensions
                value:
                  prompt: A detailed portrait of a fantasy warrior with intricate armor
                  aspectRatio: 2:3
                  highResolution: true
                  effort: 4
                  webhook: https://example.com/webhooks/artwork-complete
      responses:
        "202":
          description: Response indicating that the artwork was successfully created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HamiltonArtworkResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Create Hamilton artwork
      tags:
        - Hamilton
  /v1/artworks/hamilton/aspect-ratios:
    get:
      description: Get a list of aspect ratios, including width and height details,
        available for creating Hamilton artworks.
      operationId: getHamiltonAspectRatios
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AspectRatioListResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Get Hamilton aspect ratios
      tags:
        - Hamilton
  /v1/artworks/hamilton/styles:
    get:
      description: Retrieve a list of styles available for creating Hamilton artworks.
      operationId: getHamiltonStyles
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/HamiltonStyleResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Get Hamilton styles
      tags:
        - Hamilton
  "/v1/organizations/{orgId}/api-keys":
    post:
      description: Generates a new API key with the specified scope and environment.
        The full API key is only returned once at creation - store it securely.
      operationId: createOrganizationApiKey
      parameters:
        - name: orgId
          required: true
          in: path
          description: Organization ID
          schema:
            example: 507f1f77bcf86cd799439011
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateApiKeyRequest"
            examples:
              manager-style-dna:
                summary: Manager scope, style-dna domain only
                description: Manager-level key restricted to style-dna endpoints
                value:
                  label: Galaxis Manager
                  scope: manager
                  domains:
                    - style-dna
              generator-multi-domain:
                summary: Generator scope, artworks + textcraft domains
                description: Generator-level key with access to artworks and textcraft endpoints
                value:
                  label: Acme Generator
                  scope: generator
                  domains:
                    - artworks
                    - textcraft
                  credits: 100
              admin-wildcard:
                summary: Admin scope (domains auto-set to wildcard)
                description: Admin keys ignore the supplied domains list and always get full
                  access
                value:
                  label: Acme Admin
                  scope: admin
                  domains:
                    - "*"
      responses:
        "201":
          description: API key created successfully. The apiKey field contains the full
            key and will only be shown once.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiKeyResponse"
        "400":
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Organization not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Create a new API key for an organization
      tags:
        - Organizations
  "/v1/organizations/{orgId}/api-keys/{keyId}":
    delete:
      description: Revokes an API key. This action cannot be undone. The key will
        immediately stop working.
      operationId: revokeOrganizationApiKey
      parameters:
        - name: orgId
          required: true
          in: path
          description: Organization ID
          schema:
            example: 507f1f77bcf86cd799439011
            type: string
        - name: keyId
          required: true
          in: path
          description: API Key ID (not the full key, but the keyId)
          schema:
            example: key_Abc123XyZ789
            type: string
      responses:
        "200":
          description: API key revoked successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteApiKeyResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Organization or API key not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Revoke an API key
      tags:
        - Organizations
  "/v1/organizations/{orgId}/webhook-secret":
    post:
      description: Generates a new webhook secret for the organization. If one already
        exists, it is replaced. Returns the plaintext secret (only time it is
        shown).
      operationId: rotateOrganizationWebhookSecret
      parameters:
        - name: orgId
          required: true
          in: path
          description: Organization ID
          schema:
            example: 507f1f77bcf86cd799439011
            type: string
      responses:
        "200":
          description: Webhook secret generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  secret:
                    type: string
                    description: The plaintext webhook secret (32 bytes encoded as 64-character
                      lowercase hex)
                    example: 3f4a8c1b2d6e9f0a7b5c8d1e2f4a6b8c0d2e4f6a8b0c2d4e6f8a0b2c4d6e8f0
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "404":
          description: Organization not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Generate or rotate the webhook secret
      tags:
        - Organizations
  /v1/style-dna/generate:
    post:
      operationId: StyleIdentityGenerateImage
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImageGenerationRequest"
            examples:
              generate-using-aspect-ratio:
                summary: generate by aspect ratio
                description: Image is generated by the required fields visualPrompt, anchorImage
                  and description fields, image size via aspect ratio
                value:
                  visualPrompt: White ship in the middle of the sea in a storm
                  anchorImageUrl: https://the-anchor-image-url.webp
                  description: Huge waves and lighting...
                  aspectRatio: 9:16
              generate-using-custom-size:
                summary: generate by custom size
                description: Image is generated by the required fields visualPrompt, anchorImage
                  and description fields, image size via aspect width and height
                value:
                  visualPrompt: White ship in the middle of the sea in a storm
                  anchorImageUrl: https://the-anchor-image-url.webp
                  description: Huge waves and lighting...
                  width: 860
                  height: 1440
      responses:
        "201":
          description: Generated image response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImageEditResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Generate image
      tags:
        - Style DNA
  /v1/style-dna/generate/asset:
    post:
      description: Generate an asset instead of a general image. The parameters are
        similar to the image generation but via the backgroundMode we can
        control the background.
      operationId: StyleIdentityGenerateAsset
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssetGenerationRequest"
            examples:
              transparent-asset-using-aspect-ratio:
                summary: "transparent asset by aspect ratio "
                description: Image is generated by the required fields visualPrompt, anchorImage
                  and description fields, image size via aspect ratio
                value:
                  visualPrompt: White ship in the middle of the sea in a storm
                  anchorImageUrl: https://the-anchor-image-url.webp
                  description: Huge waves and lighting...
                  aspectRatio: 9:16
                  backgroundMode: transparent
              white-background-asset-using-custom-size:
                summary: white background asset and custom size
                description: Image is generated by the required fields visualPrompt, anchorImage
                  and description fields, image size via aspect width and height
                value:
                  visualPrompt: White ship in the middle of the sea in a storm
                  anchorImageUrl: https://the-anchor-image-url.webp
                  description: Huge waves and lighting...
                  width: 860
                  height: 1440
                  backgroundMode: white
              chroma-green-background-asset-using-custom-size:
                summary: chroma green asset with custom size
                description: Image is generated by the required fields visualPrompt, anchorImage
                  and description fields, image size via aspect width and height
                value:
                  visualPrompt: White ship in the middle of the sea in a storm
                  anchorImageUrl: https://the-anchor-image-url.webp
                  description: Huge waves and lighting...
                  width: 860
                  height: 1440
                  backgroundMode: chroma_green
      responses:
        "201":
          description: Generated image response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImageEditResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Generate asset
      tags:
        - Style DNA
  /v1/style-dna/remove-background:
    post:
      description: Remove the background of the image specified as parameter. The
        image should not exceed the 2048x2048 dimension and the 1.763.584 total
        area
      operationId: StyleIdentityRemoveBackground
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RemoveBackgroundRequest"
            examples:
              remove-background:
                summary: "transparent asset by aspect ratio "
                description: Remove the background of the image specified as parameter.
                value:
                  imageUrl: https://existing-image-url.webp
                  imageFormat: png
      responses:
        "201":
          description: Generated image response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImageEditResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Remove background
      tags:
        - Style DNA
  /v1/style-dna/generate-style-options:
    post:
      operationId: styleIdentityGenerateStyleOptions
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StyleOptionsRequest"
      responses:
        "201":
          description: Response with a list of generated style options and cost of
            generation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StyleOptionsResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Generate style options
      tags:
        - Style DNA
  /v1/style-dna/generate-anchor:
    post:
      operationId: styleIdentityGenerateAnchorImage
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AnchorImageRequest"
      responses:
        "201":
          description: Response with a list of generated style options and cost of
            generation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AnchorImageResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Generate anchor image
      tags:
        - Style DNA
  /v1/style-dna/refine-prompt:
    post:
      description: Refine existing prompt by the provided feedback
      operationId: styleIdentityPromptRefine
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RefinePromptRequest"
      responses:
        "201":
          description: Response with the original and refiend prompt
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RefinePromptResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Prompt refine
      tags:
        - Style DNA
  /v1/style-dna/edit:
    post:
      operationId: EditImage
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImageEditRequest"
            examples:
              edit-using-aspect-ratio:
                summary: edit using aspect ratio
                description: Image is generated by the required fields visualPrompt, anchorImage
                  and description fields, image size via aspect ratio
                value:
                  prompt: Remove the hat
                  imageUrl: https://image-url.webp
                  imageGuidance: 3
                  modification: 5
                  creativity: 5
                  effort: 1
                  aspectRatio: 9:16
              edit-using-custom-size-and-format:
                summary: edit using custom size and format
                description: Image is generated by the required fields visualPrompt, anchorImage
                  and description fields, image size via aspect width and height
                value:
                  prompt: Remove the hat
                  imageUrl: https://image-url.webp
                  imageGuidance: 3
                  modification: 3
                  creativity: 3
                  effort: 1
                  width: 860
                  height: 1440
                  imageFormat: webp
      responses:
        "201":
          description: Edited image data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImageGenerationResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Edit image
      tags:
        - Style DNA
  /v1/style-dna/edit/style-aware:
    post:
      description: Edit image in style aware mode, modifications are in sync with the
        style of the original image
      operationId: EditImageStyleAware
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImageEditStyleAwareRequest"
            examples:
              style-aware-edit:
                summary: edit using aspect ratio
                description: Image is generated by the required fields visualPrompt, anchorImage
                  and description fields, image size via aspect ratio
                value:
                  prompt: Add a walking stick
                  imageUrl: https://image-url.webp
                  imageGuidance: 3
                  modification: 5
                  creativity: 5
                  effort: 1
                  aspectRatio: 9:16
                  visualPrompt: A chaotic yet ordered visual language defined by jagged, angular
                    structures and subtle luminescent glows emerging from smoky,
                    shadowy voids. The palette centers around deep magenta,
                    muted emerald, and high-contrast black, layered with
                    translucent textures and reflective chrome surfaces.
                    Lighting is dramatic and directional, casting sharp
                    silhouettes and soft halos to amplify depth and futurism.
      responses:
        "201":
          description: Edited image data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImageGenerationResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Edit image in style aware mode
      tags:
        - Style DNA
  /v1/textcraft:
    post:
      operationId: TextcraftController_createTextResponse_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Text2TextRequest"
            examples:
              basic-text-generation:
                summary: Basic text generation
                description: Simple prompt with model selection
                value:
                  prompt: Write a professional email about project status
                  model: agile-fast-2025-11-10
                  temperature: 0.7
                  maxTokens: 500
              image-url-analysis:
                summary: Text generation with image URL
                description: Generate text based on prompt and image from URL
                value:
                  prompt: Describe this image in detail
                  model: agile-fast-2025-11-10
                  imageUrl: https://example.com/image.jpg
                  temperature: 0.5
              image-base64-analysis:
                summary: Text generation with base64 image
                description: Generate text based on prompt and base64 encoded image
                value:
                  prompt: What objects are in this image?
                  model: agile-fast-2025-11-10
                  imageData: data:image/jpeg;base64,/9j/4AAQSkZJRg...
                  maxTokens: 300
      responses:
        "201":
          description: Response of the llm and cost of generation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Text2TextResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: Call different llm models, sending text prompt and optionally image data
      tags:
        - Textcraft
  /v1/textcraft/models:
    get:
      operationId: TextcraftController_getModels_v1
      parameters:
        - name: name
          required: false
          in: query
          schema:
            type: string
        - name: released
          required: false
          in: query
          schema:
            properties:
              gte:
                type: string
                required: false
              lte:
                type: string
                required: false
            type: object
        - name: released[lte]
          required: false
          in: query
          description: Filter models released on or before this date (ISO 8601 format)
          schema:
            type: string
        - name: released[gte]
          required: false
          in: query
          description: Filter models released on or after this date (ISO 8601 format)
          schema:
            type: string
      responses:
        "200":
          description: List of available models.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ModelResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      security:
        - bearer: []
      summary: List, optionally filter, available LLM models
      tags:
        - Textcraft
  /v1/artworks/txt2img:
    post:
      operationId: createTxt2ImgArtwork
      summary: Create txt2img artwork
      description: Generate artwork using text-to-image (txt2img) conversion.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTxt2ImgArtworkRequest"
      responses:
        "201":
          description: Response indicating that the artwork was successfully created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Txt2ImgArtworkResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      tags:
        - Artworks
      security:
        - bearer: []
      deprecated: true
  /v1/artworks/upscaling:
    post:
      operationId: createUpscalingArtwork
      summary: Create upscaling artwork
      description: Create high-resolution artwork by utilizing upscaling techniques.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUpscalingArtworkRequest"
      responses:
        "201":
          description: Response indicating that the artwork was successfully created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpscalingArtworkResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      tags:
        - Artworks
      security:
        - bearer: []
      deprecated: true
  /v1/aspect-ratios:
    get:
      operationId: getAspectRatios
      summary: Get aspect ratios
      description: Get a list of aspect ratios, including width and height details,
        available for creating different types of artwork.
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AspectRatioResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      tags:
        - Aspect ratios
      security:
        - bearer: []
      deprecated: true
  /v1/aspect-ratios/photo-pilot:
    get:
      operationId: getPhotoPilotAspectRatios
      summary: Get aspect ratios
      description: Get a list of aspect ratios, including width and height details,
        available for creating different types of artwork.
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AspectRatioListResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      tags:
        - Photo Pilot Aspect Ratios
      security:
        - bearer: []
      deprecated: true
  /v1/hamilton/aspect-ratios:
    get:
      operationId: getHamiltonAspectRatios
      summary: Get Hamilton aspect ratios
      description: Get a list of aspect ratios, including width and height details,
        available for creating Hamilton artworks.
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AspectRatioListResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      tags:
        - Hamilton Aspect Ratios
      security:
        - bearer: []
      deprecated: true
  /v1/hamilton/styles:
    get:
      operationId: getHamiltonStyles
      summary: Get Hamilton styles
      description: Retrieve a list of styles available for creating Hamilton artworks.
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/HamiltonStyleResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      tags:
        - Hamilton Styles
      security:
        - bearer: []
      deprecated: true
  /v1/styles:
    get:
      operationId: getStyles
      summary: Get styles
      description: Retrieve a list of styles available for creating various types of
        artwork, including details on img2img support and associated flags.
      parameters: []
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/StyleResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
      tags:
        - Styles
      security:
        - bearer: []
      deprecated: true
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: |
        Personal Supabase-issued JWT for a Tengr.ai user account with a
        `business` subscription. Sent as `Authorization: Bearer <jwt>`.
  schemas:
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
        statusCode:
          type: number
        error:
          type: string
          description: Available only when the message includes additional error details.
      required:
        - message
        - statusCode
    ApiMetadataResponse:
      type: object
      properties:
        version:
          type: string
        routes:
          items:
            type: object
            properties:
              method:
                type: string
                required: true
              path:
                type: string
                required: true
            required:
              - method
              - path
          type: array
      required:
        - version
        - routes
    HealthResponse:
      type: object
      properties:
        status:
          type: string
      required:
        - status
    RemoveBackgroundRequest:
      type: object
      properties:
        imageUrl:
          type: string
        imageFormat:
          default: png
          type: string
          enum:
            - png
            - webp
          example: png
          description: "Specify the format of the output image: png or webp"
      required:
        - imageUrl
    RemoveBackgroundArtworkResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        artworkType:
          type: string
          enum:
            - remove_background
        parameters:
          type: object
          properties:
            imageUrl:
              description: URL of the image to remove the background from.
              type: string
              format: uri
              required: true
            imageFormat:
              type: string
              enum:
                - png
                - webp
              description: 'Output image format. Defaults to "png". Supported values: "png",
                "webp".'
              required: false
            bucket:
              type: string
              required: false
            webhook:
              type: string
              format: uri
              description: Optional webhook URL. When provided, the server will POST the final
                artwork result to this URL upon completion.
              required: false
        duration:
          type: number
        results:
          items:
            type: string
          type: array
        status:
          type: string
          enum:
            - starting
            - processing
            - succeeded
            - failed
            - canceled
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - artworkType
        - parameters
        - duration
        - results
        - status
        - createdAt
    CreateTxt2ImgArtworkRequest:
      type: object
      properties:
        model:
          type: string
          enum:
            - tengrai-20231128-m-d.safetensors
            - tengrai-20240423-m-f.safetensors
        batch:
          default: 2
          type: integer
          minimum: 1
          maximum: 2
          description: Number of images to generate per task (1-2). Default 2.
        promptMode:
          default: seer
          type: string
          enum:
            - seer
            - servitor
        prompt:
          default: cat
          type: string
          description: Limited to 256 words; additional content will be truncated.
        negativePrompt:
          default: ""
          type: string
          description: Limited to 64 words; additional content will be truncated.
        style:
          default: default
          type: string
          enum:
            - default
            - portraiture
            - landscape
            - photographer
            - analog
            - car
            - food
            - horror
            - stained-glass
            - impasto
            - abstract-ink
            - illustration
            - aquarelle
            - water-cute
            - sphericute
            - fairytale
            - machinart
            - isometric
            - logo
            - abstractpen
            - lineart
            - manga
            - infiny-weave
            - infiny-pattern
            - infiny-flow
        creativity:
          default: 3
          type: integer
          minimum: 1
          maximum: 5
          multipleOf: 1
        details:
          default: 3
          type: integer
          minimum: 1
          maximum: 5
          multipleOf: 1
        aspectRatio:
          type: string
          enum:
            - 1:1
            - 7:9
            - 2:3
            - 4:7
            - 9:16
            - 9:21
            - 9:7
            - 3:2
            - 7:4
            - 16:9
            - 21:9
          example: 1:1
          description: Defaults to a 1:1 ratio (1024 × 1024) if width and height are not
            specified.
        width:
          type: integer
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216).
        height:
          type: integer
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216).
        nsfw:
          default: false
          type: boolean
        transparentBackground:
          default: false
          type: boolean
        colorTone:
          type: string
          enum:
            - cool
            - warm
            - blackAndWhite
            - pastel
            - vibrantColors
            - sepia
            - mutedColors
            - neonColors
          description: Overall color palette. Prepended to the prompt; flows through SEER
            improvement.
        cameraAngle:
          type: string
          enum:
            - closeUp
            - eyeLevel
            - lowAngle
            - highAngle
            - wormsEye
            - birdsEye
            - fishEye
            - aerialView
            - dutchAngle
            - firstPersonView
          description: Camera framing/perspective. Prepended to the prompt; flows through
            SEER improvement.
        bucket:
          type: string
        webhook:
          type: string
          format: uri
          description: Optional webhook URL. When provided, the server will POST the final
            artwork result to this URL upon completion.
    Txt2ImgArtworkResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        artworkType:
          type: string
          enum:
            - selena
        parameters:
          type: object
          properties:
            model:
              type: string
              enum:
                - tengrai-20231128-m-d.safetensors
                - tengrai-20240423-m-f.safetensors
              required: false
            batch:
              default: 2
              type: integer
              minimum: 1
              maximum: 2
              description: Number of images to generate per task (1-2). Default 2.
              required: false
            promptMode:
              default: seer
              type: string
              enum:
                - seer
                - servitor
              required: false
            prompt:
              default: cat
              type: string
              description: Limited to 256 words; additional content will be truncated.
              required: false
            negativePrompt:
              default: ""
              type: string
              description: Limited to 64 words; additional content will be truncated.
              required: false
            style:
              default: default
              type: string
              enum:
                - default
                - portraiture
                - landscape
                - photographer
                - analog
                - car
                - food
                - horror
                - stained-glass
                - impasto
                - abstract-ink
                - illustration
                - aquarelle
                - water-cute
                - sphericute
                - fairytale
                - machinart
                - isometric
                - logo
                - abstractpen
                - lineart
                - manga
                - infiny-weave
                - infiny-pattern
                - infiny-flow
              required: false
            creativity:
              default: 3
              type: integer
              minimum: 1
              maximum: 5
              multipleOf: 1
              required: false
            details:
              default: 3
              type: integer
              minimum: 1
              maximum: 5
              multipleOf: 1
              required: false
            aspectRatio:
              type: string
              enum:
                - 1:1
                - 7:9
                - 2:3
                - 4:7
                - 9:16
                - 9:21
                - 9:7
                - 3:2
                - 7:4
                - 16:9
                - 21:9
              example: 1:1
              description: Defaults to a 1:1 ratio (1024 × 1024) if width and height are not
                specified.
              required: false
            width:
              type: integer
              minimum: 512
              maximum: 2048
              example: 1024
              description: >-
                Use aspectRatio instead of custom width and height for better
                quality.

                If defined, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216).
              required: false
            height:
              type: integer
              minimum: 512
              maximum: 2048
              example: 1024
              description: >-
                Use aspectRatio instead of custom width and height for better
                quality.

                If defined, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216).
              required: false
            nsfw:
              default: false
              type: boolean
              required: false
            transparentBackground:
              default: false
              type: boolean
              required: false
            colorTone:
              type: string
              enum:
                - cool
                - warm
                - blackAndWhite
                - pastel
                - vibrantColors
                - sepia
                - mutedColors
                - neonColors
              description: Overall color palette. Prepended to the prompt; flows through SEER
                improvement.
              required: false
            cameraAngle:
              type: string
              enum:
                - closeUp
                - eyeLevel
                - lowAngle
                - highAngle
                - wormsEye
                - birdsEye
                - fishEye
                - aerialView
                - dutchAngle
                - firstPersonView
              description: Camera framing/perspective. Prepended to the prompt; flows through
                SEER improvement.
              required: false
            bucket:
              type: string
              required: false
            webhook:
              type: string
              format: uri
              description: Optional webhook URL. When provided, the server will POST the final
                artwork result to this URL upon completion.
              required: false
        duration:
          type: number
        results:
          items:
            type: string
          type: array
        status:
          type: string
          enum:
            - starting
            - processing
            - succeeded
            - failed
            - canceled
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - artworkType
        - parameters
        - duration
        - results
        - status
        - createdAt
    UpscalingArtworkResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        artworkType:
          type: string
          enum:
            - upscaling_v2
        parameters:
          type: object
          properties:
            imageUrl:
              type: string
              format: uri
              description: "The URL of the image. The image's total area (width × height) must
                not exceed 1,478,656 pixels (e.g., 1216 × 1216). Accepted image
                formats: JPEG, JPG, PNG, and WebP."
              required: true
            scaleFactor:
              default: 2
              type: integer
              minimum: 2
              maximum: 8
              required: false
            bucket:
              type: string
              required: false
            webhook:
              type: string
              format: uri
              description: Optional webhook URL. When provided, the server will POST the final
                artwork result to this URL upon completion.
              required: false
        duration:
          type: number
        results:
          items:
            type: string
          type: array
        status:
          type: string
          enum:
            - starting
            - processing
            - succeeded
            - failed
            - canceled
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - artworkType
        - parameters
        - duration
        - results
        - status
        - createdAt
    StyleResponse:
      type: object
      properties:
        name:
          type: string
          enum:
            - default
            - portraiture
            - landscape
            - photographer
            - analog
            - car
            - food
            - horror
            - stained-glass
            - impasto
            - abstract-ink
            - illustration
            - aquarelle
            - water-cute
            - sphericute
            - fairytale
            - machinart
            - isometric
            - logo
            - abstractpen
            - lineart
            - manga
            - infiny-weave
            - infiny-pattern
            - infiny-flow
        img2img:
          type: boolean
        flag:
          type: string
      required:
        - name
        - img2img
    AspectRatioResponse:
      type: object
      properties:
        name:
          type: string
          enum:
            - 1:1
            - 7:9
            - 2:3
            - 4:7
            - 9:16
            - 9:21
            - 9:7
            - 3:2
            - 7:4
            - 16:9
            - 21:9
        width:
          type: number
        height:
          type: number
      required:
        - name
        - width
        - height
    CreatePhotoPilotArtworkV1Request:
      type: object
      properties:
        prompt:
          default: cat
          type: string
          description: Limited to 256 words; additional content will be truncated.
        negativePrompt:
          default: ""
          type: string
          description: Limited to 64 words; additional content will be truncated.
        imageGuidance:
          type: number
          enum:
            - 1
            - 2
            - 3
          description: When image guidance is set to low size of image can be set as
            parameter otherwise the input image size is taken as reference
        modification:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        creativity:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        effort:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        aspectRatio:
          type: string
          enum:
            - 1:1
            - 2:3
            - 3:4
            - 4:3
            - 9:16
            - 3:2
            - 16:9
          description: Has effect only if image Guidance is set to low. Can not be used at
            the same time with width and height provide only aspect ratio or
            image size.
        highResolution:
          type: boolean
          description: Toggle high resolution size of supported aspect ratios
        width:
          type: number
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality. Only honored when imageGuidance is LOW; otherwise the
            source image's dimensions are used.

            When LOW, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216), or 1,763,584 pixels (e.g., 1328 × 1328) when highResolution is true.
        height:
          type: number
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality. Only honored when imageGuidance is LOW; otherwise the
            source image's dimensions are used.

            When LOW, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216), or 1,763,584 pixels (e.g., 1328 × 1328) when highResolution is true.
        bucket:
          type: string
        imageUrl:
          type: string
          description: Source image URL for img2img.
        webhook:
          type: string
          format: uri
          description: Optional webhook URL. When provided, the server will POST the final
            artwork result to this URL upon completion.
      required:
        - imageGuidance
        - modification
        - creativity
        - effort
        - imageUrl
    PhotoPilotArtworkResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        artworkType:
          type: string
          enum:
            - photo_pilot
        parameters:
          type: object
          properties:
            prompt:
              default: cat
              type: string
              description: Limited to 256 words; additional content will be truncated.
              required: false
            negativePrompt:
              default: ""
              type: string
              description: Limited to 64 words; additional content will be truncated.
              required: false
            imageGuidance:
              type: number
              enum:
                - 1
                - 2
                - 3
              description: When image guidance is set to low size of image can be set as
                parameter otherwise the input image size is taken as reference
              required: true
            modification:
              type: number
              enum:
                - 1
                - 2
                - 3
                - 4
                - 5
              required: true
            creativity:
              type: number
              enum:
                - 1
                - 2
                - 3
                - 4
                - 5
              required: true
            effort:
              type: number
              enum:
                - 1
                - 2
                - 3
                - 4
                - 5
              required: true
            aspectRatio:
              type: string
              enum:
                - 1:1
                - 2:3
                - 3:4
                - 4:3
                - 9:16
                - 3:2
                - 16:9
              description: Has effect only if image Guidance is set to low. Can not be used at
                the same time with width and height provide only aspect ratio or
                image size.
              required: false
            highResolution:
              type: boolean
              description: Toggle high resolution size of supported aspect ratios
              required: false
            width:
              type: number
              minimum: 512
              maximum: 2048
              example: 1024
              description: >-
                Use aspectRatio instead of custom width and height for better
                quality. Only honored when imageGuidance is LOW; otherwise the
                source image's dimensions are used.

                When LOW, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216), or 1,763,584 pixels (e.g., 1328 × 1328) when highResolution is true.
              required: false
            height:
              type: number
              minimum: 512
              maximum: 2048
              example: 1024
              description: >-
                Use aspectRatio instead of custom width and height for better
                quality. Only honored when imageGuidance is LOW; otherwise the
                source image's dimensions are used.

                When LOW, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216), or 1,763,584 pixels (e.g., 1328 × 1328) when highResolution is true.
              required: false
            bucket:
              type: string
              required: false
            imageUrls:
              type: array
              items:
                type: string
                format: uri
              minItems: 1
              maxItems: 3
              description: Source image URLs for img2img. 1-3 entries; the first image's
                dimensions are used when imageGuidance is HIGH.
              required: true
              isArray: true
            webhook:
              type: string
              format: uri
              description: Optional webhook URL. When provided, the server will POST the final
                artwork result to this URL upon completion.
              required: false
        duration:
          type: number
        results:
          items:
            type: string
          type: array
        status:
          type: string
          enum:
            - starting
            - processing
            - succeeded
            - failed
            - canceled
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - artworkType
        - parameters
        - duration
        - results
        - status
        - createdAt
    AspectRatioListResponse:
      type: object
      properties:
        name:
          type: string
        aspectRatios:
          items:
            type: object
            properties:
              name:
                type: string
                enum:
                  - 1:1
                  - 2:3
                  - 3:4
                  - 4:3
                  - 9:16
                  - 3:2
                  - 16:9
                required: true
              width:
                type: number
                required: true
              height:
                type: number
                required: true
            required:
              - name
              - width
              - height
          type: array
      required:
        - name
        - aspectRatios
    CreateHamiltonArtworkRequest:
      type: object
      properties:
        prompt:
          default: cat
          type: string
          description: Limited to 256 words; additional content will be truncated.
        negativePrompt:
          default: ""
          type: string
          description: Limited to 64 words; additional content will be truncated.
        style:
          type: string
          enum:
            - default
            - stained-glass
            - line-drawing
            - simple-sketch
            - hand-sketch
            - coloring-book
            - plasticine
            - photographer
            - analog
            - abstract-flat
            - surreal
            - manga
          description: The style to apply to the generated image.
        promptMode:
          default: seer
          type: string
          enum:
            - seer
            - servitor
          description: Controls prompt enhancement. SEER enables AI-powered improvement,
            SERVITOR uses the prompt as-is.
        creativity:
          default: 3
          type: integer
          minimum: 1
          maximum: 5
          multipleOf: 1
          description: "Controls the CFG scale. Range: 1-5."
        effort:
          default: 3
          type: integer
          minimum: 1
          maximum: 5
          multipleOf: 1
          description: "Controls generation quality vs speed. 1=fastest, 5=highest
            quality. Range: 1-5."
        aspectRatio:
          type: string
          enum:
            - 1:1
            - 2:3
            - 3:4
            - 4:3
            - 9:16
            - 3:2
            - 16:9
          example: 1:1
          description: Defaults to a 1:1 ratio (1024 × 1024) if width and height are not
            specified.
        width:
          type: integer
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216) when highResolution is false, or 1,763,584 pixels (e.g., 1328 × 1328) when highResolution is true.
        height:
          type: integer
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216) when highResolution is false, or 1,763,584 pixels (e.g., 1328 × 1328) when highResolution is true.
        nsfw:
          default: false
          type: boolean
        transparentBackground:
          default: false
          type: boolean
        bucket:
          type: string
        highResolution:
          default: false
          type: boolean
          description: When true, uses higher resolution dimensions for aspect ratios
            (e.g., 1328×1328 instead of 1024×1024 for 1:1).
        webhook:
          type: string
          format: uri
          description: Optional webhook URL. When provided, the server will POST the final
            artwork result to this URL upon completion.
    HamiltonArtworkResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        artworkType:
          type: string
          enum:
            - hamilton
        parameters:
          type: object
          properties:
            prompt:
              default: cat
              type: string
              description: Limited to 256 words; additional content will be truncated.
              required: false
            negativePrompt:
              default: ""
              type: string
              description: Limited to 64 words; additional content will be truncated.
              required: false
            style:
              type: string
              enum:
                - default
                - stained-glass
                - line-drawing
                - simple-sketch
                - hand-sketch
                - coloring-book
                - plasticine
                - photographer
                - analog
                - abstract-flat
                - surreal
                - manga
              description: The style to apply to the generated image.
              required: false
            promptMode:
              default: seer
              type: string
              enum:
                - seer
                - servitor
              description: Controls prompt enhancement. SEER enables AI-powered improvement,
                SERVITOR uses the prompt as-is.
              required: false
            creativity:
              default: 3
              type: integer
              minimum: 1
              maximum: 5
              multipleOf: 1
              description: "Controls the CFG scale. Range: 1-5."
              required: false
            effort:
              default: 3
              type: integer
              minimum: 1
              maximum: 5
              multipleOf: 1
              description: "Controls generation quality vs speed. 1=fastest, 5=highest
                quality. Range: 1-5."
              required: false
            aspectRatio:
              type: string
              enum:
                - 1:1
                - 2:3
                - 3:4
                - 4:3
                - 9:16
                - 3:2
                - 16:9
              example: 1:1
              description: Defaults to a 1:1 ratio (1024 × 1024) if width and height are not
                specified.
              required: false
            width:
              type: integer
              minimum: 512
              maximum: 2048
              example: 1024
              description: >-
                Use aspectRatio instead of custom width and height for better
                quality.

                If defined, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216) when highResolution is false, or 1,763,584 pixels (e.g., 1328 × 1328) when highResolution is true.
              required: false
            height:
              type: integer
              minimum: 512
              maximum: 2048
              example: 1024
              description: >-
                Use aspectRatio instead of custom width and height for better
                quality.

                If defined, the total area (width × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216) when highResolution is false, or 1,763,584 pixels (e.g., 1328 × 1328) when highResolution is true.
              required: false
            nsfw:
              default: false
              type: boolean
              required: false
            transparentBackground:
              default: false
              type: boolean
              required: false
            bucket:
              type: string
              required: false
            highResolution:
              default: false
              type: boolean
              description: When true, uses higher resolution dimensions for aspect ratios
                (e.g., 1328×1328 instead of 1024×1024 for 1:1).
              required: false
            webhook:
              type: string
              format: uri
              description: Optional webhook URL. When provided, the server will POST the final
                artwork result to this URL upon completion.
              required: false
        duration:
          type: number
        results:
          items:
            type: string
          type: array
        status:
          type: string
          enum:
            - starting
            - processing
            - succeeded
            - failed
            - canceled
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - artworkType
        - parameters
        - duration
        - results
        - status
        - createdAt
    HamiltonStyleResponse:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
      required:
        - id
        - name
    CreateApiKeyRequest:
      type: object
      properties:
        label:
          type: string
          minLength: 1
          maxLength: 100
          description: Human-readable label for the API key
        scope:
          type: string
          enum:
            - admin
            - manager
            - generator
          description: Scope determines the permissions of the API key (admin, manager, or
            generator)
        domains:
          type: array
          items:
            type: string
            enum:
              - artworks
              - style-dna
              - textcraft
              - "*"
          minItems: 1
          description: Feature domains the key may access. Admin scope auto-overrides to
            ['*'].
        credits:
          default: 0
          type: integer
          minimum: 0
          description: Initial credits allocated to the API key
      required:
        - label
        - scope
        - domains
    ApiKeyResponse:
      type: object
      properties:
        keyId:
          type: string
          description: Unique identifier for the API key
        apiKey:
          type: string
          description: The full API key - ONLY shown once at creation. Store this securely.
        keyPrefix:
          type: string
          description: First 10 characters of the API key for identification
        label:
          type: string
          description: Human-readable label for the API key
        scope:
          type: string
          enum:
            - admin
            - manager
            - generator
          description: Permission scope of the API key
        domains:
          type: array
          items:
            type: string
            enum:
              - artworks
              - style-dna
              - textcraft
              - "*"
          description: Feature domains the key may access
        environment:
          type: string
          enum:
            - live
            - test
          description: Environment the key is valid for
        credits:
          type: number
          description: Available credits for this API key
        status:
          type: string
          enum:
            - active
            - revoked
            - expired
          description: Current status of the API key
        usageCount:
          type: number
          description: Number of times the key has been used
        lastUsedAt:
          type: string
          format: date-time
          description: Last time the key was used (ISO 8601 format)
          nullable: true
        expiresAt:
          type: string
          format: date-time
          description: Expiration date of the key (ISO 8601 format)
          nullable: true
        createdAt:
          type: string
          format: date-time
          description: Creation date of the key (ISO 8601 format)
      required:
        - keyId
        - keyPrefix
        - label
        - scope
        - domains
        - environment
        - credits
        - status
        - usageCount
        - lastUsedAt
        - expiresAt
        - createdAt
    DeleteApiKeyResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the deletion was successful
        message:
          type: string
          description: Status message
      required:
        - success
        - message
    ImageGenerationRequest:
      type: object
      properties:
        visualPrompt:
          type: string
        anchorImageUrl:
          type: string
        description:
          type: string
        aspectRatio:
          type: string
          description: Has effect only if image Guidance is set to low. Can not be used at
            the same time with width and height provide only aspect ratio or
            image size.
        width:
          type: number
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,763,584 pixels.
        height:
          type: number
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,763,584 pixels.
        imageFormat:
          default: png
          type: string
          enum:
            - png
            - webp
          example: png
          description: "Specify the format of the output image: png or webp"
      required:
        - visualPrompt
        - anchorImageUrl
        - description
    ImageEditResponse:
      type: object
      properties:
        imageUrl:
          type: string
        expiresAt:
          type: string
          format: date-time
        creditsUsed:
          type: number
      required:
        - imageUrl
        - expiresAt
        - creditsUsed
    AssetGenerationRequest:
      type: object
      properties:
        backgroundMode:
          default: transparent
          type: string
          enum:
            - transparent
            - white
            - chroma_green
        visualPrompt:
          type: string
        anchorImageUrl:
          type: string
        description:
          type: string
        aspectRatio:
          type: string
          description: Has effect only if image Guidance is set to low. Can not be used at
            the same time with width and height provide only aspect ratio or
            image size.
        width:
          type: number
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,763,584 pixels.
        height:
          type: number
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,763,584 pixels.
        imageFormat:
          default: png
          type: string
          enum:
            - png
            - webp
          example: png
          description: "Specify the format of the output image: png or webp"
      required:
        - visualPrompt
        - anchorImageUrl
        - description
    StyleOptionsRequest:
      type: object
      properties:
        description:
          type: string
        referenceImageUrl:
          type: string
        count:
          default: 3
          type: number
          minimum: 1
          maximum: 5
      required:
        - description
    StyleOptionsResponse:
      type: object
      properties:
        options:
          items:
            type: object
            properties:
              name:
                type: string
                required: true
              description:
                type: string
                required: true
              visualPrompt:
                type: string
                required: true
            required:
              - name
              - description
              - visualPrompt
          type: array
        creditsUsed:
          type: number
      required:
        - options
        - creditsUsed
    AnchorImageRequest:
      type: object
      properties:
        visualPrompt:
          type: string
        imageUrl:
          type: string
          description: Optional reference image
        aspectRatio:
          type: string
      required:
        - visualPrompt
        - aspectRatio
    AnchorImageResponse:
      type: object
      properties:
        imageUrl:
          type: string
        expiresAt:
          type: string
          format: date-time
        creditsUsed:
          type: number
      required:
        - imageUrl
        - expiresAt
        - creditsUsed
    RefinePromptRequest:
      type: object
      properties:
        prompt:
          type: string
        feedback:
          type: string
      required:
        - prompt
        - feedback
    RefinePromptResponse:
      type: object
      properties:
        originalPrompt:
          type: string
        refinedPrompt:
          type: string
        creditsUsed:
          type: number
      required:
        - originalPrompt
        - refinedPrompt
        - creditsUsed
    ImageEditRequest:
      type: object
      properties:
        prompt:
          default: cat
          type: string
          description: Limited to 256 words; additional content will be truncated.
        negativePrompt:
          default: " "
          type: string
          description: Limited to 64 words; additional content will be truncated.
        imageGuidance:
          type: number
          enum:
            - 1
            - 2
            - 3
          description: When image guidance is set to low size of image can be set as
            parameter otherwise the input image size is taken as reference
        modification:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        creativity:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        effort:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        aspectRatio:
          type: string
          enum:
            - 1:1
            - 2:3
            - 3:4
            - 4:3
            - 9:16
            - 3:2
            - 16:9
          description: Has effect only if image Guidance is set to low. Can not be used at
            the same time with width and height provide only aspect ratio or
            image size.
        width:
          type: number
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,763,584 pixels.
        height:
          type: number
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,763,584 pixels.
        imageUrl:
          type: string
        imageFormat:
          default: png
          type: string
          enum:
            - png
            - webp
          example: png
          description: "Specify the format of the output image: png or webp"
      required:
        - imageGuidance
        - modification
        - creativity
        - effort
        - imageUrl
    ImageGenerationResponse:
      type: object
      properties:
        imageUrl:
          type: string
        expiresAt:
          type: string
          format: date-time
        creditsUsed:
          type: number
      required:
        - imageUrl
        - expiresAt
        - creditsUsed
    ImageEditStyleAwareRequest:
      type: object
      properties:
        visualPrompt:
          type: string
        prompt:
          default: cat
          type: string
          description: Limited to 256 words; additional content will be truncated.
        negativePrompt:
          default: " "
          type: string
          description: Limited to 64 words; additional content will be truncated.
        imageGuidance:
          type: number
          enum:
            - 1
            - 2
            - 3
          description: When image guidance is set to low size of image can be set as
            parameter otherwise the input image size is taken as reference
        modification:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        creativity:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        effort:
          type: number
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
        aspectRatio:
          type: string
          enum:
            - 1:1
            - 2:3
            - 3:4
            - 4:3
            - 9:16
            - 3:2
            - 16:9
          description: Has effect only if image Guidance is set to low. Can not be used at
            the same time with width and height provide only aspect ratio or
            image size.
        width:
          type: number
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,763,584 pixels.
        height:
          type: number
          minimum: 512
          maximum: 2048
          example: 1024
          description: >-
            Use aspectRatio instead of custom width and height for better
            quality.

            If defined, the total area (width × height) must not exceed 1,763,584 pixels.
        imageUrl:
          type: string
        imageFormat:
          default: png
          type: string
          enum:
            - png
            - webp
          example: png
          description: "Specify the format of the output image: png or webp"
      required:
        - visualPrompt
        - imageGuidance
        - modification
        - creativity
        - effort
        - imageUrl
    Text2TextRequest:
      type: object
      properties:
        prompt:
          type: string
          description: The input text prompt to send to the model
        model:
          type: string
          description: The model identifier to use for generation. See GET
            /v1/textcraft/models for available models
        temperature:
          type: number
          description: Sampling temperature. Not supported when thinking is enabled
        maxTokens:
          type: number
          description: Maximum number of output tokens to generate. Defaults to the
            model's configured maximum
        imageUrl:
          type: string
          description: URL of an image to include as input. Only supported by
            vision-capable models
        imageData:
          type: string
          description: Base64-encoded image data to include as input. Only supported by
            vision-capable models
        thinking:
          type: boolean
          description: Enable extended thinking/reasoning mode. When true, the model will
            return a reasoning field with its internal thought process. Silently
            ignored for models that do not support thinking
        tools:
          type: object
          additionalProperties:
            type: object
            properties:
              description:
                type: string
                description: A description of what the tool does, used by the model to decide
                  when to call it
                required: true
              parameters:
                type: object
                additionalProperties: {}
                description: A map of parameter names to their descriptions
                required: true
            required:
              - description
              - parameters
          description: Tool definitions the model can call. The model will return
            toolCalls in the response if it decides to use a tool
        reasoningConfig:
          type: object
          properties:
            type:
              type: string
              enum:
                - enabled
                - disabled
              description: Whether to enable or disable extended reasoning. Only applies to
                Claude models on Bedrock
              required: false
            budgetTokens:
              type: integer
              exclusiveMinimum: true
              description: Maximum number of tokens the model can use for internal reasoning.
                Counts against the total maxTokens budget
              required: false
              minimum: 0
          description: Advanced reasoning configuration for Claude models. Use
            thinking:true for a simpler alternative that works across all
            thinking-capable models
        additionalModelRequestFields:
          type: object
          additionalProperties: {}
          description: "Advanced: arbitrary fields passed directly to the Bedrock Converse
            API additionalModelRequestFields. Use thinking:true instead for
            thinking support"
      required:
        - prompt
        - model
    Text2TextResponse:
      type: object
      properties:
        text:
          type: string
          description: The generated text response from the model
        reasoning:
          type: string
          description: The model's internal reasoning process, returned when thinking mode
            is enabled and the model supports it
        tokens:
          type: number
          description: Total number of tokens used by the request, including input and
            output tokens
        toolCalls:
          items:
            type: object
            properties:
              toolName:
                type: string
                description: The name of the tool the model has chosen to call
                required: true
              toolCallId:
                type: string
                description: A unique identifier for this tool call
                required: true
              args:
                description: The arguments the model wants to pass to the tool
                required: false
            required:
              - toolName
              - toolCallId
          description: Tool calls requested by the model. Present when the model decides
            to use one or more of the provided tools instead of, or in addition
            to, generating text
          type: array
        creditsUsed:
          type: number
      required:
        - text
        - creditsUsed
    ModelResponse:
      type: object
      properties:
        name:
          type: string
        releasedAt:
          type: string
          format: date-time
        imageInputSupported:
          type: boolean
      required:
        - name
        - releasedAt
        - imageInputSupported
    CreateUpscalingArtworkRequest:
      type: object
      properties:
        imageUrl:
          type: string
          format: uri
          description: "The URL of the image to be upscaled. The image's total area (width
            × height) must not exceed 1,478,656 pixels (e.g., 1216 × 1216).
            Accepted image formats: JPEG, JPG, PNG, and WebP."
        scaleFactor:
          default: 2
          type: integer
          minimum: 2
          maximum: 8
      required:
        - imageUrl
