API Overview
REST API overview — base URL, versioning, authentication, rate limits, and conventions.
The Hubify Labs REST API provides programmatic access to labs, experiments, agents, papers, tasks, and compute resources.
Base URL
https://api.hubify.com/v1
All endpoints are prefixed with /v1. When a new API version is released, existing versions remain supported for at least 12 months.
Authentication
Every request requires an Authorization header with either an API key or a Clerk JWT:
# API key
curl https://api.hubify.com/v1/labs \
-H "Authorization: Bearer hfy_key_abc123..."
# Clerk JWT
curl https://api.hubify.com/v1/labs \
-H "Authorization: Bearer eyJhbGciOiJS..."
See Authentication for details on obtaining credentials.
Request Format
- Content-Type:
application/jsonfor all request bodies - Method conventions:
GET(read),POST(create),PATCH(update),DELETE(remove) - IDs: String identifiers (e.g.,
lab_abc123,exp_054)
Response Format
All responses return JSON with a consistent structure:
{
"data": { ... },
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-04-14T10:42:01Z"
}
}
Error responses include a machine-readable code and human-readable message:
{
"error": {
"code": "not_found",
"message": "Experiment EXP-999 does not exist.",
"status": 404
}
}
Pagination
List endpoints support cursor-based pagination:
GET /v1/experiments?limit=20&cursor=exp_040
| Parameter | Default | Description |
|---|---|---|
limit | 20 | Items per page (max 100) |
cursor | — | Cursor from previous response |
Paginated responses include a next_cursor field:
{
"data": [ ... ],
"meta": {
"next_cursor": "exp_020",
"has_more": true
}
}
Rate Limits
| Plan | Requests/min | Requests/day |
|---|---|---|
| Free | 60 | 1,000 |
| Pro | 300 | 50,000 |
| Team | 1,000 | 500,000 |
Rate limit headers are included in every response:
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 298
X-RateLimit-Reset: 1713091200
Error Codes
| Code | Status | Description |
|---|---|---|
unauthorized | 401 | Missing or invalid authentication |
forbidden | 403 | Insufficient permissions |
not_found | 404 | Resource does not exist |
validation_error | 422 | Invalid request body |
rate_limited | 429 | Too many requests |
server_error | 500 | Internal server error |
SDKs
Official SDKs are available for common languages:
# Node.js / TypeScript
npm install @hubify/sdk
# Python
pip install hubify
const client = new Hubify({ apiKey: process.env.HUBIFY_API_KEY });
const labs = await client.labs.list();