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

# List LLM requests

> Self-hosted installs only. Lists the LLM provider requests that the engine made for the runs of the authenticated organization, newest first. Each entry is one provider attempt: a success, a refusal, a timeout or one retry. An entry holds the provider request ID, the status code, the model, the latency, the token usage, the response headers as the provider sent them and the free-form provider details. An entry never holds a prompt or a completion. Raw request and response bodies are never stored. Hosted installs return 404.



## OpenAPI

````yaml /openapi.json get /llm-requests
openapi: 3.1.0
info:
  title: Strix API
  version: 1.0.0
  description: >-
    Public REST API for the Strix autonomous penetration testing platform.
    Manage scans, vulnerabilities, assets, schedules, API tokens, and webhooks.
servers:
  - url: /api/v1
    description: Strix v1 API
security:
  - BearerAuth: []
tags:
  - name: Scans
    description: Launch, monitor, and manage security scans.
  - name: Vulnerabilities
    description: View and triage discovered vulnerabilities.
  - name: Assets
    description: Domains and repositories registered for scanning.
  - name: Schedules
    description: Recurring scan schedules (Pro plan).
  - name: Tokens
    description: Manage API tokens for authentication.
  - name: Webhooks
    description: Configure webhook subscriptions for real-time event notifications.
  - name: Organization
    description: Workspace configuration for the authenticated organization.
  - name: Members
    description: Manage organization members and roles.
  - name: Invitations
    description: List and revoke organization invitations.
  - name: PR Reviews
    description: Automated security review of pull requests.
  - name: Connectors
    description: Network connectors for scanning internal/private targets.
  - name: Knowledge
    description: >-
      Organization knowledge base: documents, policies, and repo profiles that
      steer the agent.
  - name: Uploads
    description: Upload source/code/documentation archives for whitebox scans.
  - name: Integrations
    description: Third-party integrations (GitLab, Bitbucket, ticketing).
  - name: Chat
    description: Conversational agent sessions.
  - name: Analytics
    description: Aggregate dashboard analytics.
  - name: Test Users
    description: >-
      Per-domain test accounts (with optional MFA) the agent authenticates as
      during scans.
  - name: License
    description: Self-hosted license state, entitlements, and aggregate usage.
  - name: Supply Chain
    description: >-
      SBOM inventory, supply-chain findings, scans, and policy for connected
      repositories.
  - name: CLI
    description: >-
      Device authorization endpoints that let the Strix CLI and coding agents
      sign in and receive an API token.
  - name: Billing
    description: Credit balance, agent-payable top-ups, and automatic top-up settings.
  - name: Workspaces
    description: List, create, and switch workspaces.
  - name: Asset Discovery
    description: >-
      Passive reconnaissance runs that map the organization's external attack
      surface, and the discovered-asset inventory they fill.
  - name: Containers
    description: >-
      Container registries, tracked images, image scans, findings, and SBOM
      components.
  - name: Run Logs
    description: Persisted engine logs and the diagnostics bundle of a self-hosted install.
