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

# List all stream usages

> List usage data for individual streams. Each stream represents a single
execution within a task. Use this endpoint for detailed per-stream analysis
including cost, tool calls, and execution metrics.
For aggregated task-level data, use GET /api/v1/usage/tasks instead.

Access control:
- Solo users (not in a team): Can view their own streams only
- Team admins: Can view all team members' streams (with email field and optional email filter)
- Team members/viewers: No access (returns 403)




## OpenAPI

````yaml /openapi/neo.public.openapi.json get /api/v1/usage/streams
openapi: 3.1.0
info:
  contact:
    name: ProjectDiscovery
    url: https://neo.projectdiscovery.io
  description: Neo API Server - Security agent orchestration platform
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  title: Neo API
  version: 1.0.0
servers:
  - description: Production
    url: https://neo.api.projectdiscovery.io
  - description: Development
    url: https://neo.api.dev.projectdiscovery.io
  - description: Local development
    url: http://localhost:8080
security: []
tags:
  - description: Task execution and management
    name: Tasks
  - description: Agent listing and management
    name: Agents
  - description: Public agent directory
    name: Agent Directory
  - description: User file storage management
    name: Files
  - description: User working memory management
    name: Memory
  - description: Scheduled and recurring task management
    name: Schedules
  - description: Knowledge base and semantic search
    name: Knowledge
  - description: Encrypted user credentials and API keys
    name: Secrets
  - description: Neo API key management for programmatic access
    name: API Keys
  - description: User profile and account information
    name: User
  - description: Task and LLM usage tracking
    name: Usage
  - description: Bring Your Own Key provider management
    name: BYOK
  - description: Connect personal AI provider accounts and select them as a model source
    name: AI Connections
  - description: Model discovery and capabilities
    name: Models
  - description: Third-party integrations
    name: Integrations
  - description: Skill knowledge documents for agent prompts
    name: Skills
  - description: User-authored tools and toolkit management
    name: Dynamic Tools
  - description: Team management and member invitations
    name: Teams
  - description: Prompt library management and discovery
    name: Prompts
  - description: Slack bot integration for workspace installation and OAuth
    name: Slack
  - description: GitHub integration for PR reviews and repository management
    name: GitHub
  - description: Vulnerability issue tracking and management
    name: Issues
  - description: Subscription billing and plans
    name: Billing
  - description: Project management and member assignments
    name: Projects
  - description: SSH key pair generation and management for remote server access
    name: SSH Keys
  - description: Codebase structural analysis and mapping
    name: Codemaps
  - description: AI-generated codebase documentation and security analysis
    name: CodeWiki
  - description: Captured HTTP traffic query and replay
    name: Network Events
  - description: User and team API activity metadata
    name: Audit Logs
  - description: Vulnerability triage for HackerOne, GitHub, and Security Inbox
    name: Triage
