NUDG3 Chat API

The Chat API from NUDG3 — 6 operation(s) for chat.

GitHub OpenAPI

Operations 6

POST /chat/message Send Chat Message #
GET /chat/message/stream Stream Chat Message #
GET /chat/{workspace_id}/quota Get Chat Quota #
GET /chat/{workspace_id}/conversations List Conversations #
GET /chat/{workspace_id}/conversations/{thread_id}/messages Get Conversation Messages #
DELETE /chat/{workspace_id}/conversations/{thread_id} Delete Conversation #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nudg3-ai:nudg3-ai-chat-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nudg3-ai-chat-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nudg3 Chat API
  description: '# Nudg3 Brand Intelligence API


    The Nudg3 API provides programmatic access to brand visibility analytics across AI providers.


    ## Public API v1


    The Public API (`/api/v1/`) is designed for third-party integrations and provides:


    ### Analytics Endpoints (Tier 1 - Basic)

    - Brand visibility scores and trends

    - Sentiment analysis across AI responses

    - Source citation tracking

    - Prompt performance metrics

    - Google AI Overview (AIO) coverage


    ### Export Endpoints (Tier 2 - Premium)

    - Full response data exports (CSV/TSV)

    - Source citations bulk download

    - Dashboard time-series data

    - Prompt-mention pair exports


    ## Authentication


    ### API Key (Public API v1)

    ```bash

    curl -H "Authorization: Bearer nudg3_live_ak_xxx..." \

    https://api.nudg3.com/api/v1/dashboard

    ```


    ### JWT (Dashboard API)

    ```bash

    curl -H "Authorization: Bearer eyJ..." \

    https://api.nudg3.com/analytics/dashboard

    ```


    ## Rate Limits


    | Tier | Per Minute | Per Hour | Monthly Quota |

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

    | Basic | 60 | 600 | 5,000 |

    | Premium | 300 | 3,000 | 50,000 |


    ## Response Format


    All responses follow a standard envelope:

    ```json

    {

    "success": true,

    "data": { ... },

    "message": "Success"

    }

    ```


    ## Support


    - Documentation: https://docs.nudg3.com

    - API Status: https://status.nudg3.com

    - Support: support@nudg3.com'
  version: 1.1.0
  termsOfService: https://nudg3.com/terms
  contact:
    name: Nudg3 API Support
    url: https://nudg3.com/support
    email: support@nudg3.com
  license:
    name: Proprietary
    url: https://nudg3.com/license
servers:
- url: https://api.nudg3.com
  description: Production API
- url: https://api-staging.nudg3.com
  description: Staging API (for testing)
- url: http://localhost:8000
  description: Local Development
