Skip to content

API Reference

QubitHub exposes a RESTful JSON API for managing quantum circuits, datasets, spaces, runs, and organizations. All endpoints are prefixed with the base URL.

https://qubithub.co

Most write endpoints require a JWT bearer token. See Authentication for details on obtaining tokens and managing API keys.

Terminal window
curl https://qubithub.co/circuits \
-H "Authorization: Bearer <access_token>"

All responses use JSON. Paginated endpoints return a resource-specific array alongside pagination metadata:

{
"circuits": [...],
"total": 42,
"page": 1,
"pages": 3
}

The array key matches the resource type (circuits, runs, datasets, etc.).

Errors follow a consistent structure:

{
"detail": "Error message here"
}
StatusMeaning
200Success
201Created
204No content (successful delete)
400Bad request (validation error, duplicate name)
401Missing or invalid authentication
403Insufficient permissions or usage limit exceeded
404Resource not found
409Conflict (e.g., fork name already exists)
500Internal server error

All list endpoints support pagination:

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger20Items per page (1-100)

Quantum circuits are the core resource. Each circuit has metadata, versions (file uploads), and social features (star, fork).

GET /circuits

Public endpoint. Returns public circuits with optional filters.

Query parameters:

ParameterTypeDescription
frameworkstringFilter by framework (qiskit, pennylane, cirq, openqasm3)
tagsstring[]Filter by tags (repeatable: ?tags=vqe&tags=optimization)
qubits_minintegerMinimum qubit count
qubits_maxintegerMaximum qubit count
sortstringSort field (default: created_at)
pageintegerPage number
limitintegerItems per page

Example request:

Terminal window
curl "https://qubithub.co/circuits?framework=qiskit&qubits_min=2&limit=10"

Example response (200 OK):

{
"circuits": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "bell-state",
"slug": "bell-state",
"title": "Bell State Circuit",
"description": "Maximally entangled 2-qubit state",
"framework": "qiskit",
"tags": ["entanglement", "foundational"],
"qubits": 2,
"stars_count": 12,
"views_count": 340,
"forks_count": 3,
"runs_count": 87,
"is_starred": null,
"is_public": true,
"created_at": "2026-03-15T10:00:00",
"updated_at": "2026-03-20T14:30:00",
"owner": {
"id": "660e8400-...",
"username": "alice-q",
"name": "Alice Quantum",
"avatar": null
},
"organization": {
"id": "770e8400-...",
"name": "Quantum Research Lab",
"slug": "quantum-research-lab"
},
"forked_from": null
}
],
"total": 42,
"page": 1,
"pages": 5
}
POST /circuits

Requires authentication. Creates circuit metadata — file upload is a separate step.

Request body:

FieldTypeRequiredDescription
namestringYesURL-safe name (lowercase, hyphens)
titlestringYesDisplay title
descriptionstringNoCircuit description
frameworkstringYesqiskit, pennylane, cirq, or openqasm3
tagsstring[]NoTags for discovery
qubitsintegerNoNumber of qubits (default: 0)
gatesstring[]NoGate names used (e.g., ["H", "CX", "RY"])
depthintegerNoCircuit depth
is_publicbooleanNoPublic visibility (default: true)
organization_namestringNoOrg slug to create under (default: personal)
extra_metadataobjectNoArbitrary metadata

Example request:

Terminal window
curl -X POST https://qubithub.co/circuits \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "grover-search",
"title": "Grover Search Algorithm",
"description": "Quadratic speedup for unstructured search",
"framework": "qiskit",
"tags": ["search", "algorithm", "oracle"],
"qubits": 4,
"gates": ["H", "X", "CX", "CCX"],
"depth": 12
}'

Example response (201 Created):

{
"id": "880e8400-e29b-41d4-a716-446655440000",
"name": "grover-search",
"slug": "grover-search",
"title": "Grover Search Algorithm",
"description": "Quadratic speedup for unstructured search",
"framework": "qiskit",
"tags": ["search", "algorithm", "oracle"],
"qubits": 4,
"gates": ["H", "X", "CX", "CCX"],
"depth": 12,
"stars_count": 0,
"views_count": 0,
"forks_count": 0,
"runs_count": 0,
"is_public": true,
"owner": { "id": "...", "username": "alice-q", "name": "Alice Quantum" },
"organization": null,
"versions": [],
"latest_version": null,
"created_at": "2026-03-28T10:00:00",
"updated_at": "2026-03-28T10:00:00"
}

