Build agents and integrations with Corhack.
Public API Version 1.0.0 • No Auth Required for Discovery Endpoints
Quickstart with curl
All public API endpoints are unauthenticated and return standard JSON. You can query them directly from the command line or from agent workflows:
# 1. Fetch official site metadata and download links curl -s https://corhack.com/api/v1/site # 2. Check API service health curl -s https://corhack.com/api/v1/health # 3. List evidence-led guides in the Signal Library curl -s https://corhack.com/api/v1/library # 4. Fetch details, takeaways, and citations for a guide curl -s https://corhack.com/api/v1/library/what-testosterone-does
OpenAPI 3.0.3 Specifications
Corhack publishes self-describing OpenAPI 3.0.3 contracts formatted for LLM function calling and automatic client generation:
- /openapi.json — Complete OpenAPI document in standard JSON format.
- /api/openapi.yaml — YAML representation for Swagger/Redoc tooling.
Every operation defines a unique operationId, detailed summary, typed parameters, and structured response schemas.
REST API Reference
/api/v1/siteReturns app description, official store download links, brand boundaries, and canonical discovery URLs.
/api/v1/healthReturns operational availability, version number, and UTC timestamp.
/api/v1/productsReturns product features (Signals, Protocol, Companion Coach) and membership plans.
/api/v1/libraryReturns list of published evidence-led guides with evidence levels, reading times, and summaries.
/api/v1/library/:slugReturns full article data including clinical limits and cited academic sources.
Markdown Content Negotiation (acceptmarkdown.com)
AI agents crawling or consuming Corhack can request raw Markdown directly instead of parsing HTML. Set the HTTP request header:
curl -s -H "Accept: text/markdown" https://corhack.com/how-it-works
All negotiateable responses include the Vary: Accept, Accept-Encoding header to ensure seamless CDN caching.
Official CLI Tool
You can interact with Corhack programmatically using the official command-line tool via npx:
# Run CLI help npx corhack --help # Inspect API health and service status npx corhack status # Retrieve site metadata npx corhack site # List published Signal Library articles npx corhack library # Inspect an article npx corhack library what-testosterone-does # Output raw OpenAPI document npx corhack openapi
Agent Instructions & llms.txt
For autonomous AI agents, we provide machine discovery instructions adhering to the llms.txt standard:
Read /llms.txt or /llms-full.txt to understand when to reach for Corhack (daily lifestyle rhythm tracking and non-clinical health education) and when not to reach for Corhack (clinical diagnosis, emergency care).
