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

# Get request details

> Fetches the routed-request record associated with `X-Request-Id` from a
model response. The lookup is scoped to the authenticated user; a
foreign ID returns 404.


<div className="endpoint-signature"><span className="endpoint-method endpoint-method-get">GET</span><code>/v1/usage/requests/\{request\_id}</code></div>


## OpenAPI

````yaml /openapi/usage.yaml get /v1/usage/requests/{request_id}
openapi: 3.1.0
info:
  title: Tokenless Cost and Usage API
  version: 1.0.0
  description: |
    Account credit, routed-request cost, usage history, and session aggregate
    endpoints. Monetary amounts are integer USD nanos:
    1,000,000,000 nanos equals US $1.00.
servers:
  - url: https://api.usetokenless.com
security:
  - bearerAuth: []
paths:
  /v1/usage/requests/{request_id}:
    get:
      summary: Get request details
      description: |
        Fetches the routed-request record associated with `X-Request-Id` from a
        model response. The lookup is scoped to the authenticated user; a
        foreign ID returns 404.
      operationId: getUsageRequest
      parameters:
        - $ref: '#/components/parameters/RequestID'
      responses:
        '200':
          description: Cost and routing record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeedEvent'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    RequestID:
      name: request_id
      in: path
      required: true
      schema:
        type: string
  schemas:
    FeedEvent:
      type: object
      required:
        - request_id
        - created_at
        - prompt_preview
        - response_preview
        - provider_ranks
        - total_cost_nanos
        - total_input_tokens
        - total_output_tokens
      properties:
        request_id:
          type: string
        created_at:
          type: string
          format: date-time
        prompt_preview:
          type: string
        response_preview:
          type: string
        selected_model_id:
          type: string
        provider_ranks:
          type: array
          items:
            type: object
            required:
              - model_id
              - rank
            properties:
              model_id:
                type: string
              rank:
                type: integer
        total_cost_nanos:
          type: integer
          format: int64
        total_input_tokens:
          type: integer
          format: int64
        total_output_tokens:
          type: integer
          format: int64
        byok:
          type: boolean
        routing_mode:
          type: string
          enum:
            - pro
            - max
            - ultra_saver
        session_id:
          type: string
        agent_id:
          type: string
        parent_agent_id:
          type: string
        session_source:
          type: string
        credential_name:
          type: string
        feedback:
          $ref: '#/components/schemas/Feedback'
    Feedback:
      type: object
      properties:
        rating:
          type: integer
          enum:
            - -1
            - 1
        comment:
          type: string
        kind:
          type: string
          enum:
            - bug
            - feedback
        reason:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid authentication.
    NotFound:
      description: The resource does not exist or is not owned by the caller.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Tokenless API key, Clerk JWT, or tkl CLI session

````