Errors:

StatusCause
400Circuit name already exists for this user/org
403Usage limit exceeded or not a member of the specified organization
GET /circuits/resolve?repo_name={org/circuit-name}

Look up a circuit by its full repository name (e.g., alice-q/bell-state or quantum-lab/grover-search).

Example request:

Terminal window
curl "https://qubithub.co/circuits/resolve?repo_name=alice-q/bell-state" \
-H "Authorization: Bearer <access_token>"
GET /circuits/{circuit_id}

Returns full circuit details including all versions. Public circuits are accessible without authentication.

Example request:

Terminal window
curl https://qubithub.co/circuits/550e8400-e29b-41d4-a716-446655440000

Example response (200 OK):

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "bell-state",
"slug": "bell-state",
"title": "Bell State Circuit",
"framework": "qiskit",
"tags": ["entanglement"],
"qubits": 2,
"gates": ["H", "CX"],
"depth": 2,
"stars_count": 12,
"views_count": 341,
"forks_count": 3,
"runs_count": 87,
"is_starred": false,
"is_public": true,
"owner": { "id": "...", "username": "alice-q", "name": "Alice Quantum" },
"organization": null,
"forked_from": null,
"extra_metadata": null,
"versions": [
{
"id": "990e8400-...",
"circuit_id": "550e8400-...",
"version_number": 1,
"commit_hash": "a1b2c3d4",
"file_path": "circuits/550e8400.../v1/circuit.py",
"file_size": 1234,
"commit_message": "Initial upload",
"created_at": "2026-03-15T10:05:00"
}
],
"latest_version": {
"id": "990e8400-...",
"version_number": 1,
"commit_hash": "a1b2c3d4",
"file_path": "circuits/550e8400.../v1/circuit.py",
"file_size": 1234
},
"created_at": "2026-03-15T10:00:00",
"updated_at": "2026-03-20T14:30:00"
}
PUT /circuits/{circuit_id}

Requires authentication and ownership.

Request body (all fields optional):

FieldTypeDescription
titlestringDisplay title
descriptionstringCircuit description
tagsstring[]Tags
is_publicbooleanVisibility
extra_metadataobjectArbitrary metadata

Example request:

Terminal window
curl -X PUT https://qubithub.co/circuits/550e8400-... \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"description": "Updated description with better explanation",
"tags": ["entanglement", "foundational", "bell"]
}'
DELETE /circuits/{circuit_id}

Requires authentication and ownership. Returns 204 No Content.

Terminal window
curl -X DELETE https://qubithub.co/circuits/550e8400-... \
-H "Authorization: Bearer <access_token>"
POST /circuits/{circuit_id}/star

Toggle star on a circuit. Requires authentication. Rate limited to 30 actions/minute.

Example response (200 OK):

{
"starred": true,
"stars_count": 13
}
POST /circuits/{circuit_id}/fork

Fork a circuit to your personal workspace. Requires authentication. Rate limited to 5 forks/minute.

Request body (optional):

{
"name": "my-custom-fork-name"
}

Returns the forked circuit as a CircuitDetailResponse.

Errors:

StatusCause
409Fork name already exists
403Storage quota exceeded
POST /circuits/{circuit_id}/upload

Upload a single file to create a new version. Requires authentication and ownership. The file is sent as multipart/form-data; the commit message is a query parameter.

Parameters:

ParameterInTypeRequiredDescription
filebody (multipart)fileYesThe circuit file
commit_messagequerystringNoVersion commit message

Example request:

Terminal window
curl -X POST "https://qubithub.co/circuits/550e8400-.../upload?commit_message=Add+parameterized+rotation+gates" \
-H "Authorization: Bearer <access_token>" \
-F "file=@circuit.py"
POST /circuits/{circuit_id}/upload-batch

Upload multiple files at once (README.md, circuit.py, qubithub.toml, etc.). Same auth requirements as single upload.

GET /circuits/{circuit_id}/files

Returns file listing for all versions of a circuit.

GET /circuits/{circuit_id}/runs

Returns execution runs for a specific circuit. See Runs for response format.


