Skip to main content

API Reference

The ColabHive Builder API lets you import any model from HuggingFace, use the curated base catalog, train and merge your own models, and run inference — all over one HTTP API.

Two things are true at once:

  1. Import any HuggingFace model. POST /models/hf/searchGET /models/hf/{repo_id}/infoPOST /models/hf/register. Registering creates a model_config + an inference_endpoint, and the model becomes callable (first request triggers a cold start). See Models API.
  2. Use the curated base catalog. LLMs, specialists, tools, generative models, and trainable templates maintained by ColabHive. Discover them live — never hardcode a list — via GET /api/builder/v1/actions or GET /api/builder/v1/endpoints?visibility=public.

The catalog is data-driven and changes over time. This reference documents the contracts; for the current set of models and endpoints, always query the live discovery endpoints below.


Base URL

https://api.colabhive.com
  • Builder API is mounted under /api/builder/v1 — e.g. https://api.colabhive.com/api/builder/v1/endpoints.
  • OpenAI-compatible API is mounted under /v1 — e.g. https://api.colabhive.com/v1/chat/completions.

Protected requests authenticate with an API key. Public discovery and health exceptions are marked below and in the live OpenAPI document. See Authentication.


Endpoints

Discovery (no list is hardcoded)

EndpointPurpose
GET /api/builder/v1/inference/modelsAll models available for inference (base + registered), optionally with readiness. No auth.
GET /api/builder/v1/endpointsInference endpoints, filterable by source (catalog vs trained), owner, base_model, visibility, task_type, search.
GET /api/builder/v1/actionsAuthenticated, account-aware view for plugins and agents (LLMs, specialists, tools, trained, generative).
GET /api/builder/v1/capabilitiesSupported capability types.

Reference pages

  • Authentication — API keys (hive_…), headers, account context.
  • Datasets — upload and manage training datasets.
  • Training — create, monitor, and manage training runs.
  • Merge & Retrain — merge models/adapters, retrain-on-top, lineage, rename.
  • Models — trained-model catalog, HuggingFace import, model registry, capabilities.
  • Inference — run predictions on endpoints (sync/async), readiness, binary/multimodal I/O.
  • OpenAI-Compatible APIPOST /v1/chat/completions drop-in for OpenAI clients.
  • Actions — discover and invoke any capability by slug (n8n, Zapier, MCP, LangChain).
  • Quick Reference — the shortest path to a first request.
  • Agent & LLM Integration — machine-readable resources, readiness-aware routing.
  • Outbound Webhooks — private-preview terminal notifications for inference, Actions/MCP invocations, training runs, and merges.

Full endpoint index

Every route the gateway exposes. The Builder API is under /api/builder/v1; the OpenAI-compatible surface is under /v1. This mirrors the live openapi.json.

