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

# Get usage

> Requests against each key's daily quota today, and requests and failures per key and day.

Key scope: read (or execute). At most 500 keys are listed



## OpenAPI

````yaml /openapi.json get /v1/usage
openapi: 3.1.0
info:
  title: InsightChain API
  version: 2.0.0
  description: 'The InsightChain API. Send your key as `Authorization: Bearer <key>`.'
  contact:
    name: InsightChain
    url: https://insightchain.ai/docs
  license:
    name: Proprietary
    url: https://insightchain.ai/terms
servers:
  - url: https://api.insightchain.ai
security: []
tags:
  - name: Data ingestion
  - name: Tariff check
  - name: Landed cost
  - name: Import taxes
  - name: Customs documents
  - name: Denied party screening
  - name: Location risk
  - name: Tariff impact and trade data
  - name: Recommendations
  - name: Orders and approval
  - name: Explanations
  - name: Alerts
  - name: Inventory
  - name: Forecast check
  - name: Disruptions
  - name: Product compliance
  - name: Product recalls
  - name: Product passports
  - name: Webhooks
  - name: Connections
  - name: Sync runs
  - name: API keys
  - name: Usage
  - name: Request log
  - name: Agent (MCP) server
paths:
  /v1/usage:
    get:
      tags:
        - Usage
      summary: Get usage
      description: >-
        Requests against each key's daily quota today, and requests and failures
        per key and day.


        Key scope: read (or execute). At most 500 keys are listed
      operationId: getUsage
      parameters:
        - name: days
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 30
            default: 30
          description: UTC calendar days, today included
        - name: environment
          in: query
          required: false
          schema:
            type: string
            enum:
              - live
              - test
          description: >-
            A key reads its own environment only: the other value returns
            nothing
      responses:
        '200':
          description: OK
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/X-RateLimit-Limit-Day'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/X-RateLimit-Remaining-Day'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
            X-Client-Request-ID:
              $ref: '#/components/headers/X-Client-Request-ID'
            X-InsightChain-Sandbox:
              $ref: '#/components/headers/X-InsightChain-Sandbox'
          content:
            application/json:
              schema:
                type: object
                properties:
                  as_of:
                    type: string
                    format: date-time
                  days:
                    type: integer
                  keys:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        kind:
                          type: string
                          enum:
                            - key
                            - oauth
                        environment:
                          type: string
                          enum:
                            - live
                            - test
                          description: 'test: a key of your sandbox (ic_test_...)'
                        active:
                          type: boolean
                        key_hint:
                          type:
                            - string
                            - 'null'
                        daily_limit:
                          type: integer
                          description: >-
                            Requests a day; 0 when the key has no limit of its
                            own
                        requests_today:
                          type: integer
                          description: >-
                            Requests counted today (UTC); 0 when the key has not
                            been used today
                        remaining_today:
                          type: integer
                        last_used_at:
                          type:
                            - string
                            - 'null'
                          format: date-time
                      required:
                        - id
                        - name
                        - kind
                        - environment
                        - active
                        - key_hint
                        - daily_limit
                        - requests_today
                        - remaining_today
                        - last_used_at
                  daily:
                    type: array
                    items:
                      type: object
                      properties:
                        day:
                          type: string
                          format: date
                        api_key_id:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        environment:
                          type: string
                          enum:
                            - live
                            - test
                          description: 'test: a key of your sandbox (ic_test_...)'
                        requests:
                          type: integer
                        client_errors:
                          type: integer
                          description: 4xx answers other than 429
                        rate_limited:
                          type: integer
                          description: 429 answers
                        server_errors:
                          type: integer
                          description: 5xx answers
                        p50_ms:
                          type:
                            - integer
                            - 'null'
                        p95_ms:
                          type:
                            - integer
                            - 'null'
                      required:
                        - day
                        - api_key_id
                        - environment
                        - requests
                        - client_errors
                        - rate_limited
                        - server_errors
                        - p50_ms
                        - p95_ms
                    description: >-
                      One row per key and day (UTC) that had calls, newest day
                      first
                  retention_days:
                    type: integer
                    description: Days the log is kept
                  request_id:
                    type: string
                    description: >-
                      Quote this when asking about the request; also the
                      X-Request-ID header
                required:
                  - as_of
                  - days
                  - keys
                  - daily
                  - retention_days
                  - request_id
              example:
                request_id: 1dffca8f-dd7c-44c6-b72f-a936301413ed
                as_of: '2026-11-21T16:04:19.974Z'
                days: 30
                keys:
                  - id: 8c1bb392-ffb1-40a6-a98e-7dcef4229aa8
                    name: Warehouse sync (EU)
                    kind: key
                    environment: live
                    active: true
                    key_hint: ic_live_...rb10
                    daily_limit: 500
                    requests_today: 0
                    remaining_today: 500
                    last_used_at: null
                daily:
                  - day: '2026-11-21'
                    api_key_id: 028bb732-40d9-4b79-84bf-dc553e56d82e
                    environment: live
                    requests: 3
                    client_errors: 0
                    rate_limited: 0
                    server_errors: 0
                    p50_ms: 18
                    p95_ms: 41
                retention_days: 30
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/UpstreamError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - apiKey: []
components:
  headers:
    RateLimit-Limit:
      schema:
        type: integer
      description: Requests allowed per minute. On every answer to an accepted API key
    RateLimit-Remaining:
      schema:
        type: integer
      description: Requests left in the current minute window
    RateLimit-Reset:
      schema:
        type: integer
      description: Seconds until the minute window resets
    X-RateLimit-Limit-Day:
      schema:
        type: integer
      description: The key's daily quota
    X-RateLimit-Remaining-Day:
      schema:
        type: integer
      description: Requests left today (resets 00:00 UTC)
    X-Request-ID:
      schema:
        type: string
      description: Quote this when asking about a request
    X-Client-Request-ID:
      schema:
        type: string
      description: Your own X-Request-ID request header, echoed. Absent when you sent none
    X-InsightChain-Sandbox:
      schema:
        type: string
        enum:
          - 'true'
      description: >-
        Present, and true, on every answer to a test key: the data is the
        sandbox's
    Allow:
      schema:
        type: string
      description: The methods the path takes
    Retry-After:
      schema:
        type: integer
      description: Seconds to wait before trying again
  responses:
    BadRequest:
      description: >-
        Invalid input: an unknown or invalid parameter (error.param names it) or
        a body the route does not accept
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The key lacks the scope, or the organization lacks the module or is
        suspended
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    MethodNotAllowed:
      description: The route does not take this method; Allow lists the ones it takes
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
        Allow:
          $ref: '#/components/headers/Allow'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Per-minute or daily key limit; Retry-After is the real reset
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Internal error; quote request_id
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UpstreamError:
      description: >-
        The API could not be reached, or a service this route depends on failed.
        Try again shortly
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: The API, or this route, is not available right now
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        X-RateLimit-Limit-Day:
          $ref: '#/components/headers/X-RateLimit-Limit-Day'
        X-RateLimit-Remaining-Day:
          $ref: '#/components/headers/X-RateLimit-Remaining-Day'
        X-Client-Request-ID:
          $ref: '#/components/headers/X-Client-Request-ID'
        X-InsightChain-Sandbox:
          $ref: '#/components/headers/X-InsightChain-Sandbox'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      description: The body of every non-2xx answer
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - rate_limit_error
                - api_error
            code:
              type: string
              description: >-
                Stable machine-readable code, e.g. parameter_invalid,
                scope_missing, rate_limit_exceeded. Every code is listed at
                /docs/errors
            message:
              type: string
              description: For people; what `error` used to be as a plain string
            param:
              type:
                - string
                - 'null'
              description: The parameter the error is about, when there is one
            doc_url:
              type: string
              description: Where the code is documented
          required:
            - type
            - code
            - message
            - param
            - doc_url
        request_id:
          type: string
        details:
          type: array
          items: {}
          description: >-
            On a 400 for input with several problems: one entry per problem, a
            sentence or an object with `field` and `message`
        limit:
          type: integer
          description: 'On a 429: the limit that was reached'
        code:
          type: string
          deprecated: true
          description: 'Deprecated: use error.code'
        field:
          type: string
          deprecated: true
          description: 'Deprecated: use error.param'
      required:
        - error
        - request_id
      additionalProperties: true
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An InsightChain API key: ic_live_... for your organization, ic_test_...
        for its sandbox

````

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