Runs represent quantum circuit executions. A run is created in PENDING status and executed asynchronously via the Dagster pipeline.

StatusDescription
pendingCreated, awaiting execution
queuedQueued in execution pipeline
runningCurrently executing
completedFinished successfully
failedExecution failed
cancelledCancelled by user
POST /runs

Requires authentication. Creates a new run and triggers execution.

Request body:

FieldTypeRequiredDescription
circuit_idUUIDYesCircuit to execute
backend_typestringNosimulation, emulation, or hardware (default: simulation)
backend_namestringNoBackend name (default: qiskit_aer)
shotsintegerNoNumber of measurement shots, 1-100000 (default: 1024)
parametersobjectNoCircuit parameters (e.g., {"theta": 0.785})

Example request:

Terminal window
curl -X POST https://qubithub.co/runs \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"circuit_id": "550e8400-e29b-41d4-a716-446655440000",
"backend_type": "simulation",
"backend_name": "qiskit_aer",
"shots": 1024,
"parameters": {"theta": 0.785398}
}'

Example response (201 Created):

{
"id": "aa0e8400-e29b-41d4-a716-446655440000",
"circuit_id": "550e8400-e29b-41d4-a716-446655440000",
"circuit_version_id": null,
"user_id": "660e8400-...",
"backend_type": "simulation",
"backend_name": "qiskit_aer",
"status": "pending",
"shots": 1024,
"parameters": {"theta": 0.785398},
"results": null,
"metrics": null,
"error_message": null,
"created_at": "2026-03-28T10:00:00",
"started_at": null,
"completed_at": null
}

Errors:

StatusCause
404Circuit not found
403Access denied to private circuit, or usage limit exceeded
GET /runs

Requires authentication. Returns the current user’s runs.

Query parameters:

ParameterTypeDescription
statusstringFilter by status (pending, queued, running, completed, failed, cancelled)
circuit_idUUIDFilter by circuit
pageintegerPage number
limitintegerItems per page

Example request:

Terminal window
curl "https://qubithub.co/runs?status=completed&limit=5" \
-H "Authorization: Bearer <access_token>"

Example response (200 OK):

{
"runs": [
{
"id": "aa0e8400-...",
"circuit_id": "550e8400-...",
"circuit_name": "alice-q/bell-state",
"backend_type": "simulation",
"backend_name": "qiskit_aer",
"status": "completed",
"shots": 1024,
"created_at": "2026-03-28T10:00:00",
"completed_at": "2026-03-28T10:00:12"
}
],
"total": 42,
"page": 1,
"pages": 9
}
GET /runs/{run_id}

Returns full run details including results and metrics. Accessible to the run owner or anyone if the circuit is public.

Example response (200 OK) — completed run:

{
"id": "aa0e8400-...",
"circuit_id": "550e8400-...",
"circuit_version_id": "990e8400-...",
"user_id": "660e8400-...",
"backend_type": "simulation",
"backend_name": "qiskit_aer",
"status": "completed",
"shots": 1024,
"parameters": {"theta": 0.785398},
"results": {
"counts": {"00": 502, "11": 522},
"statevector": null
},
"metrics": {
"execution_time_ms": 1234,
"transpilation_time_ms": 56
},
"error_message": null,
"created_at": "2026-03-28T10:00:00",
"started_at": "2026-03-28T10:00:01",
"completed_at": "2026-03-28T10:00:12"
}
DELETE /runs/{run_id}

Requires authentication and ownership. Returns 204 No Content.

  • Active runs (pending/queued/running): Cancels execution, marks as cancelled
  • Terminal runs (completed/failed/cancelled): Deletes the record
GET /runs/users/me/stats

Requires authentication.

Example response (200 OK):

{
"total_runs": 42,
"pending_runs": 0,
"queued_runs": 0,
"running_runs": 1,
"completed_runs": 38,
"failed_runs": 3,
"cancelled_runs": 0,
"total_shots": 42368,
"total_execution_time": 525.0,
"avg_execution_time": 12.5,
"success_rate": 90.5
}
GET /runs/circuits/{circuit_id}/stats

Returns aggregated run statistics for a specific circuit. Same response format as user stats.


Quantum datasets for training, benchmarking, and research. Supports versioned file uploads with preview and statistics.

GET /datasets

Public endpoint. Returns public datasets with optional filters.

