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

# Get Usage Event Attempts

> Per-attempt timeline for one request (the served row + any retried rows sharing
its request_id), oldest first — powers the logs drawer's "Attempts" history so a
caller can see every model that was tried. Same customer-facing scrubbing as the
events list (no provider names / admin fields).

Authorization mirrors the events list: an API-key caller sees only events made by
that key; a JWT caller must belong to the event's org, and a non-privileged member
is restricted to their own events. Anything else 404s (existence is not leaked).



## OpenAPI

````yaml /api/openapi.json get /v1/usage/events/{event_id}/attempts
openapi: 3.1.0
info:
  title: MeshAPI
  description: One key, all AI models.
  version: 0.1.0
servers:
  - url: https://api.meshapi.ai
security:
  - BearerAuth: []
paths:
  /v1/usage/events/{event_id}/attempts:
    get:
      tags:
        - Usage
      summary: Get Usage Event Attempts
      description: >-
        Per-attempt timeline for one request (the served row + any retried rows
        sharing

        its request_id), oldest first — powers the logs drawer's "Attempts"
        history so a

        caller can see every model that was tried. Same customer-facing
        scrubbing as the

        events list (no provider names / admin fields).


        Authorization mirrors the events list: an API-key caller sees only
        events made by

        that key; a JWT caller must belong to the event's org, and a
        non-privileged member

        is restricted to their own events. Anything else 404s (existence is not
        leaked).
      operationId: get_usage_event_attempts
      parameters:
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            title: Event Id
        - in: header
          name: X-Mesh-Version
          required: false
          schema:
            type: string
            enum:
              - 2026-08
            default: 2026-08
          example: 2026-08
          description: >-
            Dated version of the API contract to pin this request to. Omit it
            and the request is served under `2026-08` — the oldest supported
            version, so an existing integration is never moved by a release. A
            malformed or unsupported value is rejected with `400
            invalid_api_version` rather than falling back silently. The version
            actually served is echoed as `X-Mesh-Version` on every response,
            including errors.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UsageEventOut'
                title: Response Get Usage Event Attempts
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    UsageEventOut:
      properties:
        id:
          type: string
          title: Id
        key_id:
          type: string
          title: Key Id
        key_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Key Label
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        end_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: End User Id
        request_id:
          type: string
          title: Request Id
        model:
          type: string
          title: Model
        model_name:
          type: string
          title: Model Name
        model_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Provider
        stream:
          type: boolean
          title: Stream
        prompt_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Prompt Tokens
        completion_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Completion Tokens
        total_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Tokens
        cost_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Cost Usd
        latency_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Latency Ms
        tokens_per_second:
          anyOf:
            - type: number
            - type: 'null'
          title: Tokens Per Second
        provider_latency_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Provider Latency Ms
        platform_latency_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Platform Latency Ms
        ttft_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ttft Ms
        status:
          type: string
          title: Status
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        error_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Category
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        created_at:
          type: string
          title: Created At
        images_generated:
          anyOf:
            - type: integer
            - type: 'null'
          title: Images Generated
        model_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Type
        is_byok:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Byok
        byok_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Byok Key Id
        byok_key_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Byok Key Label
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
        fallback_triggered:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Fallback Triggered
        platform_fee_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Platform Fee Usd
        image_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Image Tokens
        member_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Member Name
        member_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Member Email
        attempt_no:
          anyOf:
            - type: integer
            - type: 'null'
          title: Attempt No
        is_retry_attempt:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Retry Attempt
        routing_fallback:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Routing Fallback
        model_requested:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Requested
      type: object
      required:
        - id
        - key_id
        - key_label
        - request_id
        - model
        - model_name
        - model_provider
        - stream
        - prompt_tokens
        - completion_tokens
        - total_tokens
        - cost_usd
        - latency_ms
        - tokens_per_second
        - status
        - error_code
        - created_at
      title: UsageEventOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Enter your MeshAPI key (`rsk_...`) — sent as `Authorization: Bearer
        <key>`.

````