tags:
- name: Chat
paths:
  /chat/message:
    post:
      tags:
      - Chat
      summary: Send Chat Message
      description: 'Send a message to the workspace chat agent.


        The agent has access to analytics tools scoped to the authenticated user''s

        workspace. It can answer questions about:

        - Brand visibility and sentiment

        - Competitor analysis

        - Source citations

        - Prompt performance

        - Provider comparisons


        **Security Model:**

        - Requires valid JWT token

        - Workspace access is validated against user permissions

        - Agent receives workspace_id from session (never from user input)


        **Request Body:**

        - workspace_id: UUID of the workspace to query

        - message: User''s question (1-2000 characters)

        - conversation_id: Optional ID for multi-turn conversations

        - conversation_history: Optional list of previous messages for HITL context


        **Response:**

        - message: Assistant''s response

        - conversation_id: ID for continuing the conversation

        - tool_calls: List of tools called to generate the response'
      operationId: send_chat_message_chat_message_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatMessageRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /chat/message/stream:
    get:
      tags:
      - Chat
      summary: Stream Chat Message
      description: 'Stream chat response via Server-Sent Events (SSE).


        This endpoint provides real-time streaming of AI agent responses,

        enabling progressive rendering in the frontend.


        **Security:**

        - Firebase token validated from query parameter

        - Workspace access verified before streaming

        - Agent JWT created for backend API calls


        **SSE Events:**

        - `connecting` - Initial connection established

        - `state_update` - Full state snapshot (messages, tool_calls_info)

        - `tool_update` - Individual tool execution update

        - `content_update` - AI response content update

        - `blocked` - Content blocked by safety filters (reason, message, safety_ratings, request_id)

        - `warning` - Non-fatal warning e.g. token budget exceeded (message, request_id)

        - `error` - Error occurred (message, error_type, request_id)

        - `end` - Stream completed successfully


        **Note:** Token is passed as query parameter because the EventSource

        API does not support custom headers.


        **Example:**

        ```javascript

        const eventSource = new EventSource(

        `/chat/message/stream?workspace_id=${id}&message=${msg}&token=${token}`

        );

        eventSource.addEventListener(''content_update'', (e) => {

        const data = JSON.parse(e.data);

        updateContent(data.content);

        });

        ```'
      operationId: stream_chat_message_chat_message_stream_get
      parameters:
      - name: workspace_id
        in: query
        required: true
        schema:
          type: string
          format: uuid
          description: Workspace ID to query
          title: Workspace Id
        description: Workspace ID to query
      - name: message
        in: query
        required: true
        schema:
          type: string
          minLength: 1
          maxLength: 2000
          description: User's message
          title: Message
        description: User's message
      - name: conversation_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Conversation ID for multi-turn
          title: Conversation Id
        description: Conversation ID for multi-turn
      - name: model
        in: query
        required: false
        schema:
          type: string
          description: AI model to use
          default: claude-sonnet-4-5-20250929
          title: Model
        description: AI model to use
      - name: enable_search
        in: query
        required: false
        schema:
          type: boolean
          description: Enable web search
          default: false
          title: Enable Search
        description: Enable web search
      - name: agent_type
        in: query
        required: false
        schema:
          type: string
          description: Agent graph to use
          default: ask_nudg3
          title: Agent Type
        description: Agent graph to use
      - name: token
        in: query
        required: true
        schema:
          type: string
          description: Firebase ID token for authentication
          title: Token
        description: Firebase ID token for authentication
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /chat/{workspace_id}/quota:
    get:
      tags:
      - Chat
      summary: Get Chat Quota
      description: 'Get current chat quota status for a workspace.


        Returns allocated, used, remaining counts and next reset time.'
      operationId: get_chat_quota_chat__workspace_id__quota_get
      security:
      - HTTPBearer: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /chat/{workspace_id}/conversations:
    get:
      tags:
      - Chat
      summary: List Conversations
      description: List past conversations for the current user in a workspace.
      operationId: list_conversations_chat__workspace_id__conversations_get
      security:
      - HTTPBearer: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 20
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
          title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /chat/{workspace_id}/conversations/{thread_id}/messages:
    get:
      tags:
      - Chat
      summary: Get Conversation Messages
      description: Get full message history for a conversation thread.
      operationId: get_conversation_messages_chat__workspace_id__conversations__thread_id__messages_get
      security:
      - HTTPBearer: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          title: Thread Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationMessagesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /chat/{workspace_id}/conversations/{thread_id}:
    delete:
      tags:
      - Chat
      summary: Delete Conversation
      description: Delete a conversation thread.
      operationId: delete_conversation_chat__workspace_id__conversations__thread_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          title: Thread Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ConversationListResponse:
      properties:
        conversations:
          items:
            $ref: '#/components/schemas/ConversationListItem'
          type: array
          title: Conversations
        count:
          type: integer
          title: Count
          description: Number of conversations returned
      type: object
      required:
      - count
      title: ConversationListResponse
      description: Response for listing conversations.
    ConversationMessagesResponse:
      properties:
        thread_id:
          type: string
          title: Thread Id
          description: LangGraph thread ID
        messages:
          items:
            $ref: '#/components/schemas/ConversationMessage'
          type: array
          title: Messages
        status:
          type: string
          title: Status
          description: 'Thread status: idle, busy, interrupted, error'
          default: idle
      type: object
      required:
      - thread_id
      title: ConversationMessagesResponse
      description: Response for getting conversation messages.
    ChatMessageRequest:
      properties:
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
          description: The workspace ID to query data from
        message:
          type: string
          maxLength: 2000
          minLength: 1
          title: Message
          description: The user's message/question
        conversation_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Conversation Id
          description: Optional conversation ID for multi-turn conversations
        conversation_history:
          anyOf:
          - items:
              $ref: '#/components/schemas/ChatMessage'
            type: array
          - type: 'null'
          title: Conversation History
          description: Previous messages in the conversation (user and assistant turns) for HITL context
        model:
          anyOf:
          - type: string
            enum:
            - claude-haiku-4-5
            - gemini-2.5-flash
            - grok-4-fast
          - type: 'null'
          title: Model
          description: 'AI model to use: claude-haiku-4-5 (default), gemini-2.5-flash, or grok-4-fast'
          default: claude-haiku-4-5
        enable_search:
          type: boolean
          title: Enable Search
          description: Enable web search grounding via Brave Search. When enabled, the agent can search the web for current information.
          default: false
      type: object
      required:
      - workspace_id
      - message
      title: ChatMessageRequest
      description: Request schema for sending a chat message.
      examples:
      - message: What's our brand visibility compared to competitors?
        model: claude-haiku-4-5
        workspace_id: 550e8400-e29b-41d4-a716-446655440000
    ConversationMessage:
      properties:
        role:
          type: string
          title: Role
          description: 'Message role: user or assistant'
        content:
          type: string
          title: Content
          description: Message content
      type: object
      required:
      - role
      - content
      title: ConversationMessage
      description: A single message from conversation history.
    ChatMessage:
      properties:
        role:
          type: string
          enum:
          - user
          - assistant
          title: Role
          description: Role of the message sender
        content:
          type: string
          title: Content
          description: Message content
      type: object
      required:
      - role
      - content
      title: ChatMessage
      description: A single message in conversation history.
    SuccessResponse:
      properties:
        status:
          type: string
          title: Status
          description: Response status
          default: success
        message:
          type: string
          title: Message
        data:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Data
      type: object
      required:
      - message
      title: SuccessResponse
      description: Generic success response.
    ConversationListItem:
      properties:
        thread_id:
          type: string
          title: Thread Id
          description: LangGraph thread ID
        title:
          type: string
          title: Title
          description: Conversation title (first message truncated)
        agent_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Type
          description: Agent graph used
        created_at:
          type: string
          title: Created At
          description: ISO 8601 creation timestamp
        updated_at:
          type: string
          title: Updated At
          description: ISO 8601 last update timestamp
      type: object
      required:
      - thread_id
      - title
      - created_at
      - updated_at
      title: ConversationListItem
      description: A conversation summary for list display.
    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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '

        API Key authentication for Public API v1 endpoints.


        **Format:** `nudg3_live_ak_xxx...` or `nudg3_test_ak_xxx...`


        **Usage:**

        ```

        Authorization: Bearer nudg3_live_ak_your_key_here

        ```


        Or use the header:

        ```

        X-API-Key: nudg3_live_ak_your_key_here

        ```


        **Obtain API Keys:**

        Generate API keys from your Nudg3 dashboard under Settings > API Keys.


        **Tiers:**

        - **Basic:** `read:analytics` scope - Analytics endpoints only

        - **Premium:** `read:analytics` + `export:data` scopes - Analytics + Exports

        '
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '

        JWT authentication for internal dashboard endpoints.


        Obtain tokens via `/auth/login` endpoint.

        '
externalDocs:
  description: Nudg3 API Documentation
  url: https://docs.nudg3.com/api