paths:
  /llm-requests:
    get:
      tags:
        - Run Logs
      summary: List LLM requests
      description: >-
        Self-hosted installs only. Lists the LLM provider requests that the
        engine made for the runs of the authenticated organization, newest
        first. Each entry is one provider attempt: a success, a refusal, a
        timeout or one retry. An entry holds the provider request ID, the status
        code, the model, the latency, the token usage, the response headers as
        the provider sent them and the free-form provider details. An entry
        never holds a prompt or a completion. Raw request and response bodies
        are never stored. Hosted installs return 404.
      operationId: listLlmRequests
      parameters:
        - name: id
          in: query
          description: Return only the attempt with this ID.
          schema:
            type: string
            format: uuid
        - name: q
          in: query
          description: >-
            Match the provider request ID, response ID, call ID, run ID, run
            name, model, provider, agent name, error type, error message, or a
            value in the response headers or details.
          schema:
            type: string
            maxLength: 200
        - name: outcome
          in: query
          description: Return only attempts with this outcome.
          schema:
            type: string
            enum:
              - success
              - error
        - name: run_type
          in: query
          description: >-
            Return only attempts of this run type. `app` is a dashboard call
            such as a generated title or a compliance narrative.
            `connection_test` is Settings → LLM Models → Test connection.
          schema:
            type: string
            enum:
              - scan
              - pr_review
              - chat
              - auth_check
              - asset_discovery
              - app
              - connection_test
        - name: run_id
          in: query
          description: Return only attempts of this run.
          schema:
            type: string
        - name: provider
          in: query
          description: Return only attempts to this provider.
          schema:
            type: string
        - name: model
          in: query
          description: Return only attempts with this model.
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of attempts to return.
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
        - name: offset
          in: query
          description: >-
            Number of attempts to skip before the first returned attempt.
            Ignored when `before` is set.
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: before
          in: query
          description: >-
            ID of the last attempt of the previous page (`next_before`). The
            page continues after that attempt, so attempts that arrive between
            pages do not shift or repeat the results.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: LLM provider attempts of the organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  entries:
                    type: array
                    items:
                      $ref: '#/components/schemas/LlmRequestEntry'
                  total:
                    type: integer
                    description: Attempts that match the filters.
                  total_unfiltered:
                    type: integer
                    description: Attempts of the organization before any filter.
                  providers:
                    type: array
                    items:
                      type: string
                    description: Distinct providers of the organization, for filter menus.
                  models:
                    type: array
                    items:
                      type: string
                    description: Distinct models of the organization, for filter menus.
                  retention_days:
                    type: integer
                    description: >-
                      Days an attempt stays before the retention cron removes it
                      (LLM_REQUEST_LOG_RETENTION_DAYS).
                  limit:
                    type: integer
                  offset:
                    type: integer
                  has_more:
                    type: boolean
                    description: True when another page exists after the last entry.
                  next_before:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    description: >-
                      Value for the `before` parameter of the next page. Null on
                      the last page.
                required:
                  - entries
                  - total
                  - total_unfiltered
                  - retention_days
                  - limit
                  - offset
                  - has_more
                  - next_before
        '400':
          description: >-
            `outcome` or `run_type` is not one of the listed values, or `id` or
            `before` is not a UUID.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: The caller is not an unrestricted organization admin.
        '404':
          description: LLM requests are not available on hosted installs.
      security:
        - BearerAuth:
            - logs:read
