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.
openapi: 3.2.0
info:
title: Disco API Keys 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: API Keys
paths:
/api/api-keys:
get:
tags:
- API Keys
summary: List API keys
description: List all API keys for the current user. Key values are not returned — only metadata.
operationId: list_api_keys
responses:
'200':
description: Successful Response
content:
application/json:
schema:
items:
$ref: '#/components/schemas/ApiKeyInfo'
type: array
title: Response List Api Keys V1 Api Keys Get
/api/api-keys/{key_id}:
delete:
tags:
- API Keys
summary: Delete API key
description: Permanently revoke an API key. This action cannot be undone.
operationId: delete_api_key
parameters:
- name: key_id
in: path
required: true
schema:
type: string
format: uuid
description: The ID of the API key to delete
title: Key Id
description: The ID of the API key to delete
responses:
'204':
description: Successful Response
'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
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ApiKeyInfo:
properties:
id:
type: string
title: Id
description: API key UUID
name:
type: string
title: Name
description: Key name
created_at:
type: string
format: date-time
title: Created At
description: When the key was created
expires_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Expires At
description: When the key expires (null = never)
last_used_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Last Used At
description: Last time this key was used
type: object
required:
- id
- name
- created_at
- expires_at
- last_used_at
title: ApiKeyInfo