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

# Análise Source Influence

> Enfileira uma análise da correspondência entre uma resposta de IA concluída e as fontes citadas.



## OpenAPI

````yaml post /v1/source-influence
openapi: 3.1.0
info:
  title: querying.ai
  description: >-
    One API for every AI answer engine. Every task is asynchronous: submit, then
    collect the result via webhook or polling.
  version: 1.0.0
servers:
  - url: https://api.querying.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/source-influence:
    post:
      tags:
        - Research
      summary: Analyze answer claims and cited sources
      description: >-
        Analyzes an answer against its cited pages and returns exactly {answer,
        sources[], links[], insights[]}: the paragraphs of each source that the
        result includes (or a short per-source error when the page could not be
        read), the UTF-16 answer ranges each paragraph corresponds to with an
        explanation, and short summaries built from those links. Post-hoc
        correspondence, not causal attribution. The retired analysis.version=1
        opt-in is rejected with 400 because insights are automatic. Tasks stored
        with the older v2 result stay readable as-is. Size is not a failure
        mode: anything the request contract accepts (an answer up to 200,000
        characters with up to 100 citations) is analyzed, with long answers,
        large source sets and very long pages handled by splitting the work.
        Depth follows the answer rather than the page, so a large or repetitive
        page yields its strongest corresponding passages instead of every
        occurrence, and markup-only pages such as sitemaps or link indexes
        contribute no links.
      operationId: createSourceInfluence
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceInfluenceRequest'
            examples:
              answerAndCitations:
                summary: Answer and citations
                value:
                  answer: >-
                    Teams plan starts at $19.95 per month for up to 10 users.
                    The Business plan adds audit logs.
                  prompt: Which plan fits a small team?
                  citations:
                    - url: https://example.com/pricing
                    - url: https://review.example.com/note
              taskId:
                summary: A completed answer task
                value:
                  taskId: 7c1f0b2e-5d0a-4a8e-9f3b-2c1d6e7a8b90
                  brand: Acme
                  competitors:
                    - Beta
      responses:
        '200':
          description: >-
            Queued; poll /v1/async/task/{id}. Its response follows
            SourceInfluenceResult.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncResponse'
        '400':
          description: >-
            Request rejected. Supplying the retired analysis opt-in is a 400
            because insights are automatic.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Request rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            taskId does not name a task you can read (unknown, another
            account's, or past retention).
        '409':
          description: Request rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Request rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            Request rejected, including an input that exceeds a processing
            limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Request rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Request rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SourceInfluenceRequest:
      type: object
      properties:
        taskId:
          type: string
          maxLength: 128
          description: >-
            Instead of answer and citations: the id of one of your COMPLETED
            answer tasks that is still readable through GET /v1/async/task/{id}.
            Its answer Markdown (text when there is none) becomes answer, and
            its cited URLs become citations in the engine's order (first 100, at
            most 10 discussion threads). Its prompt, country and engine are used
            unless you send them. Sending taskId together with answer or
            citations is a 400; an unknown or expired id is a 404.
        answer:
          type: string
          minLength: 1
          maxLength: 200000
          description: >-
            Required unless taskId is sent. The AI answer to analyze, as raw
            markdown (keep link fragments intact). 1-200,000 characters at
            submission; the analysis itself has a smaller per-answer processing
            budget, and an answer above it fails explicitly instead of being
            truncated.
        citations:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/SourceInfluenceCitation'
          description: >-
            Required unless taskId is sent. 1-100 sources, at most 10
            discussion-thread URLs. Total HTTP body <=1 MiB.
        prompt:
          type: string
          maxLength: 200000
          description: >-
            Compatibility context for existing integrations; not returned in the
            result.
        country:
          type: string
        engine:
          type: string
          maxLength: 64
          description: >-
            Compatibility context for existing integrations; not returned in the
            result.
        brand:
          type: string
          maxLength: 200
          description: >-
            Compatibility context for existing integrations; not returned in the
            result.
        competitors:
          type: array
          maxItems: 25
          items:
            type: string
            maxLength: 200
          description: >-
            Compatibility context for existing integrations (up to 25 names);
            not returned in the result.
        idempotencyKey:
          type: string
        priority:
          type: integer
        webhook:
          type: object
          properties:
            url:
              type: string
              format: uri
          required:
            - url
      anyOf:
        - required:
            - answer
            - citations
        - required:
            - taskId
    AsyncResponse:
      type: object
      required:
        - success
        - task
        - credits
      properties:
        success:
          type: boolean
          const: true
        task:
          $ref: '#/components/schemas/TaskMeta'
        credits:
          $ref: '#/components/schemas/Credits'
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          $ref: '#/components/schemas/ErrorDetail'
    SourceInfluenceCitation:
      type: object
      required:
        - url
      additionalProperties: false
      properties:
        url:
          type: string
          format: uri
          maxLength: 2048
        body:
          type: string
          maxLength: 300000
          description: >-
            Exact source snapshot (markdown or plain text). A supplied body is
            analyzed as-is and never replaced with a current fetch. Strongly
            recommended: a cited page we cannot read is reported on that source
            with error and empty paragraphs. Max 300,000 characters per
            citation; the whole request body is at most 1 MiB.
        title:
          type: string
          description: Optional source title; kept for existing integrations.
        kind:
          type: string
          enum:
            - inline
            - panel
          description: >-
            How the answer cites this source: inline (linked from the answer
            text) or panel (listed as a source only). Auto-detected from the
            answer’s links when omitted.
    TaskMeta:
      type: object
      required:
        - id
        - taskType
        - status
        - priority
        - createdAt
      properties:
        id:
          type: string
          format: uuid
        taskType:
          $ref: '#/components/schemas/TaskType'
        status:
          $ref: '#/components/schemas/TaskStatus'
        priority:
          type: integer
        createdAt:
          type: string
          format: date-time
        idempotencyKey:
          type: string
          description: >-
            Echoed back verbatim. **Omitted** — not null — when the caller
            supplied none.
    Credits:
      type: object
      description: >-
        Submit and polling envelopes preserve zero values. With billing enabled,
        account settlement uses the engine pricing policy; webhooks report the
        persisted charge. SOURCE_INFLUENCE is metered by actual usage.
      properties:
        creditsToCharge:
          type: integer
        creditsCharged:
          type:
            - integer
            - 'null'
    ErrorDetail:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable, safe to branch on.
          enum:
            - MISSING_API_KEY
            - VALIDATION_ERROR
            - REGION_UNAVAILABLE
            - RESOURCE_ALREADY_EXISTS
            - PAYLOAD_TOO_LARGE
            - RESOURCE_NOT_FOUND
            - ENQUEUE_ERROR
        message:
          type: string
          description: For humans. May change.
        details:
          description: >-
            Field-level context. An array of `{field, message}` on
            `VALIDATION_ERROR`; an object on `RESOURCE_NOT_FOUND` (`{id}`) and
            `REGION_UNAVAILABLE`. Omitted when there is nothing to add.
          oneOf:
            - type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
            - type: object
              additionalProperties: true
        timestamp:
          type: string
          format: date-time
    TaskType:
      type: string
      description: >-
        The engine to query. `NAVER` is a deprecated alias for `NAVER_AI_BRIEF`.
        GOOGLE_AIO and GOOGLE_AIMODE are the unified names for GOOGLE and
        AIMODE; both spellings are accepted and responses echo the canonical
        GOOGLE / AIMODE. `GOOGLE_SERP` returns the Google results page without
        the AI Overview; `payload.page` selects pages 1-10. `NAVER_SERP` returns
        Naver's web results, 15 per page (`payload.page` 1-10), and with
        `payload.action` `page` reads one naver.com page by `payload.url`.
        `REDDIT` searches Reddit posts by `query` (optionally within one
        `subreddit`), reads one post with its first page of comments by `url`,
        or lists posts with `action` `feed` or `user_posts`. `BING` and
        `BING_COPILOT_SEARCH` are accepted as earlier spellings of
        `BING_SEARCH`, and `COPILOT` as the earlier spelling of `BING_COPILOT`;
        responses echo the new names. SOURCE_INFLUENCE and PROMPT_RESEARCH tasks
        are created through their own endpoints (POST /v1/source-influence, POST
        /v1/prompt-research); they appear here because their tasks report them.
      enum:
        - CHATGPT
        - PERPLEXITY
        - GEMINI
        - AIMODE
        - GOOGLE_AIMODE
        - GOOGLE
        - GOOGLE_AIO
        - GOOGLE_SERP
        - NAVER_AI_BRIEF
        - NAVER_AI_TAB
        - NAVER
        - NAVER_SERP
        - BING_SEARCH
        - BING
        - BING_COPILOT
        - COPILOT
        - REDDIT
        - SOURCE_INFLUENCE
        - CITATION_ATTRIBUTION
        - PROMPT_RESEARCH
    TaskStatus:
      type: string
      description: >-
        `PROCESSING` means a worker holds the task. `COMPLETED` and `FAILED` are
        terminal.
      enum:
        - QUEUED
        - PROCESSING
        - COMPLETED
        - FAILED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key, sent as `Authorization: Bearer <key>`.'

````