components:
  schemas:
    LlmRequestEntry:
      type: object
      description: >-
        One LLM provider attempt that the engine made. Holds provider metadata
        only.
      properties:
        id:
          type: string
          format: uuid
        run_type:
          type:
            - string
            - 'null'
          enum:
            - scan
            - pr_review
            - chat
            - auth_check
            - asset_discovery
            - app
            - connection_test
            - null
        run_id:
          type:
            - string
            - 'null'
        run_name:
          type:
            - string
            - 'null'
          description: The engine run name, which also names the run log.
        run_href:
          type:
            - string
            - 'null'
          description: Dashboard path of the run, when the run has a page.
        call_id:
          type: string
          description: The engine call ID, unique per attempt.
        route:
          type: string
          enum:
            - litellm
            - openai
        provider:
          type:
            - string
            - 'null'
          description: For example `anthropic`.
        model:
          type: string
        api_host:
          type:
            - string
            - 'null'
          description: Host of the provider endpoint.
        streaming:
          type: boolean
        outcome:
          type: string
          enum:
            - success
            - error
        status_code:
          type:
            - integer
            - 'null'
          description: HTTP status from the provider.
        provider_request_id:
          type:
            - string
            - 'null'
          description: >-
            The request ID that the provider assigned. Quote this ID to the
            provider support team.
        response_id:
          type:
            - string
            - 'null'
          description: The response ID from the provider body.
        error_type:
          type:
            - string
            - 'null'
          description: Exception class of a failed attempt.
        error_message:
          type:
            - string
            - 'null'
          description: >-
            Error text of a failed attempt. The engine redacts secrets before it
            records the text.
        started_at:
          type: string
          format: date-time
        finished_at:
          type: string
          format: date-time
        duration_ms:
          type: integer
        input_tokens:
          type:
            - integer
            - 'null'
        output_tokens:
          type:
            - integer
            - 'null'
        cached_input_tokens:
          type:
            - integer
            - 'null'
        total_tokens:
          type:
            - integer
            - 'null'
        cost_usd:
          type:
            - number
            - 'null'
        agent_id:
          type:
            - string
            - 'null'
        agent_name:
          type:
            - string
            - 'null'
        retry_attempt:
          type: integer
          description: >-
            0 for the first attempt of a turn, then 1, 2 and so on for each
            retry.
        request_bytes:
          type:
            - integer
            - 'null'
          description: >-
            Size in bytes of the JSON request body that the SDK sent. Not the
            compressed size on the wire.
        response_bytes:
          type:
            - integer
            - 'null'
          description: >-
            Size in bytes of the JSON response body, or of the error body of a
            failed attempt.
        time_to_first_token_ms:
          type:
            - integer
            - 'null'
          description: >-
            Streaming attempts only. Time from the start of the request to the
            first stream event.
        finish_reason:
          type:
            - string
            - 'null'
          description: >-
            The stop reason from the provider, for example `stop`, `tool_calls`,
            `max_tokens` or `incomplete:max_output_tokens`.
        response_headers:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          description: >-
            Response headers from the provider, by lower-case header name.
            Headers whose name looks like a credential (authorization, cookie,
            api-key, secret, signature, session) are removed. Values are
            redacted and cut at 512 characters. At most 64 headers are kept.
        details:
          type:
            - object
            - 'null'
          description: >-
            Free-form provider and SDK metadata beyond the typed fields, for
            example the raw usage object, the stop sequence, the service tier or
            the system fingerprint. Content-shaped and secret-shaped keys are
            removed before storage. Limited to 16 KiB.
      required:
        - id
        - call_id
        - route
        - model
        - streaming
        - outcome
        - started_at
        - finished_at
        - duration_ms
        - retry_attempt
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable explanation of the error.
        code:
          type: string
          description: >-
            Stable machine-readable error code. `insufficient_scope` means the
            token does not hold the scope that this endpoint requires.
        required_scope:
          $ref: '#/components/schemas/ApiV1Scope'
          description: >-
            Scope that the caller must add to the token. Returned with the
            `insufficient_scope` code.
        docs:
          type: string
          format: uri
          description: Documentation page that explains how to resolve the error.
        hint:
          type: string
          description: >-
            One instruction that resolves the error. For `insufficient_scope`, a
            CLI session gets the `strix cloud session scopes set full` or `strix
            cloud login --scope-profile full` command, and an API token gets the
            settings page where the user creates a token with the scope. When
            the owner's role cannot hold the scope, the hint asks for a role
            change instead.
      required:
        - detail
    ApiV1Scope:
      type: string
      enum:
        - scans:read
        - scans:write
        - vulnerabilities:read
        - vulnerabilities:write
        - dependencies:read
        - schedules:read
        - schedules:write
        - assets:read
        - assets:write
        - organizations:read
        - organizations:write
        - members:read
        - members:write
        - invitations:read
        - invitations:write
        - webhooks:read
        - webhooks:write
        - tokens:write
        - audit:read
        - pr_reviews:read
        - pr_reviews:write
        - connectors:read
        - connectors:write
        - knowledge:read
        - knowledge:write
        - uploads:write
        - integrations:read
        - integrations:write
        - chat:read
        - chat:write
        - scans:message
        - analytics:read
        - llm:read
        - llm:write
        - test_users:read
        - test_users:write
        - discovery:read
        - discovery:write
        - license:read
        - supply_chain:read
        - supply_chain:write
        - billing:read
        - billing:write
        - containers:read
        - containers:write
        - logs:read
  responses:
    Unauthorized:
      description: Missing or invalid API token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token obtained from the Tokens endpoint or CLI device login. Include
        as `Authorization: Bearer <token>`. Requests made with a managed CLI
        session also include `X-Strix-Workspace: <organization_id>` to pin a
        process to the workspace it started in; recovery endpoints report the
        current workspace after a concurrent switch.

````