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

# Get Brand Context

> Retrieve the complete brand context package for your workspace: brand DNA,
workflow guidance, and top-performing content patterns. This is the primary
intelligence endpoint -- use it to inform content creation decisions.

The response combines three data sources resolved in parallel:

- **brandDna** -- Voice attributes, visual identity, content pillars, audience
  signals, guardrails, tone spectrum, and performance profile extracted from
  the workspace's brand profile.
- **guidance** -- Prompt directives, negative prompts, recommended creative moves,
  test ideas, winning/weak patterns, supporting metrics, and creative structure.
  Resolved from the active workflow guidance package, optionally scoped by campaign,
  workflow, platform, or objective.
- **topPatterns** -- The highest-performing content items and aggregated pattern
  analysis (winning patterns vs weak patterns with occurrence counts and average
  performance scores).

All parameters are optional. Omit them to get the workspace default context.
Provide `brandProfileId` to scope to a specific brand profile, `campaignId` or
`workflowId` to narrow guidance, and `platform`/`objective`/`modality` to get
platform-specific recommendations.


Retrieve the intelligence layer's understanding of your brand: voice attributes, visual identity, content pillars, audience signals, guardrails, and performance patterns.

The Creative Engine uses this context automatically when you call `POST /v1/content/create`. Use this endpoint when you want to inspect what the engine knows, feed brand data into your own pipelines, or build brand-aware agent prompts.


## OpenAPI

````yaml GET /v1/intelligence/brand-context
openapi: 3.1.0
info:
  title: Lamina Apps API
  version: 1.0.0
  description: >
    Professional creative content production for AI agents. Create brand-aligned
    images, videos, and designs from natural-language briefs using 30+
    specialized AI pipelines.


    Unlike raw model APIs (DALL-E, Flux, Kling), Lamina automatically applies
    brand guidelines, selects the optimal multi-model pipeline, scores output
    quality, and delivers permanent CDN-hosted URLs with composability metadata
    for chaining.


    ## Authentication

    All endpoints require an API key passed via one of these headers:

    - `x-api-key: lma_your_key` (recommended)

    - `Authorization: Bearer lma_your_key`


    API keys are workspace-scoped. Create them in **Settings -> API Keys**.


    ## Quick Start (One-Call Path)

    `POST /v1/create` with `{ "brief": "product photo of sneakers", "sync": true
    }` — returns completed output inline with CDN URL.


    ## Quick Start (Advanced)

    1. `GET /v1/apps` -- browse 30+ specialized creative apps

    2. `GET /v1/apps/{appId}` -- inspect input parameters

    3. `POST /v1/apps/{appId}/runs?webhook=<url>` -- run with your inputs

    4. Receive results via webhook, poll `GET /v1/runs/{runId}`, or stream via
    `GET /v1/runs/{runId}/stream`


    ## Rate Limits

    All `/v1/*` endpoints are currently limited to 100 requests per minute per
    IP.

    On `429`, read the `RateLimit-*` and `Retry-After` headers before retrying.


    ## How Inputs Work

    When running an app, provide inputs as a JSON object keyed by parameter
    **name** (from the app details response).


    - **text** parameters: send a string value (e.g. a prompt or description)

    - **options** parameters: send the **label** of the option (e.g.
    `"Caucasian"`), not an internal value

    - **url** parameters: send a publicly accessible URL to an image or video


    Every parameter is returned with `required: true`. Parameters with a
    `default` can safely be omitted -- the app will use the default value.


    ## Endpoint Groups

    | Group | Purpose |

    |-------|---------|

    | **Apps** | Discover and inspect available content creation apps |

    | **Runs** | Run workflows, track progress, and retrieve results |

    | **Assets** | Browse generated images, videos, and text from past
    executions |

    | **Intelligence** | Brand context, performance prediction, recommendations,
    and trends |

    | **Publishing** | Publish content to connected social channels |

    | **Content** | One-call agent operations: create, score, brief, batch |

    | **Account** | Credit balance and rate limit visibility |

    | **Templates** | Content creation templates and strategies |

    | **Webhooks** | Webhook signature verification |
servers:
  - url: https://app.uselamina.ai
    description: Production
security:
  - apiKey: []
tags:
  - name: Create
    description: Create content from briefs, run specific apps, and use templates
  - name: Discover
    description: Find and inspect available apps and their input schemas
  - name: Track
    description: Monitor execution progress, retrieve results, and browse generated assets
  - name: Intelligence
    description: >-
      Brand context, performance prediction, content recommendations, and trend
      signals
  - name: Distribute
    description: Publish content to social channels and transfer assets to CDN
  - name: Score
    description: Evaluate content quality, brand alignment, and engagement potential
  - name: Account
    description: Credit balance, rate limits, and health checks
  - name: Webhooks
    description: Webhook signature verification for secure callback handling
