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

# create watermark check

> Reserves a check of whether a video carries Anam's invisible watermark and returns a one-time upload link. Send only the file size here; the file itself goes straight to the EU validator and never passes through this API. The API key needs write access to watermark checks.

1. Call this operation with the file's exact `size_bytes`.
2. Within 10 minutes, `PUT` the file to `upload_url` from a server, with its `Content-Type` and an exact `Content-Length`, and without chunked transfer encoding. Do not send an `Authorization` header. The validator answers `202` when it has the file. Browsers cannot upload directly because the validator only allows Lab origins.
3. Poll `status_url` (Get a watermark check) about every 2 seconds until `status` is `done`, `rejected` or `failed`.

Accepted files are MP4, MOV, WebM or MKV videos with a video track, up to 50 MB (52,428,800 bytes) and at least 10 seconds long. The validator analyses the start of the file: up to 5 minutes for videos up to 720p, and less at higher resolutions (about 166 seconds at 1080p and 48 seconds at 4K).

Each organization can create 100 checks per UTC day, counting checks that are never uploaded, and have 3 in progress at once. A check stops counting as in progress when you fetch its `done`, `rejected` or `failed` status, so poll each check until it finishes. A check that is never uploaded holds its slot for up to about 45 minutes after it was created. A check you stop polling before it finishes holds its slot for up to 36 minutes after your last poll.

Upload errors come from the validator as `{"error_code": "..."}`: `invalid_link`, `link_expired` or `link_used` (create a new check), `length_required` (send `Content-Length`) and `size_mismatch` (the body must match `size_bytes`), both checked before the link is used, so fix the request and retry the same link, `file_too_large`, `busy` (HTTP 429; retry the same link after `Retry-After` seconds while it is still valid), `upload_incomplete` and `upload_timeout` (create a new check and upload again), and `internal_error` (HTTP 500; create a new check). The upload must finish within `min(300, 30 + size_bytes / 250000)` seconds, which needs about 2 Mbit/s upstream for a 50 MB file.




## OpenAPI

````yaml https://api.anam.ai/swagger.json post /v1/watermark/checks
openapi: 3.1.0
info:
  title: Anam AI API
  version: '1.0'
servers:
  - url: https://api.anam.ai
    description: Anam API
security:
  - BearerAuth: []
tags:
  - name: Sessions
  - name: Avatar Videos
  - name: Meetings
  - name: Watermark Checks
  - name: Personas
  - name: Avatars
  - name: Voices
  - name: Pronunciation Dictionaries
  - name: LLMs
  - name: Knowledge
  - name: Tools
  - name: Share Links
  - name: Engine
paths:
  /v1/watermark/checks:
    post:
      tags:
        - Watermark Checks
      summary: Create a watermark check
      description: >
        Reserves a check of whether a video carries Anam's invisible watermark
        and returns a one-time upload link. Send only the file size here; the
        file itself goes straight to the EU validator and never passes through
        this API. The API key needs write access to watermark checks.


        1. Call this operation with the file's exact `size_bytes`.

        2. Within 10 minutes, `PUT` the file to `upload_url` from a server, with
        its `Content-Type` and an exact `Content-Length`, and without chunked
        transfer encoding. Do not send an `Authorization` header. The validator
        answers `202` when it has the file. Browsers cannot upload directly
        because the validator only allows Lab origins.

        3. Poll `status_url` (Get a watermark check) about every 2 seconds until
        `status` is `done`, `rejected` or `failed`.


        Accepted files are MP4, MOV, WebM or MKV videos with a video track, up
        to 50 MB (52,428,800 bytes) and at least 10 seconds long. The validator
        analyses the start of the file: up to 5 minutes for videos up to 720p,
        and less at higher resolutions (about 166 seconds at 1080p and 48
        seconds at 4K).


        Each organization can create 100 checks per UTC day, counting checks
        that are never uploaded, and have 3 in progress at once. A check stops
        counting as in progress when you fetch its `done`, `rejected` or
        `failed` status, so poll each check until it finishes. A check that is
        never uploaded holds its slot for up to about 45 minutes after it was
        created. A check you stop polling before it finishes holds its slot for
        up to 36 minutes after your last poll.


        Upload errors come from the validator as `{"error_code": "..."}`:
        `invalid_link`, `link_expired` or `link_used` (create a new check),
        `length_required` (send `Content-Length`) and `size_mismatch` (the body
        must match `size_bytes`), both checked before the link is used, so fix
        the request and retry the same link, `file_too_large`, `busy` (HTTP 429;
        retry the same link after `Retry-After` seconds while it is still
        valid), `upload_incomplete` and `upload_timeout` (create a new check and
        upload again), and `internal_error` (HTTP 500; create a new check). The
        upload must finish within `min(300, 30 + size_bytes / 250000)` seconds,
        which needs about 2 Mbit/s upstream for a 50 MB file.
      operationId: createWatermarkCheck
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WatermarkCheckCreateRequest'
      responses:
        '201':
          description: Check created. Upload the file to `upload_url`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkCheckCreateResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkCheckError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkCheckError'
        '403':
          description: API key lacks watermark-check write access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkCheckError'
        '404':
          description: Watermark checks are not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkCheckError'
        '413':
          description: File larger than 50 MB
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkCheckError'
        '429':
          description: >-
            `rate_limited` after 100 checks were created in the current UTC day,
            or `too_many_running` while 3 checks are in progress. For
            `too_many_running`, `Retry-After` is an upper bound: a slot frees as
            soon as you fetch the `done`, `rejected` or `failed` status of one
            of your checks.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkCheckError'
        '500':
          description: Unexpected server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkCheckError'
        '502':
          description: Validator unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkCheckError'
        '503':
          description: Service temporarily unavailable; retry after `Retry-After` seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatermarkCheckError'
components:
  schemas:
    WatermarkCheckCreateRequest:
      type: object
      additionalProperties: false
      required:
        - size_bytes
      properties:
        size_bytes:
          type: integer
          minimum: 1
          maximum: 52428800
          description: >-
            Exact size of the file you will upload, in bytes. The upload must
            send this many bytes.
    WatermarkCheckCreateResponse:
      type: object
      additionalProperties: false
      required:
        - check_id
        - upload_url
        - status_url
      properties:
        check_id:
          type: string
          pattern: ^chk_[0-9a-z]{26}$
        upload_url:
          type: string
          format: uri
          description: >-
            One-time upload link to the EU watermark validator, valid for 10
            minutes. Send the file with `PUT` from a server.
        status_url:
          type: string
          format: uri
          description: URL of Get a watermark check for this check.
    WatermarkCheckError:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable message.
        code:
          $ref: '#/components/schemas/WatermarkCheckErrorCode'
    WatermarkCheckErrorCode:
      type: string
      enum:
        - invalid_request
        - file_too_large
        - rate_limited
        - too_many_running
        - validator_unavailable
        - not_found
        - internal_error
        - service_unavailable
        - unauthorized
        - forbidden
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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