Query parameters:

ParameterTypeDescription
formatstringFilter by format (csv, npy, hdf5, json, parquet)
tagsstring[]Filter by tags
task_categoriesstring[]Filter by task category
sortstringSort field (default: created_at)
pageintegerPage number
limitintegerItems per page

Example request:

Terminal window
curl "https://qubithub.co/datasets?format=csv&tags=qml"
POST /datasets

Requires authentication. Creates dataset metadata — file upload happens via the versions endpoint.

Request body:

FieldTypeRequiredDescription
namestringYesURL-safe name
titlestringYesDisplay title
descriptionstringNoDataset description
formatstringYesData format (csv, npy, hdf5, json, parquet)
tagsstring[]NoTags for discovery
task_categoriesstring[]NoML task categories
licensestringNoLicense identifier
citationstringNoCitation string
is_publicbooleanNoPublic visibility (default: true)
organization_namestringNoOrg slug to create under

Example request:

Terminal window
curl -X POST https://qubithub.co/datasets \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "quantum-state-tomography",
"title": "Quantum State Tomography Dataset",
"description": "10K measurements from 2-qubit state tomography experiments",
"format": "csv",
"tags": ["tomography", "measurement"],
"task_categories": ["classification"],
"license": "CC-BY-4.0"
}'
GET /datasets/{dataset_id}

Returns full dataset details including all versions.

PUT /datasets/{dataset_id}

Requires authentication and ownership. Accepts partial updates.

DELETE /datasets/{dataset_id}

Requires authentication and ownership. Returns 204 No Content.

POST /datasets/{dataset_id}/star

Toggle star. Requires authentication. Rate limited to 30/minute.

Response:

{
"starred": true,
"stars_count": 5
}
POST /datasets/{dataset_id}/fork

Fork a dataset to your workspace. Requires authentication. Rate limited to 5/minute.

Request body (optional):

{
"name": "my-fork-name"
}
POST /datasets/{dataset_id}/versions

Upload a new version of the dataset file. The file is sent as multipart/form-data; the commit message is a query parameter.

Parameters:

ParameterInTypeRequiredDescription
filebody (multipart)fileYesThe dataset file
commit_messagequerystringNoVersion description

Example request:

Terminal window
curl -X POST "https://qubithub.co/datasets/550e8400-.../versions?commit_message=Add+5000+new+measurements" \
-H "Authorization: Bearer <access_token>" \
-F "file=@data.csv"
GET /datasets/{dataset_id}/preview?rows=100

Returns a preview of the first N rows (1-1000).

Example response (200 OK):

{
"columns": ["qubit_0", "qubit_1", "label"],
"rows": [
[0.707, 0.293, "bell"],
[0.500, 0.500, "ghz"]
],
"total_rows": 10000,
"dataset_schema": {
"qubit_0": "float64",
"qubit_1": "float64",
"label": "string"
}
}
GET /datasets/{dataset_id}/stats

Returns aggregate counts for the dataset.

Example response (200 OK):

{
"downloads_count": 142,
"stars_count": 8,
"forks_count": 2,
"size_bytes": 1048576
}
GET /datasets/{dataset_id}/download

Downloads the latest version as a file. Increments the download counter.


Interactive code environments for running quantum experiments. Each space contains files and supports live execution with circuit visualization.

GET /spaces

Public endpoint.

Query parameters:

ParameterTypeDescription
sdkstringFilter by SDK
space_typestringFilter by type
sortstringSort field (default: created_at)
pageintegerPage number
limitintegerItems per page
POST /spaces

Requires authentication.

Request body:

FieldTypeRequiredDescription
namestringYesURL-safe name
titlestringYesDisplay title
descriptionstringNoSpace description
sdkstringNoqiskit, pennylane, or cirq (default: qiskit)
space_typestringNonotebook, app, or demo (default: notebook)
is_publicbooleanNoPublic visibility (default: true)
organization_namestringNoOrg slug to create under
GET /spaces/{space_id}

Returns the space with all its files.

PUT /spaces/{space_id}

Requires authentication and ownership.

DELETE /spaces/{space_id}

Requires authentication and ownership. Returns 204 No Content.

POST /spaces/{space_id}/fork

Fork a space to your workspace. Requires authentication. Rate limited to 5/minute.

