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

# Smart Brief

> Extract structured proposal data from raw unstructured text (meeting notes, emails, chats).

**Required scope:** `read`

Send raw text (e.g. from Telegram, WhatsApp exports, meeting notes) and get back:
- clientName, projectName, projectType, summary
- requirements (structured)
- gaps (missing info with suggestions)
- briefQualityScore (1-10)

Use this when the client sends messy/long text that needs structuring before creating a proposal.



## OpenAPI

````yaml /openapi/openapi-external.json post /ai/smart-brief
openapi: 3.1.0
info:
  title: Quikly.ai External API
  version: 1.0.0
  description: >-
    REST API for external integrations with Quikly.ai. Authenticate using an API
    key passed in the X-API-Key header. Use these endpoints from n8n, Zapier,
    custom scripts, or any HTTP client.
servers: []
security:
  - ApiKeyAuth: []
tags:
  - name: Proposals
    description: Create, read, update, and manage client proposals.
  - name: Profile
    description: Read and update the authenticated user's profile.
  - name: Templates
    description: Manage reusable proposal templates.
  - name: AI Services
    description: >-
      AI-powered analysis: rate recommendations, brief analysis,
      differentiators.
  - name: Public API
  - name: Usage
    description: Query API usage and quota information.
  - name: Webhooks
    description: Manage webhook subscriptions for real-time events.
  - name: Agent
    description: Interact with the AI agent for automated workflows.
  - name: Lead Sessions
    description: Track and manage lead capture sessions.
paths:
  /ai/smart-brief:
    post:
      tags:
        - AI Services
      summary: Smart Brief
      description: >-
        Extract structured proposal data from raw unstructured text (meeting
        notes, emails, chats).


        **Required scope:** `read`


        Send raw text (e.g. from Telegram, WhatsApp exports, meeting notes) and
        get back:

        - clientName, projectName, projectType, summary

        - requirements (structured)

        - gaps (missing info with suggestions)

        - briefQualityScore (1-10)


        Use this when the client sends messy/long text that needs structuring
        before creating a proposal.
      operationId: smart_brief_api_external_v1_ai_smart_brief_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmartBriefRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmartBriefResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    SmartBriefRequest:
      properties:
        rawText:
          type: string
          maxLength: 100000
          minLength: 10
          title: Rawtext
        language:
          type: string
          enum:
            - es
            - en
          title: Language
          default: en
        apiKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Apikey
        aiProvider:
          anyOf:
            - type: string
              enum:
                - gemini
                - openai
                - anthropic
            - type: 'null'
          title: Aiprovider
          default: gemini
        openaiApiKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Openaiapikey
        anthropicApiKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Anthropicapikey
      type: object
      required:
        - rawText
      title: SmartBriefRequest
      description: >-
        Schema for smart brief extraction from raw text (meeting notes, emails,
        chats).
    SmartBriefResponse:
      properties:
        extraction:
          $ref: '#/components/schemas/SmartBriefExtraction'
        success:
          type: boolean
          title: Success
          default: true
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - extraction
      title: SmartBriefResponse
      description: Response for smart brief extraction.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SmartBriefExtraction:
      properties:
        clientName:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientname
        projectName:
          anyOf:
            - type: string
            - type: 'null'
          title: Projectname
        projectType:
          anyOf:
            - type: string
            - type: 'null'
          title: Projecttype
        summary:
          type: string
          title: Summary
          default: ''
        requirements:
          items:
            $ref: '#/components/schemas/RequirementResponse'
          type: array
          title: Requirements
          default: []
        timelineHint:
          anyOf:
            - type: string
            - type: 'null'
          title: Timelinehint
        budgetHint:
          anyOf:
            - type: string
            - type: 'null'
          title: Budgethint
        clientLocation:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientlocation
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
        gaps:
          items:
            $ref: '#/components/schemas/SmartBriefGap'
          type: array
          title: Gaps
          default: []
        briefQualityScore:
          type: integer
          title: Briefqualityscore
          default: 5
      type: object
      title: SmartBriefExtraction
      description: Structured data extracted from raw text.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    RequirementResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
          default: ''
        rationale:
          type: string
          title: Rationale
          default: ''
        complexity:
          type: integer
          enum:
            - 1
            - 3
            - 5
            - 8
          title: Complexity
        priority:
          type: string
          enum:
            - high
            - medium
            - low
          title: Priority
        nameUi:
          anyOf:
            - type: string
            - type: 'null'
          title: Nameui
        descriptionUi:
          anyOf:
            - type: string
            - type: 'null'
          title: Descriptionui
      type: object
      required:
        - id
        - name
        - complexity
        - priority
      title: RequirementResponse
      description: Schema for a generated requirement.
    SmartBriefGap:
      properties:
        field:
          type: string
          title: Field
        label:
          type: string
          title: Label
        suggestion:
          type: string
          title: Suggestion
      type: object
      required:
        - field
        - label
        - suggestion
      title: SmartBriefGap
      description: A missing piece of information detected in the raw text.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key obtained from Quikly.ai Settings → API Keys.
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````