Nukez Files API

The files API from Nukez — 8 operation(s) for files.

GitHub OpenAPI

Operations 10

POST /v1/lockers/{locker_id}/files Create File #
GET /v1/lockers/{locker_id}/files List Files #
POST /v1/lockers/{locker_id}/files/batch Create Files Batch #
GET /v1/lockers/{locker_id}/files/{filename} Get File #
DELETE /v1/lockers/{locker_id}/files/{filename} Delete File #
POST /v1/files/confirm Confirm Upload #
POST /v1/files/confirm-batch Confirm Upload Batch #
POST /v1/files/fetch-and-store Fetch And Store #
GET /v1/lockers/{locker_id}/manifest Get Manifest #
POST /v1/lockers/{locker_id}/files/urls Batch Download Urls #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nukez-xyz:nukez-xyz-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nukez-xyz-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nukez — Permissionless Storage for Autonomous Agents Files…
  version: 1.0.0
tags:
- name: Files
paths:
  /v1/lockers/{locker_id}/files:
    post:
      tags:
      - Files
      summary: Create File
      operationId: create_file_v1_lockers__locker_id__files_post
      parameters:
      - name: locker_id
        in: path
        required: true
        schema:
          type: string
          title: Locker Id
      - name: X-Nukez-Envelope
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Envelope
      - name: X-Nukez-Signature
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Signature
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFileRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Files
      summary: List Files
      operationId: list_files_v1_lockers__locker_id__files_get
      parameters:
      - name: locker_id
        in: path
        required: true
        schema:
          type: string
          title: Locker Id
      - name: X-Nukez-Envelope
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Envelope
      - name: X-Nukez-Signature
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Signature
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/lockers/{locker_id}/files/batch:
    post:
      tags:
      - Files
      summary: Create Files Batch
      description: 'Create multiple file entries and return signed URL pairs in one call.


        This is the canonical bulk primitive for SDK/MCP upload workflows.'
      operationId: create_files_batch_v1_lockers__locker_id__files_batch_post
      parameters:
      - name: locker_id
        in: path
        required: true
        schema:
          type: string
          title: Locker Id
      - name: X-Nukez-Envelope
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Envelope
      - name: X-Nukez-Signature
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Signature
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchCreateFileRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/lockers/{locker_id}/files/{filename}:
    get:
      tags:
      - Files
      summary: Get File
      operationId: get_file_v1_lockers__locker_id__files__filename__get
      parameters:
      - name: locker_id
        in: path
        required: true
        schema:
          type: string
          title: Locker Id
      - name: filename
        in: path
        required: true
        schema:
          type: string
          title: Filename
      - name: ttl_min
        in: query
        required: false
        schema:
          type: integer
          maximum: 1440
          minimum: 1
          default: 30
          title: Ttl Min
      - name: X-Nukez-Envelope
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Envelope
      - name: X-Nukez-Signature
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Signature
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Files
      summary: Delete File
      operationId: delete_file_v1_lockers__locker_id__files__filename__delete
      parameters:
      - name: locker_id
        in: path
        required: true
        schema:
          type: string
          title: Locker Id
      - name: filename
        in: path
        required: true
        schema:
          type: string
          title: Filename
      - name: X-Nukez-Envelope
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Envelope
      - name: X-Nukez-Signature
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Signature
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/files/confirm:
    post:
      tags:
      - Files
      summary: Confirm Upload
      description: 'Confirm a file upload by computing its content hash.


        Call this after uploading content to the signed URL returned by

        POST /v1/lockers/{locker_id}/files.


        Downloads the content from storage, computes SHA256, and updates

        the manifest with content_hash, size_bytes, and hash_recorded_at.

        The hash is always recomputed from the stored bytes — a caller can

        trigger a recompute but can never inject a hash value.


        If expected_hash was provided during create_file(), verifies the

        computed hash matches. Raises 409 on mismatch.


        Phase N-7: If AUTO_REATTEST=true, also triggers re-attestation

        so the merkle root stays current after every upload.


        AUTH: signed envelope (X-Nukez-Envelope + X-Nukez-Signature) with

        the locker:write operation, bound to this request''s query string,

        body ("{}" canonical JSON), and method. The envelope''s receipt_id

        must match the query receipt_id. Enforcement is staged via

        CONFIRM_AUTH_MODE — see _confirm_auth_mode.


        Query params:

        receipt_id: The receipt ID bound to the locker

        filename: Name of the file to confirm'
      operationId: confirm_upload_v1_files_confirm_post
      parameters:
      - name: receipt_id
        in: query
        required: true
        schema:
          type: string
          title: Receipt Id
      - name: filename
        in: query
        required: true
        schema:
          type: string
          title: Filename
      - name: X-Nukez-Envelope
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Envelope
      - name: X-Nukez-Signature
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Signature
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/files/confirm-batch:
    post:
      tags:
      - Files
      summary: Confirm Upload Batch
      description: 'Confirm multiple file uploads in a single operation.


        One manifest read-modify-write, one re-attestation.

        Errors on individual files don''t fail the batch.


        Usage:

        POST /v1/files/confirm-batch?receipt_id=abc123&filenames=a.txt&filenames=b.txt


        AUTH: signed envelope with locker:write, bound to this request''s

        query string (every repeated filenames pair included); the envelope''s

        receipt_id must match the query receipt_id. Enforcement is staged via

        CONFIRM_AUTH_MODE — see _confirm_auth_mode.


        Returns per-file results with content_hash and batch summary.'
      operationId: confirm_upload_batch_v1_files_confirm_batch_post
      parameters:
      - name: receipt_id
        in: query
        required: true
        schema:
          type: string
          description: Receipt ID bound to the locker
          title: Receipt Id
        description: Receipt ID bound to the locker
      - name: filenames
        in: query
        required: true
        schema:
          type: array
          items:
            type: string
          description: Filenames to confirm (repeat param for multiple)
          title: Filenames
        description: Filenames to confirm (repeat param for multiple)
      - name: X-Nukez-Envelope
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Envelope
      - name: X-Nukez-Signature
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Signature
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/files/fetch-and-store:
    post:
      tags:
      - Files
      summary: Fetch And Store
      description: 'Fetch a file from an external HTTPS URL and store it in the locker.


        Zero bytes flow through the LLM context — the gateway fetches the content

        server-side and stores it directly. SSRF prevention blocks private/reserved

        networks, metadata endpoints, and non-HTTPS URLs.


        Auth: Signed envelope with locker:write scope.

        The locker_id and receipt_id are extracted from the signed envelope.'
      operationId: fetch_and_store_v1_files_fetch_and_store_post
      parameters:
      - name: X-Nukez-Envelope
        in: header
        required: true
        schema:
          type: string
          title: X-Nukez-Envelope
      - name: X-Nukez-Signature
        in: header
        required: true
        schema:
          type: string
          title: X-Nukez-Signature
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchAndStoreRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/lockers/{locker_id}/manifest:
    get:
      tags:
      - Files
      summary: Get Manifest
      description: 'Return the full locker manifest — all file metadata in one call.


        Useful for:

        - Context management (agent knows what''s stored without listing + fetching each)

        - Fast state sync (one call vs N calls)

        - Debugging (see full internal state)


        Requires locker:read authority (same as file download).'
      operationId: get_manifest_v1_lockers__locker_id__manifest_get
      parameters:
      - name: locker_id
        in: path
        required: true
        schema:
          type: string
          title: Locker Id
      - name: X-Nukez-Envelope
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Envelope
      - name: X-Nukez-Signature
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Signature
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/lockers/{locker_id}/files/urls:
    post:
      tags:
      - Files
      summary: Batch Download Urls
      description: 'Generate signed download URLs for multiple files in one call.


        One signed envelope, one API round-trip, N download URLs back.

        Designed for batch download workflows where per-file URL generation

        would trigger rate limits.


        Auth: Signed envelope with locker:read.


        Body:

        filenames: ["a.txt", "b.txt", ...]

        ttl_min: 30 (optional, default 30)


        Response:

        {

        "locker_id": "locker_abc123",

        "urls": [

        {

        "filename": "a.txt",

        "download_url": "https://...",

        "content_type": "text/plain",

        "content_hash": "sha256:...",

        "size_bytes": 1234

        },

        ...

        ],

        "found": 3,

        "not_found": ["missing.txt"],

        "urls_expire_in_sec": 1800

        }'
      operationId: batch_download_urls_v1_lockers__locker_id__files_urls_post
      parameters:
      - name: locker_id
        in: path
        required: true
        schema:
          type: string
          title: Locker Id
      - name: X-Nukez-Envelope
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Envelope
      - name: X-Nukez-Signature
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Nukez-Signature
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchUrlsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    BatchCreateFileItem:
      properties:
        filename:
          anyOf:
          - type: string
            maxLength: 255
            minLength: 1
          - type: 'null'
          title: Filename
        content_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Content Type
        expected_hash:
          anyOf:
          - type: string
            maxLength: 128
            minLength: 1
          - type: 'null'
          title: Expected Hash
          description: Optional sha256 precommit hash (with or without 'sha256:' prefix)
      type: object
      title: BatchCreateFileItem
      description: Single file spec for batch URL creation.
    CreateFileRequest:
      properties:
        filename:
          anyOf:
          - type: string
            maxLength: 255
            minLength: 1
          - type: 'null'
          title: Filename
        content_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Content Type
        ttl_min:
          anyOf:
          - type: integer
            maximum: 1440.0
            minimum: 1.0
          - type: 'null'
          title: Ttl Min
        expected_hash:
          anyOf:
          - type: string
            maxLength: 128
            minLength: 1
          - type: 'null'
          title: Expected Hash
          description: Optional sha256 precommit hash (with or without 'sha256:' prefix)
        expected_size_bytes:
          anyOf:
          - type: integer
            exclusiveMinimum: 0.0
          - type: 'null'
          title: Expected Size Bytes
          description: Optional declared object size in bytes; confirm verifies it
        upload_mode:
          anyOf:
          - type: string
            pattern: ^(put|resumable)$
          - type: 'null'
          title: Upload Mode
          description: 'Data plane: ''put'' (default, single signed PUT) or ''resumable'''
      type: object
      title: CreateFileRequest
      description: "Request body for create_file.\n\nNotes:\n  - filename is optional (server can auto-generate).\n  - ttl_min controls the signed URL lifetime.\n  - expected_hash and expected_size_bytes are the client's\n    pre-commitment for the object it is about to upload; confirm\n    refuses to record the manifest hash unless the stored bytes agree\n    with both. They bring the single-file route to parity with the\n    batch route, which already accepted expected_hash.\n  - upload_mode selects the data plane: \"put\" (default) returns the\n    single signed PUT URL; \"resumable\" additionally returns a\n    resumable_upload block for large objects (provider must support\n    it; GCS does). See file_ops.create_file."
    FetchAndStoreRequest:
      properties:
        source_url:
          type: string
          title: Source Url
          description: HTTPS URL to fetch content from
        filename:
          type: string
          maxLength: 255
          minLength: 1
          title: Filename
        content_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Content Type
          description: MIME type (auto-inferred from filename if not provided)
      type: object
      required:
      - source_url
      - filename
      title: FetchAndStoreRequest
      description: Request body for fetch-and-store (URL mode upload).
    BatchCreateFileRequest:
      properties:
        files:
          items:
            $ref: '#/components/schemas/BatchCreateFileItem'
          type: array
          maxItems: 100
          minItems: 1
          title: Files
          description: Files to create and mint upload/download URLs for
        ttl_min:
          anyOf:
          - type: integer
            maximum: 1440.0
            minimum: 1.0
          - type: 'null'
          title: Ttl Min
          description: 'Signed URL lifetime in minutes (default: 30)'
          default: 30
      type: object
      required:
      - files
      title: BatchCreateFileRequest
      description: Request body for batch create_file operation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BatchUrlsRequest:
      properties:
        filenames:
          items:
            type: string
          type: array
          maxItems: 100
          minItems: 1
          title: Filenames
          description: List of filenames to generate download URLs for
        ttl_min:
          anyOf:
          - type: integer
            maximum: 1440.0
            minimum: 1.0
          - type: 'null'
          title: Ttl Min
          description: 'Signed URL lifetime in minutes (default: 30)'
          default: 30
      type: object
      required:
      - filenames
      title: BatchUrlsRequest
      description: Request body for batch download URL generation.