---
operationId: getUsage
title: "Quota, storage and limits for the caller"
url: "https://mediaseer.ai/docs/api/operations/getusage/"
---

# Quota, storage and limits for the caller

`GET /usage`

URL: `api.mediaseer.ai/api/v1/usage`

Your analysis slots, the storage your source videos and clips take, the size and duration limits per video, and the video analysed and the clips made in your current period with your plan’s limits on them.

## Authorizations

- **[apiKeyAuth](https://mediaseer.ai/docs/api/#apikeyauth)**

## Responses

### 200

OK

Media type: application/json

object

- `jobs` required: Your analysis slots. Creating an analysis takes a slot; `CANCELLED` and `FAILED` free it. An `UPLOADING` analysis holds its slot for 7 days from creation.

  object

  - `used` integer, required
  - `limit` integer, required
  - `remaining` integer, required

- `limits` required

  object

  - `maxFileSizeBytes` integer, format: int64, required
  - `maxDurationSeconds` integer, required: The longest video an analysis may have, in seconds. After the start, the whole video is read to measure its length. An analysis of a longer video ends `FAILED`, without results, before it is processed, and so does one that can’t be read as a video. Its start doesn’t count.

- `storage` required: The storage your source videos and clips take. Your plan limits only the source videos (`sourceBytes`); clips have no limit, and are counted so you can see what they take.

  A source video counts the size declared for its upload, and once its analysis has finished and been measured, the files it keeps; a failed or cancelled analysis, and an upload whose upload window has passed, count nothing. A clip job counts its clips and posters once they have been measured, which happens when the ready job itself (not the list) is read, or for a job that is only listed, by a background check that runs several times an hour. A successful delete frees the storage of an analysis or clip job at once.

  object

  - `usedBytes` integer, format: int64, required: All the storage you use, `sourceBytes` plus `clipBytes`.
  - `sourceBytes` integer, format: int64, required: The storage your source videos take, what `limitBytes` applies to.
  - `clipBytes` integer, format: int64, required: The storage your clips take. It has no limit.
  - `limitBytes` integer, format: int64: The storage your plan includes for source videos, which `sourceBytes` is held to; clips do not count. Absent when there is no limit. Creating an analysis is refused (`QUOTA_EXCEEDED`, field `storage`) when its declared size does not fit into what `sourceBytes` leaves. `sourceBytes` can still end up above the limit: a finished analysis counts the files it keeps, which can be more than its declared size.

- `plan` required: The plan your account is on. It sets `storage.limitBytes`, the storage for your source videos, `minutes.limitSeconds` and `clips.limit`, the video you can analyse and the clips you can make per period (none of these for test accounts), and can lower `limits`.

  object

  - `id` string, required: The plan’s identifier, a lower-case slug. New plans may be added.
  - `name` string, required: The plan’s name, for display.

- `period` required: The period `minutes` and `clips` are counted in. On a paid plan, the period is your billing period, split into months for a yearly price; otherwise it runs monthly from the day (UTC) you signed up. Signed up on the 29th, 30th or 31st, a month without that day has its period start on its last day. Both ends are midnight UTC; usage resets at `end`, which is the next period’s `start`.

  object

  - `start` string, format: date-time, required: When the current period began.
  - `end` string, format: date-time, required: When the current period ends and `minutes` and `clips` start again from 0.

- `minutes` required: The video you analysed in the current period. Each finished analysis counts its video’s length, rounded up to a whole second, on the day (UTC) it finished. A failed or cancelled analysis counts nothing, and deleting an analysis does not give its seconds back.

  object

  - `usedSeconds` integer, format: int64, required: The seconds of video analysed in this period.
  - `limitSeconds` integer, format: int64: The seconds of video your plan includes per period. Absent when there is no limit. Starting an analysis is refused (`QUOTA_EXCEEDED`, field `minutes`) when none are left. An analysis whose video is longer than what is left ends `FAILED` with the message “The video is longer than the minutes left in this period.” as soon as its length is known, and counts nothing, so finished analyses never take `usedSeconds` above the limit; it is above it only when your limit was lowered or newly set during the period. Analyses still `QUEUED` or `PROCESSING` already hold their videos’ lengths of what is left, rounded up to whole seconds, though `usedSeconds` counts them only once they finish.

- `clips` required: The clips you made in the current period. A clip job counts its clips once it is `READY`, on the day (UTC) it got there. A failed job counts nothing, and deleting a clip job does not give its clips back.

  object

  - `used` integer, required: The clips made in this period.
  - `limit` integer: The clips your plan includes per period. Absent when there is no limit. Creating a clip job is refused (`QUOTA_EXCEEDED`, field `clips`) once `used` has reached it. A job’s clips count only once it is `READY`, and one job can make several, so jobs created before the limit was reached can take `used` above it.

- `subscription`

  object

  - `status` string, required

    - `ACTIVE`: paid, the plan applies
    - `TRIALING`: in a free trial, the plan applies
    - `PAST_DUE`: the last payment failed and is being retried; the plan still applies
    - `UNPAID`: the payment retries ran out; you are on the free plan until it is paid
    - `INCOMPLETE`: the first payment has not gone through yet; the plan applies once it has
    - `PAUSED`: paused; you are on the free plan while it is

    New values may be added.

    Allowed values: `ACTIVE`, `TRIALING`, `PAST_DUE`, `UNPAID`, `INCOMPLETE`, `PAUSED`

  - `renewsAt` string, format: date-time: When the current billing period ends and the plan is renewed and charged again. Absent when the subscription is set to end (`cancelAt`), and while it doesn’t pay for the plan (`UNPAID`, `INCOMPLETE`, `PAUSED`).

  - `cancelAt` string, format: date-time: When the subscription ends, as it is set to. While it pays, you keep your plan until then; you are on the free plan after it. Absent when it renews.

  - `change`: A move to another plan at `at`, set from the web app. In `getUsage`, a change set for later (a smaller plan, or the end of a cancelled subscription), absent when none is set.

    object

    - `plan` required: The plan your account is on. It sets `storage.limitBytes`, the storage for your source videos, `minutes.limitSeconds` and `clips.limit`, the video you can analyse and the clips you can make per period (none of these for test accounts), and can lower `limits`.

      object

      - `id` string, required: The plan’s identifier, a lower-case slug. New plans may be added.
      - `name` string, required: The plan’s name, for display.

    - `at` string, format: date-time, required: When you move to `plan`: the end of the current billing period (for a cancellation, an earlier end set already). A larger plan applies right away, when it is chosen.

#### Example

```json
{
  "jobs": {
    "used": 3,
    "limit": 10,
    "remaining": 7
  },
  "limits": {
    "maxFileSizeBytes": 2147483648,
    "maxDurationSeconds": 1800
  },
  "storage": {
    "usedBytes": 3600000000,
    "sourceBytes": 3200000000,
    "clipBytes": 400000000,
    "limitBytes": 5000000000
  },
  "plan": {
    "id": "free",
    "name": "Free"
  },
  "period": {
    "start": "2026-11-03T00:00:00Z",
    "end": "2026-12-03T00:00:00Z"
  },
  "minutes": {
    "usedSeconds": 1260,
    "limitSeconds": 3600
  },
  "clips": {
    "used": 4,
    "limit": 20
  },
  "subscription": {
    "status": "ACTIVE",
    "renewsAt": "2026-12-03T10:15:00Z",
    "cancelAt": "2026-12-03T10:15:00Z",
    "change": {
      "plan": {
        "id": "free",
        "name": "Free"
      },
      "at": "2026-12-03T10:15:00Z"
    }
  }
}
```

### 401

Missing, invalid or expired credentials (`UNAUTHENTICATED`).

Media type: application/json

object

- `code` string, required: Stable machine-readable code. Clients branch on this, never on `message`.

  Allowed values: `VALIDATION`, `UNAUTHENTICATED`, `INVALID_TOKEN`, `FORBIDDEN`, `EMAIL_NOT_VERIFIED`, `NOT_FOUND`, `INVALID_STATE`, `UPLOAD_INCOMPLETE`, `QUOTA_EXCEEDED`, `RATE_LIMITED`, `UPSTREAM_ERROR`, `CLIPS_NOT_CONFIGURED`, `CLIPS_UNAVAILABLE`, `INTERNAL`

- `message` string, required: Human-readable, safe to show to the user. For `VALIDATION` with a single detail, it states that detail’s reason, naming the field where the reason needs it; with several, it is generic and `details` lists them.

- `details` Array\<object>: Optional field-level or limit-level detail.

  object

  - `field` string: The request field the detail refers to, if any; for `QUOTA_EXCEEDED`, the limit that was hit.
  - `message` string, required

#### Example

```json
{
  "code": "VALIDATION",
  "message": "The file is larger than the limit of 2147483648 bytes.",
  "details": [
    {
      "field": "sizeBytes",
      "message": "must be at most 2147483648"
    }
  ]
}
```

### default

Unexpected error

Media type: application/json

object

- `code` string, required: Stable machine-readable code. Clients branch on this, never on `message`.

  Allowed values: `VALIDATION`, `UNAUTHENTICATED`, `INVALID_TOKEN`, `FORBIDDEN`, `EMAIL_NOT_VERIFIED`, `NOT_FOUND`, `INVALID_STATE`, `UPLOAD_INCOMPLETE`, `QUOTA_EXCEEDED`, `RATE_LIMITED`, `UPSTREAM_ERROR`, `CLIPS_NOT_CONFIGURED`, `CLIPS_UNAVAILABLE`, `INTERNAL`

- `message` string, required: Human-readable, safe to show to the user. For `VALIDATION` with a single detail, it states that detail’s reason, naming the field where the reason needs it; with several, it is generic and `details` lists them.

- `details` Array\<object>: Optional field-level or limit-level detail.

  object

  - `field` string: The request field the detail refers to, if any; for `QUOTA_EXCEEDED`, the limit that was hit.
  - `message` string, required

#### Example

```json
{
  "code": "VALIDATION",
  "message": "The file is larger than the limit of 2147483648 bytes.",
  "details": [
    {
      "field": "sizeBytes",
      "message": "must be at most 2147483648"
    }
  ]
}
```