POST /spaces/{space_id}/star

Toggle star. Requires authentication. Rate limited to 30/minute.

Create a file:

POST /spaces/{space_id}/files

Update a file:

PUT /spaces/files/{file_id}

Delete a file:

DELETE /spaces/files/{file_id}

All file operations require authentication and space ownership.

POST /spaces/{space_id}/execute

Execute Python code in a sandboxed environment. Requires authentication and space ownership. The code runs in an isolated Docker container with no network access.

Request body:

FieldTypeRequiredDescription
codestringNoPython code to execute (provide this or file_to_run)
file_to_runstringNoFilename from space to execute instead of inline code
timeoutintegerNoExecution timeout in seconds (1-300, default: 30)

Example request:

Terminal window
curl -X POST https://qubithub.co/spaces/550e8400-.../execute \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"code": "from qiskit import QuantumCircuit\nqc = QuantumCircuit(2)\nqc.h(0)\nqc.cx(0, 1)\nprint(qc)"
}'

Example response (200 OK):

{
"status": "success",
"output": " ┌───┐ \nq_0: ┤ H ├──■──\n └───┘┌─┴─┐\nq_1: ─────┤ X ├\n └───┘",
"error": null,
"execution_time": 1.23
}
POST /spaces/{space_id}/visualize

Generate a circuit diagram from code. Requires authentication.

Request body:

FieldTypeRequiredDescription
codestringNoPython code that creates a circuit (provide this or file_to_visualize)
file_to_visualizestringNoFilename from space to visualize
frameworkstringNoqiskit, pennylane, or cirq (auto-detected if omitted)

Example response (200 OK):

{
"status": "success",
"diagram": "PHN2ZyB4bWxucz0iaHR0cDov...",
"framework": "qiskit",
"format": "svg",
"error": null
}

The diagram field contains a base64-encoded SVG string. Decode it to render the circuit diagram.


Organizations group users and resources. Every user has a personal organization created at registration.

GET /orgs/{slug}/profile

Public endpoint. Returns organization info with aggregate stats.

Example request:

Terminal window
curl https://qubithub.co/orgs/quantum-research-lab/profile

Example response (200 OK):

{
"id": "770e8400-...",
"name": "Quantum Research Lab",
"slug": "quantum-research-lab",
"description": "Open quantum computing research",
"avatar_url": null,
"created_at": "2026-03-01T10:00:00",
"circuit_count": 15,
"dataset_count": 3,
"space_count": 5,
"member_count": 4
}
GET /orgs/{slug}/circuits

Public endpoint. Returns the organization’s public circuits.

Query parameters: page, limit, sort

GET /orgs/{slug}/datasets

Public endpoint. Returns the organization’s public datasets.

GET /orgs/{slug}/spaces

Public endpoint. Returns the organization’s public spaces.

GET /orgs/{slug}/public-members

Public endpoint. Returns members without email addresses.

Example response (200 OK):

[
{
"username": "alice-q",
"full_name": "Alice Quantum",
"avatar": null,
"role": "owner"
}
]
GET /orgs/{org_id}/members

Requires authentication and organization membership. Returns full member details including emails.

POST /orgs/{org_id}/members

Requires admin or owner role.

Request body:

FieldTypeRequiredDescription
emailstringYesEmail of user to add
rolestringNomember (default), admin, or owner
PATCH /orgs/{org_id}/members/{user_id}

Requires owner role.

Request body:

{
"role": "admin"
}
DELETE /orgs/{org_id}/members/{user_id}

Requires admin or owner role. Returns 204 No Content. Cannot remove the last owner.

GET /orgs/{org_id}/keys
POST /orgs/{org_id}/keys
DELETE /orgs/{org_id}/keys/{key_id}

Manage API keys scoped to an organization. Requires membership (GET) or admin/owner role (POST, DELETE).


GET /files/{file_path}

Download a circuit file from storage. The file_path is returned by GET /circuits/{circuit_id}/files. Only serves files from public circuits. Supports circuit artifacts: circuit.py, README.md, qubithub.toml, and metadata.json.


Static registry of available quantum backends.

GET /backends

Public endpoint. Returns available simulation and hardware backends.

GET /backends/{backend_id}/calibration/latest

Returns the latest calibration data for a hardware backend.


Quantum benchmarking suites for comparing circuit performance.

