Leap Laboratories Upload API

The upload API from Leap Laboratories — 4 operation(s) for upload.

GitHub OpenAPI

Operations 4

POST /api/data/upload/presign Get presigned upload URL #
POST /api/data/upload/finalize Finalize file upload #
POST /api/data/upload/direct Upload file directly (base64) #
POST /api/data/upload/from-url Upload from URL #

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/leap-labs-com:leap-labs-com-upload-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

leap-labs-com-upload-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Disco Upload API
  description: 'Disco finds novel, statistically validated patterns in tabular data that correlation analysis, LLMs, and hypothesis-driven approaches miss. Each pattern is validated on hold-out data with FDR-corrected p-values and checked against academic literature with citations.


    ## Agent workflow


    **Step 1 — Get an API key** (once):

    - `POST /api/signup` with `{"email": "..."}` → sends a 6-digit code

    - `POST /api/signup/verify` with `{"email": "...", "code": "..."}` → returns `{"key": "disco_..."}`

    - Use this key as `Authorization: Bearer disco_...` for all subsequent requests


    **Step 2 — Estimate cost** (optional but recommended):

    - `POST /api/estimate` with file size, column count, depth, visibility

    - Returns credit cost and time estimate


    **Step 3 — Upload data** (pick one):

    - *From URL:* `POST /api/data/upload/from-url` with `{"url": "https://..."}` → returns `file` and `columns`

    - *Direct (base64):* `POST /api/data/upload/direct` with `{"fileName": "data.csv", "content": ""}` → returns `file` and `columns`. Max 50MB.

    - *Presign flow (for large files):* `POST /api/data/upload/presign` → PUT file to `uploadUrl` → `POST /api/data/upload/finalize`


    **Step 4 — Run analysis:**

    - `POST /api/run-analysis` with `file`, `columns`, and `targetColumn` from step 3 → returns `{"run_id": "..."}`


    **Step 5 — Poll for results:**

    - `GET /api/runs/{run_id}/results` — poll every 10s until `status` is `"completed"` (time varies with dataset size and depth)

    - Response includes `patterns[]` with conditions, p-values, effect sizes, novelty scores, and citations


    ## Billing


    Public runs are free. If the user needs more credits or a paid plan, send them to https://disco.leap-labs.com/account to upgrade.


    ## Authentication


    `disco_` API keys via `Authorization: Bearer disco_...` header. Get a key via signup or at https://disco.leap-labs.com/developers.


    ## SDK


    `pip install discovery-engine-api` — Full docs'
  version: 1.0.0
servers:
- url: https://disco.leap-labs.com
tags:
- name: Upload
paths:
  /api/data/upload/presign:
    post:
      tags:
      - Upload
      summary: Get presigned upload URL
      description: Returns a presigned URL for uploading a file directly to storage. Use the returned uploadUrl to PUT your file, then call /api/data/upload/finalize.
      operationId: presign_upload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - fileName
              - contentType
              - fileSize
              properties:
                fileName:
                  type: string
                  description: Name of the file
                contentType:
                  type: string
                  description: MIME type of the file (e.g. text/csv)
                fileSize:
                  type: integer
                  description: File size in bytes
      responses:
        '200':
          description: Presigned upload URL and token
          content:
            application/json:
              schema:
                type: object
                properties:
                  uploadUrl:
                    type: string
                    description: PUT your file to this URL
                  key:
                    type: string
                    description: Storage key
                  bucket:
                    type: string
                  expiresIn:
                    type: integer
                    description: URL expiry in seconds
                  uploadToken:
                    type: string
                    description: JWT token — pass to /api/data/upload/finalize
      security:
      - BearerAuth: []
  /api/data/upload/finalize:
    post:
      tags:
      - Upload
      summary: Finalize file upload
      description: After uploading to the presigned URL, call this to process the file. Returns columns and metadata needed for /api/run-analysis.
      operationId: finalize_upload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - key
              - uploadToken
              properties:
                key:
                  type: string
                  description: Storage key from presign response
                uploadToken:
                  type: string
                  description: JWT token from presign response
      responses:
        '200':
          description: Processed file metadata and columns
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  file:
                    type: object
                    properties:
                      key:
                        type: string
                      name:
                        type: string
                      size:
                        type: integer
                      fileHash:
                        type: string
                  columns:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                        enabled:
                          type: boolean
                        description:
                          type: string
                          nullable: true
                  rowCount:
                    type: integer
                  issues:
                    type: object
      security:
      - BearerAuth: []
  /api/data/upload/direct:
    post:
      tags:
      - Upload
      summary: Upload file directly (base64)
      description: Upload a file as base64 in a JSON body. Handles storage and processing in one step. Max 50MB. For larger files, use presign flow or from-url.
      operationId: upload_direct
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - fileName
              - content
              properties:
                fileName:
                  type: string
                  description: File name with extension (e.g. data.csv, dataset.xlsx)
                content:
                  type: string
                  format: byte
                  description: Base64-encoded file content
      responses:
        '200':
          description: Processed file metadata and columns (same as /api/data/upload/finalize)
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  file:
                    type: object
                    properties:
                      key:
                        type: string
                      name:
                        type: string
                      size:
                        type: integer
                      fileHash:
                        type: string
                  columns:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                        enabled:
                          type: boolean
                        description:
                          type: string
                          nullable: true
                  rowCount:
                    type: integer
                  issues:
                    type: object
        '413':
          description: File too large (max 50MB for direct upload)
      security:
      - BearerAuth: []
  /api/data/upload/from-url:
    post:
      tags:
      - Upload
      summary: Upload from URL
      description: Download a file from a URL and process it. Combines presign + upload + finalize in one step. Returns columns and metadata for /api/run-analysis.
      operationId: upload_from_url
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - url
              properties:
                url:
                  type: string
                  format: uri
                  description: Public URL of the dataset to download
      responses:
        '200':
          description: Processed file metadata and columns
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  file:
                    type: object
                    properties:
                      key:
                        type: string
                      name:
                        type: string
                      size:
                        type: integer
                      fileHash:
                        type: string
                  columns:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        type:
                          type: string
                        enabled:
                          type: boolean
                        description:
                          type: string
                          nullable: true
                  rowCount:
                    type: integer
                  issues:
                    type: object
      security:
      - BearerAuth: []