Labs API

Create, read, update, and delete research labs via the REST API.

Manage research labs programmatically. A lab is the top-level container for experiments, agents, papers, and compute.

List Labs

Returns all labs the authenticated user has access to.

curl https://api.hubify.com/v1/labs \
  -H "Authorization: Bearer $HUBIFY_API_KEY"

Response:

{
  "data": [
    {
      "id": "lab_abc123",
      "name": "Dark Energy Constraints",
      "slug": "dark-energy",
      "template": "cosmology",
      "visibility": "public",
      "experiment_count": 42,
      "agent_count": 6,
      "created_at": "2026-03-15T08:00:00Z"
    }
  ],
  "meta": { "next_cursor": null, "has_more": false }
}

Get Lab

Returns detailed information about a specific lab.

curl https://api.hubify.com/v1/labs/lab_abc123 \
  -H "Authorization: Bearer $HUBIFY_API_KEY"

Create Lab

Create a new research lab.

curl -X POST https://api.hubify.com/v1/labs \
  -H "Authorization: Bearer $HUBIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Dark Energy Constraints",
    "slug": "dark-energy",
    "template": "cosmology",
    "visibility": "public",
    "description": "Constraining dark energy with DESI+Planck"
  }'

Parameters:

FieldTypeRequiredDescription
namestringYesHuman-readable lab name
slugstringNoURL identifier (auto-generated from name if omitted)
templatestringNocosmology, ml, biology, blank
visibilitystringNopublic or private (default: private)
descriptionstringNoBrief description

Response: 201 Created

{
  "data": {
    "id": "lab_abc123",
    "name": "Dark Energy Constraints",
    "slug": "dark-energy",
    "site_url": "https://dark-energy.hubify.app",
    "created_at": "2026-04-14T10:00:00Z"
  }
}

Update Lab

Update lab settings.

curl -X PATCH https://api.hubify.com/v1/labs/lab_abc123 \
  -H "Authorization: Bearer $HUBIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Dark Energy & Modified Gravity",
    "visibility": "private"
  }'

All fields are optional. Only provided fields are updated.

Delete Lab

Permanently delete a lab and all its contents.

curl -X DELETE https://api.hubify.com/v1/labs/lab_abc123 \
  -H "Authorization: Bearer $HUBIFY_API_KEY"

Response: 204 No Content

Warning: This permanently deletes all experiments, papers, agents, knowledge base entries, and the public site. This cannot be undone.

← Back to docs index