GET /benchmarks/suites
GET /benchmarks/suites/{suite_name}
GET /benchmarks/leaderboard/{suite_name}/{problem_id}
GET /benchmarks/leaderboard/{suite_name}/{problem_id}/my-rank

Requires authentication.

GET /benchmarks/leaderboard/featured
POST /benchmarks/run

Requires authentication with runs:submit scope.

Query parameters:

ParameterTypeRequiredDescription
suite_namestringYesBenchmark suite to run
problem_idxintegerNoProblem index within the suite (default: 0)
circuit_idxintegerNoCircuit index within the suite (default: 0)
backendstringNoSpecific backend to test (default: all backends in suite)

WS /ws/runs/{run_id}
WS /ws/runs/{run_id}/subscribe

Subscribe to real-time execution updates for a run. Both paths provide the same functionality. Messages are JSON with the current status, results, and metrics as they become available.

Example (JavaScript):

const ws = new WebSocket("wss://qubithub.co/ws/runs/aa0e8400-...");
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log(`Status: ${data.status}`);
if (data.status === "completed") {
console.log("Results:", data.results);
ws.close();
}
};

import requests
BASE_URL = "https://qubithub.co"
# Login
auth = requests.post(f"{BASE_URL}/auth/login", json={
"email": "alice@example.com",
"password": "Qu4ntum!Leap#42",
})
token = auth.json()["access_token"]
headers = {"Authorization": f"Bearer {token}"}
# Find a circuit
circuits = requests.get(f"{BASE_URL}/circuits", params={
"framework": "qiskit",
"tags": ["entanglement"],
"limit": 5,
}).json()
circuit_id = circuits["circuits"][0]["id"]
print(f"Found: {circuits['circuits'][0]['title']}")
# Execute it
run = requests.post(f"{BASE_URL}/runs", headers=headers, json={
"circuit_id": circuit_id,
"backend_type": "simulation",
"backend_name": "qiskit_aer",
"shots": 1024,
}).json()
print(f"Run {run['id']} — status: {run['status']}")
# Poll for results
import time
while True:
result = requests.get(f"{BASE_URL}/runs/{run['id']}", headers=headers).json()
if result["status"] in ("completed", "failed"):
break
time.sleep(2)
if result["status"] == "completed":
print("Results:", result["results"])
else:
print("Error:", result["error_message"])
import requests
BASE_URL = "https://qubithub.co"
headers = {"Authorization": "Bearer <access_token>"}
# Create circuit metadata
circuit = requests.post(f"{BASE_URL}/circuits", headers=headers, json={
"name": "my-vqe-ansatz",
"title": "VQE Ansatz for H2",
"framework": "qiskit",
"tags": ["vqe", "chemistry", "variational"],
"qubits": 4,
"gates": ["RY", "CX"],
}).json()
circuit_id = circuit["id"]
# Upload circuit file
with open("circuit.py", "rb") as f:
requests.post(
f"{BASE_URL}/circuits/{circuit_id}/upload",
headers=headers,
files={"file": f},
params={"commit_message": "Initial VQE ansatz implementation"},
)
print(f"Circuit uploaded: {circuit['name']}")
import requests
BASE_URL = "https://qubithub.co"
headers = {"Authorization": "Bearer <access_token>"}
# Create a dataset
dataset = requests.post(f"{BASE_URL}/datasets", headers=headers, json={
"name": "h2-energy-landscape",
"title": "H2 Energy Landscape",
"format": "csv",
"tags": ["chemistry", "vqe"],
"task_categories": ["regression"],
}).json()
# Upload data file
with open("data.csv", "rb") as f:
requests.post(
f"{BASE_URL}/datasets/{dataset['id']}/versions",
headers=headers,
files={"file": f},
params={"commit_message": "Initial dataset with 10K bond distances"},
)
# Preview the dataset
preview = requests.get(
f"{BASE_URL}/datasets/{dataset['id']}/preview",
params={"rows": 5},
).json()
print(f"Columns: {preview['columns']}")
print(f"Total rows: {preview['total_rows']}")

ResourceLimit
API requests60/min (Free), 600/min (Pro)
Star actions30/min per user
Fork actions5/min per user

When you exceed a rate limit, the API returns 429 Too Many Requests. Back off and retry after a short delay.