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

# Get Logs

> Returns paginated media model request logs for the team that owns the API Key. Requires a time window of at most 30 days. Optional `mdlx_user_id` filters by the end-user id sent as `X-Mdlx-User-Id` on async inference. Subject to the query rate limit (separate from media generation RPM); responses may include `X-RateLimit-*` headers.



## OpenAPI

````yaml /team-api/logs.json get /api/v1/logs
openapi: 3.1.0
info:
  title: Media Request Logs API
  description: >-
    List media (image, video, speech) request logs for the authenticated team on
    the Modellix Media API host.
  version: '2026-08-07'
  contact:
    name: Modellix API Support
    email: support@modellix.ai
servers:
  - url: https://api.modellix.ai/
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/v1/logs:
    get:
      summary: Get Logs
      description: >-
        Returns paginated media model request logs for the team that owns the
        API Key. Requires a time window of at most 30 days. Optional
        `mdlx_user_id` filters by the end-user id sent as `X-Mdlx-User-Id` on
        async inference. Subject to the query rate limit (separate from media
        generation RPM); responses may include `X-RateLimit-*` headers.
      operationId: listMediaRequestLogs
      parameters:
        - name: start_time
          in: query
          required: true
          description: Window start (UNIX seconds)
          schema:
            type: integer
            minimum: 1
            example: 1700000000
        - name: end_time
          in: query
          required: true
          description: >-
            Window end (UNIX seconds). Must be greater than start_time; span ≤
            30 days.
          schema:
            type: integer
            minimum: 1
            example: 1700086400
        - name: mdlx_user_id
          in: query
          required: false
          description: >-
            Exact match filter; same rules as X-Mdlx-User-Id (length 8–128;
            ASCII letters, digits, `-`, `_`).
          schema:
            type: string
            minLength: 8
            maxLength: 128
            pattern: ^[A-Za-z0-9_-]+$
            example: end_user_01
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
      responses:
        '200':
          description: Paginated media request logs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaRequestLogsResponse'
              examples:
                success:
                  summary: Request log page
                  value:
                    requests:
                      - task_id: task-abc123
                        status: success
                        model:
                          provider: alibaba
                          model_name: qwen-image-plus
                        created_at: 1700000100
                        cost: 12
                    total: 1
                    page: 1
                    page_size: 10
        '400':
          description: >-
            Invalid query parameters (missing time window, span too large, bad
            page)
        '401':
          description: Missing or invalid API Key
        '429':
          description: Query rate limit exceeded
        '502':
          description: Temporarily unable to fetch logs
components:
  schemas:
    MediaRequestLogsResponse:
      type: object
      required:
        - requests
        - total
        - page
        - page_size
      properties:
        requests:
          type: array
          items:
            $ref: '#/components/schemas/MediaRequestLogItem'
        total:
          type: integer
        page:
          type: integer
        page_size:
          type: integer
    MediaRequestLogItem:
      type: object
      properties:
        task_id:
          type: string
        apikeyname:
          type: string
        model:
          $ref: '#/components/schemas/MediaRequestLogModel'
        status:
          type: string
        error:
          type: string
        result: {}
        input: {}
        created_at:
          type: integer
          description: UNIX seconds
        duration:
          type: integer
          description: Wall duration in milliseconds when available
        cost:
          type: integer
          description: >-
            Billed amount in sub-pennies (1 = USD $0.0001). Same unit as Console
            balance; divide by 10000 for dollars. 0 if not charged.
        client_ip:
          type: string
    MediaRequestLogModel:
      type: object
      properties:
        provider:
          type: string
        model_name:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Authorization: Bearer <Modellix API Key>'

````