Skip to main content

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

Versioning

The API uses URL-based versioning. The current and only version is v1. All endpoints are served under the /api/v1/ prefix.
When breaking changes are introduced, a new version prefix (e.g., /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 return success: 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 return success: 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 simple curl command:
Search for strains:

Request IDs

Every response includes a unique requestId 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 returns application/json for all standard endpoints. Streaming endpoints (SSE) return text/event-stream. Set your request headers accordingly:

HTTP Methods

Most public-facing endpoints are GET requests. POST is used for operations that require a request body, such as report streaming and label scanning.