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

# Get your rate-limit quotas

> Return every rate limit configured on the calling API key, with the remaining budget and reset time for each.

Use this to throttle before you get rejected. On a **429** the `RateLimit-*` response headers describe only the single limit that was exceeded; this endpoint describes all of them.

### `reset` is an absolute timestamp

`reset` is Unix epoch **milliseconds**, not a duration — compute the wait as `reset - Date.now()`. (The `Retry-After` and `RateLimit-Reset` headers on a 429 are relative seconds; this field is not.)

Windows are fixed-length from the Unix epoch, not calendar-aligned: a 30-day limit does not reset on the 1st of the month.

### This call costs 1 request

`/quotas` is authenticated on the same path as every other partner route and consumes 1 request from each of your limits. Polling every 1-5 minutes is fine; calling it before every request is not.



## OpenAPI

````yaml /docs/api-reference/openapi.json get /api/chat/v2/quotas
openapi: 3.1.0
info:
  title: Vera Health API
  version: 1.0.0
  description: >-
    Send medical questions and receive evidence-based answers with citations as
    a Server-Sent Events stream.
  contact:
    name: Vera Health
    url: https://www.verahealth.ai
servers:
  - url: https://www.verahealth.ai
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: v2
    description: >-
      Send a medical question and receive an evidence-based answer as a
      Server-Sent Events stream.
  - name: v3
    description: >-
      Preview agentic endpoint. Runs Vera's tool-using agent and lets each
      request choose which optional tool groups are available. Testing only.
  - name: v1
    description: Legacy v1 chat endpoint. New integrations should use v2.
paths:
  /api/chat/v2/quotas:
    get:
      tags:
        - v2
      summary: Get your rate-limit quotas
      description: >-
        Return every rate limit configured on the calling API key, with the
        remaining budget and reset time for each.


        Use this to throttle before you get rejected. On a **429** the
        `RateLimit-*` response headers describe only the single limit that was
        exceeded; this endpoint describes all of them.


        ### `reset` is an absolute timestamp


        `reset` is Unix epoch **milliseconds**, not a duration — compute the
        wait as `reset - Date.now()`. (The `Retry-After` and `RateLimit-Reset`
        headers on a 429 are relative seconds; this field is not.)


        Windows are fixed-length from the Unix epoch, not calendar-aligned: a
        30-day limit does not reset on the 1st of the month.


        ### This call costs 1 request


        `/quotas` is authenticated on the same path as every other partner route
        and consumes 1 request from each of your limits. Polling every 1-5
        minutes is fine; calling it before every request is not.
      operationId: get-your-rate-limit-quotas
      responses:
        '200':
          description: >-
            Every rate limit configured on this API key. An empty `quotas` array
            means the key has no configured limits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotasResponse'
              example:
                quotas:
                  - label: requests-per-minute
                    unit: requests
                    limit: 60
                    remaining: 58
                    reset: 1755432000000
                    duration: 60000
                  - label: requests-per-month
                    unit: requests
                    limit: 500000
                    remaining: 481233
                    reset: 1757462400000
                    duration: 2592000000
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - apiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl https://www.verahealth.ai/api/chat/v2/quotas \
              -H "x-api-key: YOUR_API_KEY"
        - lang: javascript
          label: JavaScript
          source: >-
            const response = await
            fetch('https://www.verahealth.ai/api/chat/v2/quotas', {
              headers: { 'x-api-key': 'YOUR_API_KEY' },
            });


            const { quotas } = await response.json();


            for (const quota of quotas) {
              const resetsInSeconds = Math.max(0, Math.ceil((quota.reset - Date.now()) / 1000));
              console.log(
                `${quota.label}: ${quota.remaining}/${quota.limit} left, resets in ${resetsInSeconds}s`,
              );
            }
        - lang: python
          label: Python
          source: |-
            import math
            import time

            import requests

            response = requests.get(
                'https://www.verahealth.ai/api/chat/v2/quotas',
                headers={'x-api-key': 'YOUR_API_KEY'},
            )
            response.raise_for_status()

            now_ms = time.time() * 1000
            for quota in response.json()['quotas']:
                resets_in = max(0, math.ceil((quota['reset'] - now_ms) / 1000))
                print(f"{quota['label']}: {quota['remaining']}/{quota['limit']} left, resets in {resets_in}s")
components:
  schemas:
    QuotasResponse:
      type: object
      required:
        - quotas
      properties:
        quotas:
          type: array
          description: >-
            Every configured limit — key-level and identity-level alike, not
            deduplicated.
          items:
            $ref: '#/components/schemas/QuotaEntry'
    QuotaEntry:
      type: object
      description: One rate limit configured on the calling API key.
      required:
        - label
        - unit
        - limit
        - remaining
        - reset
        - duration
      properties:
        label:
          type: string
          description: Name of the limit as configured for your key.
          example: requests-per-minute
        unit:
          type: string
          enum:
            - requests
          description: >-
            What the limit counts. Always `requests` — this API does not meter
            tokens.
        limit:
          type: integer
          description: Ceiling for this limit's window.
          example: 60
        remaining:
          type: integer
          minimum: 0
          description: Requests left in the current window.
          example: 58
        reset:
          type: integer
          description: >-
            Absolute Unix timestamp in **milliseconds** at which the current
            window resets. Not a duration.
          example: 1755432000000
        duration:
          type: integer
          description: Window length in milliseconds.
          example: 60000
    RateLimitError:
      type: object
      required:
        - error
      description: >-
        Rate-limit error body. Emitted by the auth layer, so it carries no
        `metadata` echo (unlike the ChatError envelope).
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - rate_limited
            message:
              type: string
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        message:
          type: string
          description: Detailed error message
        details:
          type: string
          description: Additional error details
  responses:
    Unauthorized:
      description: >-
        Unauthorized - missing or invalid x-api-key. Emitted by the auth layer
        before the route; the body is the plain-text string "Unauthorized" (not
        JSON, no metadata echo).
      content:
        text/plain:
          schema:
            type: string
            example: Unauthorized
    TooManyRequests:
      description: >-
        Rate limit exceeded for this API key. Retry after the Retry-After
        interval.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
        RateLimit-Limit:
          description: Max requests allowed in the current window.
          schema:
            type: integer
        RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
        RateLimit-Reset:
          description: Seconds until the window resets.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
          example:
            error:
              code: rate_limited
              message: >-
                Rate limit exceeded. Retry after the interval in the Retry-After
                header.
    InternalServerError:
      description: Internal server error - An unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal server error
            message: An unexpected error occurred while processing your request
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Contact support@verahealth.ai to obtain your
        API key.

````

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