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

# Get conversation consumption

> Get the same credit breakdown as the conversation consumption view for a conversation
the caller can read. Returns stable billed credits for terminal agent messages, including
superseded message versions and accessible recursively spawned run-agent conversations.
In-progress messages are excluded until they reach a terminal state.

Details use each billed message's newest complete stored attribution. They are null when
no messages have positive billed credits or any billed message lacks complete attribution.
Agent work and tool attributions partition the bill. Models and agents are alternative
groupings of that bill, not additional charges. This endpoint does not return token counts
or a cached-versus-uncached input breakdown.




## OpenAPI

````yaml https://raw.githubusercontent.com/dust-tt/dust/refs/heads/main/front-api/public/swagger.json get /api/v1/w/{wId}/assistant/conversations/{cId}/consumption
openapi: 3.0.0
info:
  title: DUST API Documentation
  version: 1.0.2
  description: The OpenAPI specification for the Dust.tt API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://dust.tt
    description: Dust.tt API (us-central1)
  - url: https://eu.dust.tt
    description: Dust.tt API (europe-west1)
security: []
tags:
  - name: Users
    description: User management
  - name: Agents
    description: Agent configurations
  - name: Analytics
    description: Workspace analytics
  - name: Apps
    description: Dust apps
  - name: Conversations
    description: Conversations
  - name: Datasources
    description: Data sources
  - name: DatasourceViews
    description: Data source views
  - name: Feedbacks
    description: Message feedbacks
  - name: MCP
    description: MCP servers
  - name: Mentions
    description: Mentions
  - name: Search
    description: Search
  - name: Skills
    description: Skills
  - name: Spaces
    description: Spaces
  - name: Tools
    description: Tools
  - name: Triggers
    description: Triggers
  - name: Workspace
    description: Workspace
  - name: Private Agents
    description: Private API - Agent configurations
  - name: Private Authentication
    description: Private API - Authentication (WorkOS)
  - name: Private Conversations
    description: Private API - Conversations
  - name: Private Events
    description: Private API - SSE event streams
  - name: Private Extension
    description: Private API - Extension configuration
  - name: Private Files
    description: Private API - File uploads
  - name: Private Mentions
    description: Private API - Mention suggestions
  - name: Private Messages
    description: Private API - Messages
  - name: Private Spaces
    description: Private API - Spaces and data source views
  - name: Private User
    description: Private API - User
  - name: Private Workspace
    description: Private API - Workspace settings
paths:
  /api/v1/w/{wId}/assistant/conversations/{cId}/consumption:
    get:
      tags:
        - Conversations
      summary: Get conversation consumption
      description: >
        Get the same credit breakdown as the conversation consumption view for a
        conversation

        the caller can read. Returns stable billed credits for terminal agent
        messages, including

        superseded message versions and accessible recursively spawned run-agent
        conversations.

        In-progress messages are excluded until they reach a terminal state.


        Details use each billed message's newest complete stored attribution.
        They are null when

        no messages have positive billed credits or any billed message lacks
        complete attribution.

        Agent work and tool attributions partition the bill. Models and agents
        are alternative

        groupings of that bill, not additional charges. This endpoint does not
        return token counts

        or a cached-versus-uncached input breakdown.
      parameters:
        - in: path
          name: wId
          required: true
          description: ID of the workspace
          schema:
            type: string
        - in: path
          name: cId
          required: true
          description: ID of the conversation
          schema:
            type: string
      responses:
        '200':
          description: Conversation consumption retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationConsumption'
        '400':
          description: Invalid request parameters.
        '401':
          description: Invalid or missing authentication credentials.
        '403':
          description: The workspace plan does not allow API access.
        '404':
          description: >-
            Workspace or conversation not found, deleted, or not accessible to
            the caller.
        '500':
          description: Internal server error.
      security:
        - BearerAuth: []
components:
  schemas:
    ConversationConsumption:
      type: object
      required:
        - billedCredits
        - details
      properties:
        billedCredits:
          type: number
          description: >-
            Stable billed Dust credits for terminal agent messages in the
            conversation and its accessible run-agent descendants, including
            superseded message versions.
        details:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ConversationConsumptionDetails'
          description: >-
            Null when no messages have positive billed credits or any billed
            message lacks complete attribution.
    ConversationConsumptionDetails:
      type: object
      description: >-
        Attribution reconciled to the bill through model input rows. Agent work
        plus tool attributed credits partition the bill; models and agents are
        alternative groupings, not additional charges.
      required:
        - agentWorkCredits
        - tools
        - models
        - agents
      properties:
        agentWorkCredits:
          type: number
          description: Credits attributed to agent work rather than visible tools.
        tools:
          type: array
          items:
            $ref: '#/components/schemas/ConversationConsumptionToolDetails'
        models:
          type: array
          items:
            $ref: '#/components/schemas/ConversationConsumptionModelDetails'
        agents:
          type: array
          items:
            $ref: '#/components/schemas/ConversationConsumptionAgentDetails'
    ConversationConsumptionToolDetails:
      type: object
      required:
        - label
        - internalMCPServerName
        - toolName
        - callCount
        - attributedCredits
        - directCredits
        - pending
      properties:
        label:
          type: string
          description: Display label of the tool.
        internalMCPServerName:
          type: string
          nullable: true
          description: Internal MCP server name, or null for an external server.
        toolName:
          type: string
        callCount:
          type: integer
          description: Number of attributed calls grouped under this tool.
        attributedCredits:
          type: number
          description: >-
            Share of billed credits attributed to the tool, including model work
            and direct charges.
        directCredits:
          type: number
          description: >-
            Direct tool charges already included in attributedCredits, not an
            additional charge.
        pending:
          type: boolean
          description: Whether any grouped tool attribution is pending.
    ConversationConsumptionModelDetails:
      type: object
      required:
        - providerId
        - modelId
        - displayName
        - attributedCredits
      properties:
        providerId:
          type: string
        modelId:
          type: string
          description: Provider model identifier, not an internal database identifier.
        displayName:
          type: string
        attributedCredits:
          type: number
          description: >-
            Reconciled credits grouped by model, including tool attribution
            linked to its runs. Overlaps agent work and tool totals.
    ConversationConsumptionAgentDetails:
      type: object
      required:
        - agentId
        - name
        - pictureUrl
        - billedCredits
        - agentWorkCredits
        - tools
        - models
      properties:
        agentId:
          type: string
          description: String identifier of the agent.
        name:
          type: string
        pictureUrl:
          type: string
          nullable: true
        billedCredits:
          type: number
          description: >-
            Stable billed credits grouped under this agent. Hidden helpers are
            folded into their parent agent.
        agentWorkCredits:
          type: number
        tools:
          type: array
          items:
            $ref: '#/components/schemas/ConversationConsumptionToolDetails'
        models:
          type: array
          items:
            $ref: '#/components/schemas/ConversationConsumptionModelDetails'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Your DUST API key is a Bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.