MethodPathReference
GET/api/builder/v1/capabilitiesModels → Capabilities
GET/api/builder/v1/healthService health
GET/api/builder/v1/inference/healthInference service health
POST/api/builder/v1/models/hf/searchModels → HF search
GET/api/builder/v1/models/hf/{repo_id}/infoModels → HF info
POST/api/builder/v1/models/hf/registerModels → HF register
GET/api/builder/v1/models/registryModels → List registry
PATCH/api/builder/v1/models/registry/{model_config_id}/lifecycleModels → Update lifecycle
POST GET/api/builder/v1/modelsModels → Trained models
GET/api/builder/v1/models/{model_id}Models → Get model
GET/api/builder/v1/models/{model_id}/versionsModels → List versions
GET/api/builder/v1/models/{model_id}/lineageMerge & Retrain → Lineage
PATCH/api/builder/v1/models/{model_id}/versions/{version_id}Merge & Retrain → Rename
POST GET/api/builder/v1/datasetsDatasets
POST/api/builder/v1/datasets/uploadDatasets → Direct upload
GET DELETE/api/builder/v1/datasets/{dataset_id}Datasets
POST/api/builder/v1/datasets/{dataset_id}/uploads/initDatasets → Multipart
POST/api/builder/v1/datasets/{dataset_id}/uploads/{upload_id}/commitDatasets → Multipart
POST GET/api/builder/v1/training/runsTraining
GET DELETE/api/builder/v1/training/runs/{run_id}Training → Get run
GET/api/builder/v1/training/runs/{run_id}/logsTraining → Logs
GET/api/builder/v1/training/runs/{run_id}/metricsTraining → Metrics
GET/api/builder/v1/training/runs/{run_id}/eventsTraining → Events
GET/api/builder/v1/training/runs/{run_id}/artifactsTraining → Artifacts
GET/api/builder/v1/training/runs/{run_id}/artifacts/download-urlsTraining → Download URLs
POST/api/builder/v1/training/runs/{run_id}/cancelTraining → Cancel
POST/api/builder/v1/training/runs/{run_id}/register-for-inferenceTraining → Register
POST/api/builder/v1/training/mergesMerge & Retrain → Merge
GET/api/builder/v1/training/model-configsTraining → Model configs
GET/api/builder/v1/training/model-configs/{model_id}Training → Get config
GET/api/builder/v1/training/model-configs/{model_id}/schemaTraining → Config schema
GET/api/builder/v1/inference/modelsInference → List models
GET/api/builder/v1/endpointsInference → List endpoints
GET DELETE/api/builder/v1/endpoints/{endpoint_id}Inference → Get/Delete
POST/api/builder/v1/endpoints/{endpoint_id}/inferInference → Predictions
POST/api/builder/v1/endpoints/{endpoint_id}/infer:asyncInference — HTTP 202 + task_id
POST/api/builder/v1/endpoints/{endpoint_id}/upload-inputInference → Binary input
GET/api/builder/v1/tasks/{task_id}Inference → Poll task
GET/api/builder/v1/queue/statsInference → Queue stats
GET/api/builder/v1/actionsActions → Discover
GET/api/builder/v1/actions/{slug}Actions → Detail
POST/api/builder/v1/actions/{slug}:invokeActions → Invoke
GET/api/builder/v1/invocations/{invocation_id}Actions → Poll
GET/api/builder/v1/mcp/manifest · /mcp/manifest/{slug}MCP Tools Reference
POST/v1/chat/completionsOpenAI-Compatible API
GET/v1/modelsOpenAI-Compatible API
GET/v1/models/{model}OpenAI-Compatible API

Token-by-token streaming lives here: POST /v1/chat/completions with "stream": true returns real SSE and works with unmodified OpenAI clients. There is no :stream route on the typed inference surface.

Private-preview candidate routes

The feature-on candidate adds only the four route patterns below. They are intentionally absent from the default published openapi.json and are not a claim of live availability.

MethodsPathReference
POST GET/api/builder/v1/webhook-endpointsOutbound Webhooks
GET PATCH DELETE/api/builder/v1/webhook-endpoints/{endpoint_id}Outbound Webhooks
POST/api/builder/v1/webhook-endpoints/{endpoint_id}/rotate-secretOutbound Webhooks
POST/api/builder/v1/webhook-endpoints/{endpoint_id}/testOutbound Webhooks

Machine-readable specs

ResourceURL
OpenAPI 3.1/openapi.json
Swagger UIapi.colabhive.com/api/builder/v1/docs
ReDocapi.colabhive.com/api/builder/v1/redoc
llm.txt / llms-full.txt/llm.txt · /llms-full.txt

The published openapi.json is regenerated from the live gateway and reflects the real routes, including /v1/chat/completions and /api/builder/v1/training/merges.

Response-schema limitation

Runtime errors use the stable error.code, error.message, error.details, and error.request_id envelope. The generated OpenAPI still describes validation errors with FastAPI's legacy HTTPValidationError schema and many success responses as untyped objects. Until those generated schemas are corrected in the gateway, treat the runtime examples in this reference as authoritative for response bodies; do not generate strict response clients from those incomplete schemas.


Python SDK

pip install colabhive
from colabhive import ColabHive

client = ColabHive(
api_key="hive_...", # or set COLABHIVE_API_KEY
account_id="your_account_id" # optional; auto-detected from the key
)

The base URL defaults to https://api.colabhive.com (override with COLABHIVE_BASE_URL or the base_url= argument). See the SDK Reference for the full surface.