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

# Probe file by hash

> Tells whether the Hub has a file (Content-Length, Content-Type), no authentication required. Call it before uploading: 200 means the upload can be skipped. No body.



## OpenAPI

````yaml /hub/openapi/hub.json head /api/v1/hub/files/sha256/{hash}
openapi: 3.0.1
info:
  title: Fanify Hub API
  description: Generate media and text with Fanify credits. All prices use EUR.
  version: v1
servers:
  - url: https://fanifyai.com
security: []
paths:
  /api/v1/hub/files/sha256/{hash}:
    head:
      tags:
        - Files
      summary: Probe file by hash
      description: >-
        Tells whether the Hub has a file (Content-Length, Content-Type), no
        authentication required. Call it before uploading: 200 means the upload
        can be skipped. No body.
      parameters:
        - name: hash
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            The Hub has the file: a generation referencing sha256:<hash> will
            not ask for it. Content-Length and Content-Type describe it. No
            body.
          headers:
            X-Content-Type-Options:
              description: Always nosniff.
              schema:
                type: string
            Content-Disposition:
              description: Always attachment.
              schema:
                type: string
            Content-Security-Policy:
              description: Always sandbox.
              schema:
                type: string
            Cache-Control:
              description: Always private.
              schema:
                type: string
            Content-Length:
              description: Size of the file in bytes.
              schema:
                type: string
          content:
            image/png:
              schema:
                type: string
                format: binary
            image/jpeg:
              schema:
                type: string
                format: binary
            image/webp:
              schema:
                type: string
                format: binary
            image/gif:
              schema:
                type: string
                format: binary
            image/bmp:
              schema:
                type: string
                format: binary
            video/mp4:
              schema:
                type: string
                format: binary
            video/webm:
              schema:
                type: string
                format: binary
            video/quicktime:
              schema:
                type: string
                format: binary
            video/x-matroska:
              schema:
                type: string
                format: binary
            video/x-msvideo:
              schema:
                type: string
                format: binary
            audio/mpeg:
              schema:
                type: string
                format: binary
            audio/wav:
              schema:
                type: string
                format: binary
            audio/ogg:
              schema:
                type: string
                format: binary
            audio/flac:
              schema:
                type: string
                format: binary
            audio/mp4:
              schema:
                type: string
                format: binary
            audio/aac:
              schema:
                type: string
                format: binary
            application/pdf:
              schema:
                type: string
                format: binary
            application/octet-stream:
              schema:
                type: string
                format: binary
            application/zip:
              schema:
                type: string
                format: binary
            application/x-zip-compressed:
              schema:
                type: string
                format: binary
        '410':
          description: File expired
          content:
            application/problem+json:
              schema:
                required:
                  - type
                  - title
                  - status
                  - code
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    format: int32
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                  code:
                    enum:
                      - file_expired
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  unrepresentable:
                    type: array
                    items:
                      type: string
                  missing:
                    type: array
                    items:
                      required:
                        - sha256
                      type: object
                      properties:
                        sha256:
                          type: string
                        kind:
                          type: string
                          nullable: true
              example:
                type: https://fanifyai.com/docs/hub/errors#file_expired
                title: File expired
                status: 410
                code: file_expired
        '429':
          description: Rate limit reached
          headers:
            Retry-After:
              description: Seconds before retrying.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                required:
                  - type
                  - title
                  - status
                  - code
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                    format: int32
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                  code:
                    enum:
                      - rate_limited
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  unrepresentable:
                    type: array
                    items:
                      type: string
                  missing:
                    type: array
                    items:
                      required:
                        - sha256
                      type: object
                      properties:
                        sha256:
                          type: string
                        kind:
                          type: string
                          nullable: true
              example:
                type: https://fanifyai.com/docs/hub/errors#rate_limited
                title: Rate limit reached
                status: 429
                code: rate_limited

````

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