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

# Train Brand Kit Recraft Style

> Trigger Recraft custom-style training for a brand kit.

Calls Recraft's ``create-style`` endpoint via Fal with the kit's
reference logos, persists the returned ``style_id`` on the kit.
Once trained, every Recraft generation for this brand will use
the custom style — the strongest brand anchor available.

Cost: ~$0.04 (one-shot). Subsequent generations are normal v3 cost.

Operator-only today. Future auto-trigger on brand_kit save is a
follow-up; gated by cost concerns during early rollout. PR D of
docs/plans/2026-05-14-logo-design-workflow-v2.md.

Returns:
    ``{"style_id": "...", "trained_at": "...", "reference_image_count": N}``

Errors:
    * 404 — brand kit doesn't exist
    * 400 — kit has no logo URLs; training requires at least one
    * 502 — Recraft / Fal error during training



## OpenAPI

````yaml /openapi.json post /api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/brand-kits/{brand_kit_id}/train-recraft-style:
    post:
      tags:
        - Admin
      summary: Train Brand Kit Recraft Style
      description: |-
        Trigger Recraft custom-style training for a brand kit.

        Calls Recraft's ``create-style`` endpoint via Fal with the kit's
        reference logos, persists the returned ``style_id`` on the kit.
        Once trained, every Recraft generation for this brand will use
        the custom style — the strongest brand anchor available.

        Cost: ~$0.04 (one-shot). Subsequent generations are normal v3 cost.

        Operator-only today. Future auto-trigger on brand_kit save is a
        follow-up; gated by cost concerns during early rollout. PR D of
        docs/plans/2026-05-14-logo-design-workflow-v2.md.

        Returns:
            ``{"style_id": "...", "trained_at": "...", "reference_image_count": N}``

        Errors:
            * 404 — brand kit doesn't exist
            * 400 — kit has no logo URLs; training requires at least one
            * 502 — Recraft / Fal error during training
      operationId: >-
        train_brand_kit_recraft_style_api_v1_admin_brand_kits__brand_kit_id__train_recraft_style_post
      parameters:
        - name: brand_kit_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Brand Kit Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````