paths:
  /api/v1/usage/streams:
    get:
      tags:
        - Usage
      summary: List all stream usages
      description: >
        List usage data for individual streams. Each stream represents a single

        execution within a task. Use this endpoint for detailed per-stream
        analysis

        including cost, tool calls, and execution metrics.

        For aggregated task-level data, use GET /api/v1/usage/tasks instead.


        Access control:

        - Solo users (not in a team): Can view their own streams only

        - Team admins: Can view all team members' streams (with email field and
        optional email filter)

        - Team members/viewers: No access (returns 403)
      operationId: get-v1-usage-streams
      parameters:
        - description: Filter by task ID
          in: query
          name: task_id
          required: false
          schema:
            type: string
        - description: Filter by specific stream ID
          in: query
          name: stream_id
          required: false
          schema:
            format: uuid
            type: string
        - description: Filter by status
          in: query
          name: status
          required: false
          schema:
            enum:
              - completed
              - error
              - failed
              - aborted
              - blocked
            type: string
        - description: Filter by model
          in: query
          name: model
          required: false
          schema:
            type: string
        - description: Filter from datetime (ISO 8601)
          in: query
          name: from
          required: false
          schema:
            format: date-time
            type: string
        - description: Filter to datetime (ISO 8601)
          in: query
          name: to
          required: false
          schema:
            format: date-time
            type: string
        - description: Number of results (1-200, default 50)
          in: query
          name: limit
          required: false
          schema:
            default: 50
            maximum: 200
            minimum: 1
            type: integer
        - description: Pagination offset (default 0)
          in: query
          name: offset
          required: false
          schema:
            default: 0
            minimum: 0
            type: integer
        - description: Sort field
          in: query
          name: sort
          required: false
          schema:
            default: created_at
            enum:
              - created_at
              - cost
            type: string
        - description: Filter by team member email (exact match, only for team admins)
          in: query
          name: email
          required: false
          schema:
            type: string
        - deprecated: true
          description: Deprecated; use usage_source. Filters direct BYOK streams only.
          in: query
          name: is_byok
          required: false
          schema:
            type: boolean
        - description: Filter streams by billing and credential source
          in: query
          name: usage_source
          required: false
          schema:
            enum:
              - neo
              - byok
              - ai_connections
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskUsageListResponse'
          description: List of stream usage records
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden - team members/viewers cannot access usage data
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    TaskUsageListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/TaskUsage'
          type: array
        has_more:
          description: Whether there are more records
          type: boolean
        total:
          description: Total number of records
          type: integer
      required:
        - data
        - total
        - has_more
      type: object
    ErrorResponse:
      properties:
        code:
          description: >
            Stable machine-readable error code — branch on this rather than

            matching the human `error`/`message` strings. `access_restricted`

            (HTTP 403) denies hosted Neo access under the access policy. On team

            invitations, param=email identifies a restricted recipient rather

            than the caller; show the error without redirecting the caller.
            Domain codes include

            `user_spending_cap_reached`, `project_spending_cap_reached`, and

            `insufficient_neo_credits`; Free/usage codes include

            `free_grant_challenge_required`, `free_usage_exhausted`,

            `free_task_budget_exhausted`, `model_not_available_on_free`,

            `sandbox_not_available_on_free` (cloud sandbox surfaces are not

            available on the Free plan; task files remain available from the

            task), `free_cannot_continue_managed_task` (a task that ran on the

            standard cloud sandbox cannot be continued on the Free plan; start

            a new task), `free_origin_not_supported` (integration-originated

            tasks are not available on the Free plan),

            `weekly_usage_limit_reached`, `billing_period_usage_limit_reached`,

            `topup_required`, `subscription_required`, and

            `isolated_workspace_purged`. Otherwise it mirrors the error kind

            (e.g. `forbidden`, `invalid_request`, `not_exists`,
            `already_exists`).
          example: user_spending_cap_reached
          type: string
        error:
          example: Bad request
          type: string
        error_id:
          description: Correlation id for a specific error instance, when present.
          type: string
        kind:
          description: Coarse error category (e.g. "forbidden request", "invalid request").
          example: forbidden request
          type: string
        message:
          description: |
            Human-readable detail (the kind prefixed to the error). For display,
            not for branching.
          type: string
        param:
          description: >-
            Field rejected by the policy; email for a restricted invite
            recipient.
          type: string
        turnstile_site_key:
          description: |
            Public Cloudflare Turnstile site key returned only with
            `free_grant_challenge_required`, so the client can complete the
            invisible verification before retrying the request.
          type: string
      required:
        - error
      type: object
    TaskUsage:
      properties:
        agent_breakdown:
          additionalProperties:
            type: integer
          description: Agent trigger counts by agent name
          nullable: true
          type: object
        agent_triggers:
          description: Total agent triggers
          type: integer
        created_at:
          description: When the task was created
          format: date-time
          type: string
        email:
          description: Email of the user who created the task (only visible to team admins)
          type: string
        error_message:
          description: Error message if status is error
          nullable: true
          type: string
        input_tokens:
          description: >-
            Input tokens reported by the upstream provider. Omitted when
            unavailable.
          type: integer
        is_byok:
          deprecated: true
          description: Deprecated compatibility field. True only when usage_source is byok.
          type: boolean
        leaf_tool_sum_ms:
          description: >-
            Sum of leaf tool execution time, excluding trigger_* (nested
            subagent) wait.
          nullable: true
          type: integer
        llm_active_wall_ms:
          description: >-
            Wall-clock union of overlapping LLM call intervals. Never exceeds
            total_execution_ms.
          nullable: true
          type: integer
        llm_cost:
          description: >-
            Provider LLM cost in USD. Present for direct BYOK tasks; omitted for
            platform-billed tasks and AI connection tasks. Connected
            subscription providers do not currently report their per-request
            charge. Also omitted (unknown, not zero) for a BYOK task none of
            whose steps Neo could price, such as one that ran only on a custom
            endpoint. Preserves up to six decimal places when present.
          format: float
          type: number
        llm_latency_sum_ms:
          description: >-
            Sum of pure per-step provider round-trip latencies, excluding tool
            execution. Additive: overlapping/nested calls do not cancel out, so
            this can exceed total_execution_ms.
          nullable: true
          type: integer
        model:
          description: LLM model used
          type: string
        neo_cost:
          description: >-
            Neo platform cost in USD for direct BYOK usage, llm_cost multiplied
            by the account's neo_cost_rate. Omitted for platform-billed and AI
            connection tasks, and whenever llm_cost is omitted. Preserves up to
            six decimal places when present.
          format: float
          type: number
        neo_credits:
          description: >-
            Neo credits charged for platform-billed usage. Present only when
            usage_source is neo; omitted for BYOK and AI connection tasks. Task
            and stream usage preserves up to six decimal places so sub-cent
            usage remains visible.
          format: float
          type: number
        output_tokens:
          description: >-
            Output tokens reported by the upstream provider. Omitted when
            unavailable.
          type: integer
        provider_latency_avg_ms:
          description: Average pure provider latency per LLM step.
          nullable: true
          type: integer
        provider_latency_p50_ms:
          description: Median (p50) pure provider latency across this task's LLM steps.
          nullable: true
          type: integer
        provider_latency_p95_ms:
          description: p95 pure provider latency across this task's LLM steps.
          nullable: true
          type: integer
        reasoning_tokens:
          description: >-
            Reasoning tokens reported by the upstream provider. Omitted when
            unavailable.
          type: integer
        status:
          description: Execution status
          enum:
            - completed
            - error
            - failed
            - aborted
            - blocked
          type: string
        step_count:
          description: Number of steps executed
          type: integer
        stream_count:
          description: Number of streams aggregated (1 if single stream)
          type: integer
        stream_id:
          description: >-
            Stream ID (only present for individual streams, omitted for grouped
            tasks)
          format: uuid
          type: string
        task_id:
          description: Task ID
          type: string
        task_title:
          description: Task title when available
          nullable: true
          type: string
        tool_active_wall_ms:
          description: Wall-clock union of overlapping leaf-tool call intervals.
          nullable: true
          type: integer
        tool_breakdown:
          additionalProperties:
            $ref: '#/components/schemas/ToolBreakdownEntry'
          description: Tool call breakdown with calls and duration
          nullable: true
          type: object
        tool_call_history:
          description: Detailed tool call history
          items:
            $ref: '#/components/schemas/ToolCallHistoryEntry'
          nullable: true
          type: array
        tool_calls:
          description: Total tool calls made
          type: integer
        total_execution_ms:
          description: Total execution time (wall clock) in milliseconds
          nullable: true
          type: integer
        total_tokens:
          description: Total reported input and output tokens. Omitted when unavailable.
          type: integer
        trigger_wait_sum_ms:
          description: >-
            Sum of time spent waiting on trigger_* (nested subagent) calls.
            Nests around, not adjacent to, leaf_tool_sum_ms — do not add the two
            together to derive a wall-time total.
          nullable: true
          type: integer
        usage_source:
          description: >-
            Billing/model source used by the task. AI connections never consume
            Neo credits.
          enum:
            - neo
            - byok
            - ai_connections
          type: string
      required:
        - task_id
        - model
        - status
        - step_count
        - tool_calls
        - agent_triggers
        - usage_source
        - created_at
      type: object
    ToolBreakdownEntry:
      properties:
        calls:
          description: Number of calls to this tool
          type: integer
        total_duration_ms:
          description: Total duration of all calls in milliseconds
          type: integer
      type: object
    ToolCallHistoryEntry:
      properties:
        duration_ms:
          description: Duration of the call in milliseconds
          type: integer
        index:
          description: Sequential index of the tool call
          type: integer
        timestamp:
          description: Unix timestamp in milliseconds when the call was made
          format: int64
          type: integer
        tool_name:
          description: Name of the tool called
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT authentication token
      scheme: bearer
      type: http
    ApiKeyAuth:
      description: Neo API key (neo_sk_* prefix)
      in: header
      name: X-Api-Key
      type: apiKey

````

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