Overview
The High IQ API is a RESTful JSON API built on Hono and deployed to Vercel Edge Functions. It provides access to cannabis strain data, AI-powered report generation, label scanning, and research intelligence. All endpoints are prefixed with/api/v1/ and return consistent JSON response envelopes.
Base URL
- Production
- Local Development
Versioning
The API uses URL-based versioning. The current and only version isv1. All endpoints are served under the /api/v1/ prefix.
/api/v2/) will be added while maintaining backward compatibility on existing versions.
Response Format
Every API response follows a consistent envelope format, making it predictable to parse on the client side.Success Response
All successful responses returnsuccess: true with a data field containing the response payload and an optional meta field for pagination and request metadata.
Success Response with Pagination
List endpoints include pagination metadata when applicable.Error Response
All error responses returnsuccess: false with a structured error object containing a machine-readable code and a human-readable message.
TypeScript Interfaces
The API response types are defined in TypeScript for type-safe client consumption.Quick Start
Fetch a strain by slug with a simplecurl command:
Request IDs
Every response includes a uniquerequestId in the meta object. Include this ID when reporting issues or debugging unexpected behavior. The request ID is generated server-side and is consistent across the entire request lifecycle.
Stack traces in error responses are only included in non-production environments. Production errors return structured codes and messages without exposing internal details.
Content Type
The API accepts and returnsapplication/json for all standard endpoints. Streaming endpoints (SSE) return text/event-stream. Set your request headers accordingly:
HTTP Methods
| Method | Usage |
|---|---|
GET | Read resources (strains, search, cache stats) |
POST | Create resources, trigger operations (reports, scans, submissions) |
PUT | Full resource replacement (rare) |
PATCH | Partial resource updates |
DELETE | Remove resources |
GET requests. POST is used for operations that require a request body, such as report streaming and label scanning.