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

# Get remaining uploads

> Returns the organization's remaining scan credits, whether it is in
overage, its usage of charged scans per media type, its plan names and
the end of the current billing period. Values are organization-wide,
not per user.

### Errors

- `400` — the organization has no active plan, or billing information
  is unavailable.
- `401` — authentication failed.
- `403` — the caller has the viewer role.



## OpenAPI

````yaml /openapi/realscan.json get /api/files/uploads-remaining
openapi: 3.1.1
info:
  title: Reality Defender RealScan API
  description: |-
    > **Note:** Reality Defender recommends the
    > [Reality Defender SDKs](/sdks/quickstart) (Python, TypeScript, Go, Java
    > and Rust) for most integrations.

    ## Authentication

    Every request except `PUT /api/files/{requestId}` (authorized by its
    `token`) and `GET /api/health` must send your API key in the `X-API-KEY`
    header (header names are case-insensitive). Create a key on the Reality
    Defender web platform under
    [API keys](https://app.realitydefender.ai/api-keys).

    API keys are linked to a user. Organization owners, admins and viewers
    can view uploads from all users in the organization; contributors see
    only their own.

    ## Workflow

    1. Request a signed upload URL with `POST /api/files/aws-presigned`.
    2. `PUT` the file to the returned `signedUrl`. Alternatively, skip both
       steps and submit a social media URL with `POST /api/files/social`.
    3. Poll `GET /api/media/users/{requestId}` until the scan reaches a final
       status, or set up a webhook. Analysis time varies with file size and
       type.

    ## Interpreting results

    Focus on the ensemble result (`overallStatus` and `resultsSummary`) rather
    than on individual model results.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.prd.realitydefender.xyz
security:
  - apiKey: []
tags:
  - name: RealScan
    description: >-
      Deepfake detection for uploaded files and social media links: upload, scan
      status and results, usage, and feedback.
paths:
  /api/files/uploads-remaining:
    get:
      tags:
        - RealScan
      summary: Get remaining uploads
      description: |-
        Returns the organization's remaining scan credits, whether it is in
        overage, its usage of charged scans per media type, its plan names and
        the end of the current billing period. Values are organization-wide,
        not per user.

        ### Errors

        - `400` — the organization has no active plan, or billing information
          is unavailable.
        - `401` — authentication failed.
        - `403` — the caller has the viewer role.
      operationId: getUploadsRemaining
      parameters: []
      responses:
        '200':
          description: Remaining scan credits and usage of the caller's organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUploadsRemainingResponse'
              example:
                code: ok
                errno: 0
                response:
                  remaining:
                    counts: 10
                    isWithOverUsage: false
                    initialBalance: 100
                  usage:
                    totalVideoCount: 10
                    totalAudioCount: 10
                    totalImageCount: 10
                    totalTextScanCount: 10
                  planNames:
                    - Enterprise
                  billingPeriodEndDate: '2026-01-31T00:00:00.000Z'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseError'
components:
  schemas:
    GetUploadsRemainingResponse:
      type: object
      properties:
        code:
          type: string
          description: '`ok` on success.'
        response:
          $ref: '#/components/schemas/UploadsRemainingResult'
        errno:
          type: integer
          description: '`0` on success.'
      required:
        - code
        - response
        - errno
    BaseError:
      type: object
      properties:
        statusCode:
          type: integer
        path:
          type: string
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        code:
          oneOf:
            - type: string
              nullable: true
            - type: number
            - type: boolean
            - type: array
              items:
                type: string
        type:
          type: string
          description: >-
            Present only for import errors (for example
            `unsupported-file-format`).
        name:
          type: string
          description: >-
            Present only for import errors (for example
            `unsupported-file-format`).
        explanation:
          type: string
          description: >-
            Present only for import errors (for example
            `unsupported-file-format`).
    UploadsRemainingResult:
      type: object
      properties:
        remaining:
          $ref: '#/components/schemas/UploadsRemaining'
        usage:
          $ref: '#/components/schemas/UploadsUsage'
        planNames:
          type: array
          description: Names of the organization's active plans.
          items:
            type: string
        billingPeriodEndDate:
          type: string
          format: date-time
          nullable: true
          description: End of the current billing period.
      required:
        - remaining
        - usage
        - planNames
    UploadsRemaining:
      type: object
      properties:
        counts:
          type: number
          description: The organization's remaining scan credit balance.
          example: 10
        isWithOverUsage:
          type: boolean
          description: >-
            `true` when the balance is used up (zero or below) and the
            organization's plan allows overage.
          example: false
        initialBalance:
          type: integer
          nullable: true
          description: >-
            Credit allowance for the current period; `null` when there is no
            cap.
          example: 100
      required:
        - counts
        - isWithOverUsage
        - initialBalance
    UploadsUsage:
      type: object
      description: Number of charged scans of the organization, per media type.
      properties:
        totalVideoCount:
          type: integer
          example: 10
        totalAudioCount:
          type: integer
          example: 10
        totalImageCount:
          type: integer
          example: 10
        totalTextScanCount:
          type: integer
          example: 10
      required:
        - totalVideoCount
        - totalAudioCount
        - totalImageCount
        - totalTextScanCount
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API key created in the web app under API keys. Expired or disabled keys
        are rejected with 401.

````