paths:
  /v1/intelligence/brand-context:
    get:
      tags:
        - Intelligence
      summary: Get Brand Context
      description: >
        Retrieve the complete brand context package for your workspace: brand
        DNA,

        workflow guidance, and top-performing content patterns. This is the
        primary

        intelligence endpoint -- use it to inform content creation decisions.


        The response combines three data sources resolved in parallel:


        - **brandDna** -- Voice attributes, visual identity, content pillars,
        audience
          signals, guardrails, tone spectrum, and performance profile extracted from
          the workspace's brand profile.
        - **guidance** -- Prompt directives, negative prompts, recommended
        creative moves,
          test ideas, winning/weak patterns, supporting metrics, and creative structure.
          Resolved from the active workflow guidance package, optionally scoped by campaign,
          workflow, platform, or objective.
        - **topPatterns** -- The highest-performing content items and aggregated
        pattern
          analysis (winning patterns vs weak patterns with occurrence counts and average
          performance scores).

        All parameters are optional. Omit them to get the workspace default
        context.

        Provide `brandProfileId` to scope to a specific brand profile,
        `campaignId` or

        `workflowId` to narrow guidance, and `platform`/`objective`/`modality`
        to get

        platform-specific recommendations.
      operationId: getBrandContext
      parameters:
        - name: brandProfileId
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: Scope to a specific brand profile. Omit for the workspace default.
        - name: campaignId
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: Narrow guidance to a specific campaign.
        - name: workflowId
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: Narrow guidance to a specific workflow/app.
        - name: platform
          in: query
          required: false
          schema:
            type: string
          description: >-
            Target platform (e.g. `instagram`, `tiktok`, `facebook`,
            `linkedin`).
          example: instagram
        - name: objective
          in: query
          required: false
          schema:
            type: string
          description: Content objective (e.g. `engagement`, `awareness`, `conversion`).
          example: engagement
        - name: modality
          in: query
          required: false
          schema:
            type: string
            enum:
              - image
              - video
              - text
              - audio
              - mixed
          description: Content modality to optimize guidance for.
          example: image
        - name: topK
          in: query
          required: false
          schema:
            type: integer
            default: 10
          description: >-
            Number of top-performing items to include in the `topPatterns`
            section.
      responses:
        '200':
          description: Brand context package with DNA, guidance, and top patterns
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BrandContext'
              example:
                data:
                  brandDna:
                    voiceAttributes:
                      - bold
                      - confident
                      - playful
                    visualIdentity:
                      - minimalist
                      - high-contrast
                      - warm tones
                    contentPillars:
                      - product innovation
                      - sustainability
                      - community
                    audienceSignals:
                      - Gen Z
                      - urban professionals
                      - eco-conscious
                    guardrails:
                      - no political content
                      - avoid controversial topics
                    toneSpectrum:
                      primary: energetic
                      secondary: witty
                      avoid:
                        - corporate
                        - formal
                    performanceProfile:
                      topPatterns:
                        - lifestyle imagery
                        - user-generated content style
                      weakPatterns:
                        - stock photo aesthetic
                        - text-heavy posts
                      avgEngagementTier: high
                  guidance:
                    promptDirectives:
                      - Lead with bold colors and dynamic composition
                      - Include human subjects when possible
                    negativePrompts:
                      - no text overlays
                      - avoid cluttered backgrounds
                    recommendedMoves:
                      - Test carousel format
                      - Add behind-the-scenes content
                    testIdeas:
                      - A/B test warm vs cool color palettes
                      - Try vertical video format
                    winningPatterns:
                      - lifestyle imagery
                      - product-in-context shots
                    weakPatterns:
                      - plain product shots on white background
                    supportingMetrics:
                      - lifestyle posts avg 3.2x engagement
                      - video posts outperform static by 40%
                    creativeStructure: null
                  topPatterns:
                    topItems:
                      - id: item-001
                        title: Summer Campaign Hero
                        modality: image
                        platform: instagram
                        performanceScore: 92.5
                        winningPatterns:
                          - lifestyle imagery
                          - warm tones
                          - human subjects
                    topPatterns:
                      - pattern: lifestyle imagery
                        occurrences: 15
                        avgPerformance: 88.3
                      - pattern: warm tones
                        occurrences: 12
                        avgPerformance: 85.7
                    weakPatterns:
                      - pattern: stock photo aesthetic
                        occurrences: 4
                        avgPerformance: 32.1
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    BrandContext:
      type: object
      description: >-
        Complete brand context package combining DNA, guidance, and top
        patterns.
      properties:
        brandDna:
          $ref: '#/components/schemas/BrandDna'
        guidance:
          $ref: '#/components/schemas/GuidancePackage'
        topPatterns:
          $ref: '#/components/schemas/TopPatterns'
    BrandDna:
      type: object
      nullable: true
      description: Brand identity extracted from the workspace's brand profile.
      properties:
        voiceAttributes:
          type: array
          items:
            type: string
          description: Brand voice characteristics (e.g. "bold", "confident", "playful")
        visualIdentity:
          type: array
          items:
            type: string
          description: >-
            Visual style traits (e.g. "minimalist", "high-contrast", "warm
            tones")
        contentPillars:
          type: array
          items:
            type: string
          description: Core content themes the brand focuses on
        audienceSignals:
          type: array
          items:
            type: string
          description: Target audience characteristics
        guardrails:
          type: array
          items:
            type: string
          description: Content restrictions and things to avoid
        toneSpectrum:
          $ref: '#/components/schemas/ToneSpectrum'
        performanceProfile:
          $ref: '#/components/schemas/PerformanceProfile'
    GuidancePackage:
      type: object
      nullable: true
      description: >-
        Structured guidance for content creation, resolved from the active
        workflow guidance package.
      properties:
        promptDirectives:
          type: array
          items:
            type: string
          description: Positive instructions to include in generation prompts
        negativePrompts:
          type: array
          items:
            type: string
          description: Things to avoid in generation
        recommendedMoves:
          type: array
          items:
            type: string
          description: Suggested creative actions or content moves
        testIdeas:
          type: array
          items:
            type: string
          description: Suggested A/B test variations
        winningPatterns:
          type: array
          items:
            type: string
          description: Patterns known to perform well
        weakPatterns:
          type: array
          items:
            type: string
          description: Patterns known to underperform
        supportingMetrics:
          type: array
          items:
            type: string
          description: Human-readable metric summaries supporting the guidance
        creativeStructure:
          nullable: true
          description: Optional structured creative direction (format varies)
    TopPatterns:
      type: object
      nullable: true
      description: Top-performing content items and aggregated pattern analysis.
      properties:
        topItems:
          type: array
          items:
            $ref: '#/components/schemas/TopPatternItem'
          description: Highest-performing individual content items
        topPatterns:
          type: array
          items:
            $ref: '#/components/schemas/PatternSummary'
          description: Aggregated winning patterns with occurrence counts
        weakPatterns:
          type: array
          items:
            $ref: '#/components/schemas/PatternSummary'
          description: Aggregated weak patterns with occurrence counts
    ToneSpectrum:
      type: object
      nullable: true
      description: Brand tone positioning
      properties:
        primary:
          type: string
          nullable: true
          description: Primary tone attribute
        secondary:
          type: string
          nullable: true
          description: Secondary tone attribute
        avoid:
          type: array
          items:
            type: string
          description: Tones to avoid
    PerformanceProfile:
      type: object
      nullable: true
      description: Performance pattern summary from historical content data
      properties:
        topPatterns:
          type: array
          items:
            type: string
          description: Content patterns that perform well
        weakPatterns:
          type: array
          items:
            type: string
          description: Content patterns that underperform
        avgEngagementTier:
          type: string
          nullable: true
          description: Average engagement level (e.g. "high", "medium", "low")
    TopPatternItem:
      type: object
      description: A high-performing content item with extracted patterns.
      properties:
        id:
          type: string
          description: Content item identifier
        title:
          type: string
          nullable: true
          description: Content item title
        modality:
          type: string
          nullable: true
          description: Content modality (image, video, text)
        platform:
          type: string
          nullable: true
          description: Platform where content was published
        performanceScore:
          type: number
          description: Numeric performance score (higher is better)
        winningPatterns:
          type: array
          items:
            type: string
          description: Patterns identified in this high-performing item
    PatternSummary:
      type: object
      description: Aggregated pattern with frequency and performance data.
      properties:
        pattern:
          type: string
          description: Pattern description
        occurrences:
          type: integer
          description: How many content items exhibit this pattern
        avgPerformance:
          type: number
          description: Average performance score for items with this pattern
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
          example:
            error: Invalid API key
    TooManyRequests:
      description: >-
        Rate limit exceeded. All `/v1/*` endpoints are currently limited to 100
        requests per minute per IP.
      headers:
        RateLimit-Policy:
          description: Active rate limit policy.
          schema:
            type: string
            example: 100;w=60
        RateLimit-Limit:
          description: Max requests allowed in the current window.
          schema:
            type: integer
            example: 100
        RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
            example: 0
        RateLimit-Reset:
          description: Seconds until the current window resets.
          schema:
            type: integer
            example: 60
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            example: 60
      content:
        text/plain:
          schema:
            type: string
          example: Too many requests from this IP, please try again in a minute
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Workspace API key. Prefix: `lma_`. Example: `lma_abc123...`'

````