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

# Retrieve Concurrency Limit

> Retrieve a concurrency limit by name, with its bounds and live running and queued counts. With the concurrencyKey query parameter, retrieve the limit's view for that one key instead (its per-key bound, any per-key override and when it expires, and the runs executing for the key).



## OpenAPI

````yaml v3-openapi GET /api/v1/concurrency-limits/{name}
openapi: 3.1.0
info:
  title: Trigger.dev v3 REST API
  description: >-
    The REST API lets you trigger and manage runs on Trigger.dev. You can
    trigger a run, get the status of a run, and get the results of a run. 
  version: 2024-04
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.trigger.dev
    description: Trigger.dev API
security: []
paths:
  /api/v1/concurrency-limits/{name}:
    get:
      tags:
        - concurrency-limits
      summary: Retrieve concurrency limit
      description: >-
        Retrieve a concurrency limit by name, with its bounds and live running
        and queued counts. With the concurrencyKey query parameter, retrieve the
        limit's view for that one key instead (its per-key bound, any per-key
        override and when it expires, and the runs executing for the key).
      operationId: retrieve_concurrency_limit_v1
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
          description: The limit's name, as declared with `concurrencyLimit()`
        - name: concurrencyKey
          in: query
          required: false
          schema:
            type: string
          description: Return the view for this concurrencyKey instead of the limit itself.
      responses:
        '200':
          description: Concurrency limit retrieved successfully
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ConcurrencyLimitObject'
                  - $ref: '#/components/schemas/ConcurrencyLimitKeyObject'
        '401':
          description: Unauthorized request
        '404':
          description: Concurrency limit not found
      security:
        - secretKey: []
      x-codeSamples:
        - lang: typescript
          source: |-
            import { concurrencyLimits } from "@trigger.dev/sdk";

            const limit = await concurrencyLimits.retrieve("openai");
components:
  schemas:
    ConcurrencyLimitObject:
      type: object
      required:
        - id
        - name
        - perKey
        - total
        - running
        - queued
      properties:
        id:
          type: string
          description: The limit's id, starting with `climit_`
          example: climit_abcdef123456
        name:
          type: string
          description: The limit's name, as declared with `concurrencyLimit()`
          example: openai
        perKey:
          type: object
          description: Caps each concurrencyKey pool; runs without a key share one pool
          properties:
            current:
              type: integer
              nullable: true
              description: >-
                Enforced right now (null = no per-key bound). Enforcement clamps
                it to the environment concurrency limit at admit time.
              example: null
            base:
              type: integer
              nullable: true
              description: The declared value an override reverts to on reset
              example: null
            override:
              type: integer
              nullable: true
              description: The overridden value, when an override is active
              example: null
            overriddenAt:
              type: string
              format: date-time
              nullable: true
              description: When the override was applied
              example: null
        total:
          type: object
          description: Caps every run holding this limit, keys or not
          properties:
            current:
              type: integer
              nullable: true
              description: >-
                Enforced right now (null = no total bound). Enforcement clamps
                it to the environment concurrency limit at admit time.
              example: 25
            base:
              type: integer
              nullable: true
              description: The declared value an override reverts to on reset
              example: 25
            override:
              type: integer
              nullable: true
              description: The overridden value, when an override is active
              example: null
            overriddenAt:
              type: string
              format: date-time
              nullable: true
              description: When the override was applied
              example: null
        running:
          type: integer
          description: Runs executing that hold this limit
          example: 14
        queued:
          type: integer
          description: Runs that are queued and must clear this limit to execute
          example: 100
        paused:
          type: boolean
          description: >-
            Whether the limit is paused. A paused limit admits no runs until
            resumed; its configured bounds are kept.
          example: false
    ConcurrencyLimitKeyObject:
      type: object
      description: >-
        A limit's view for one concurrencyKey, returned when a request names a
        concurrencyKey.
      required:
        - name
        - concurrencyKey
        - perKey
        - running
        - paused
      properties:
        name:
          type: string
          description: The limit's name, as declared with `concurrencyLimit()`
          example: subagents
        concurrencyKey:
          type: string
          description: The concurrencyKey this view is for
          example: session_abc123
        perKey:
          type: object
          description: The per-key bound for this key
          properties:
            current:
              type: integer
              nullable: true
              description: >-
                Enforced right now for this key (the override when one is in
                force, else the limit's perKey), clamped to the environment
                concurrency limit
              example: 3
            base:
              type: integer
              nullable: true
              description: The limit's own perKey as enforced
              example: 1
            override:
              type: integer
              nullable: true
              description: The key's temporary override, when one is in force
              example: 3
            expiresAt:
              type: string
              format: date-time
              nullable: true
              description: When the key's override lapses; null when there is none
              example: '2026-10-16T12:00:00.000Z'
        running:
          type: integer
          description: Runs executing for this key that hold this limit
          example: 2
        paused:
          type: boolean
          description: >-
            Whether the limit is paused. A paused limit admits no runs, override
            or not.
          example: false
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >
        Use a named environment API key. It starts with `tr_dev_sk_`,
        `tr_prod_sk_`, `tr_stg_sk_`, etc.


        Create a named API key in the API Keys section of your Trigger.dev
        project dashboard. Choose the narrowest access preset that supports your
        integration.


        Our TypeScript SDK will default to using the value of the
        `TRIGGER_SECRET_KEY` environment variable if it is set. If you are using
        the SDK in a different environment, you can set the key using the
        `configure` function.


        ```typescript

        import { configure } from "@trigger.dev/sdk";


        configure({ accessToken: "tr_dev_sk_1234" });

        ```

````

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