Welcome to the HeHo API. Integrate AI-powered backend services and autonomous data management into your applications.
Get your API key from the Settings page.
Authorization: Bearer YOUR_HEHO_API_KEYWarning
Your API key is a secret! Do not share it publicly or commit it to version control.
curl -X POST https://heho.vercel.app/api/verify-user \
-H "Authorization: Bearer YOUR_HEHO_API_KEY"Request Body (JSON)
| Field | Type | Description |
|---|---|---|
chatbotId | string | The unique ID of your chatbot. Find this on the chatbot's settings page. |
messages | array | An array of new message objects. |
history | array (optional) | An array of previous messages for context. |
curl -X POST https://heho.vercel.app/api/aichat \
-H "Authorization: Bearer YOUR_HEHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chatbotId": "YOUR_AGENT_ID",
"messages": [{"role": "user", "content": "Hello?"}]
}'Request Body (JSON)
| Field | Type | Description |
|---|---|---|
name | string | The name of your chatbot (Required). |
goal | string | The primary goal of the chatbot (Required). |
description | string | A detailed description/prompt (Min 200 characters) (Required). |
model | string | AI model ID (Required). Examples: qwen/qwen3-next-80b-a3b-instruct:free, arcee-ai/trinity-large-preview:free |
tone | string | Chatbot tone (Optional, defaults to 'professional'). Values: friendly, professional, strict |
theme | string | UI theme name (Optional, defaults to 'sky'). Values: twilight, sunrise, ocean, forest, grape, rose, sky, candy |
Configure up to 3 data sources. If not provided, fields default to null/false.
| Field | Type | Description |
|---|---|---|
data_table_1 | string | Name of the first data source table (Optional, defaults to null). |
data_table_1_read | boolean | Allow chatbot to read from table 1 (Optional, defaults to false). |
data_table_1_write | boolean | Allow chatbot to write/insert data to table 1 (Optional, defaults to false). |
data_table_1_edit | boolean | Allow chatbot to edit/update existing records in table 1 (Optional, defaults to false). |
curl -X POST https://heho.vercel.app/api/v1/chatbots/manage \
-H "Authorization: Bearer YOUR_HEHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My AI Assistant",
"goal": "Customer Support",
"description": "This is a very long description that must be at least 200 characters long to satisfy the validation requirements of the HeHo platform and ensure the AI has enough context to operate effectively...",
"model": "qwen/qwen3-next-80b-a3b-instruct:free"
}'curl -X GET https://heho.vercel.app/api/v1/chatbots/manage \
-H "Authorization: Bearer YOUR_HEHO_API_KEY"curl -X DELETE "https://heho.vercel.app/api/v1/chatbots/manage?chatbotId=YOUR_CHATBOT_ID" \
-H "Authorization: Bearer YOUR_HEHO_API_KEY"curl -X GET https://heho.vercel.app/api/v1/database/manage \
-H "Authorization: Bearer YOUR_HEHO_API_KEY"{
"tables": [
{
"table_name": "products",
"columns": [
{ "column_name": "id", "data_type": "uuid", "required": true },
{ "column_name": "name", "data_type": "text", "required": true },
{ "column_name": "price", "data_type": "numeric", "required": false }
]
}
]
}Request Body (JSON)
| Field | Type | Description |
|---|---|---|
tableName | string | The name of the table to create (Required). Must contain only letters, numbers, and underscores. |
columns | array | Array of column definitions (Required). Each column should have: name, type, primaryKey (optional), notNull (optional), defaultValue (optional). |
curl -X POST https://heho.vercel.app/api/v1/database/tables \
-H "Authorization: Bearer YOUR_HEHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tableName": "customers",
"columns": [
{ "name": "id", "type": "uuid", "primaryKey": true },
{ "name": "name", "type": "text", "notNull": true },
{ "name": "email", "type": "text" }
]
}'Request Body (JSON)
| Field | Type | Description |
|---|---|---|
tableName | string | The name of the existing table to connect (Required). |
curl -X POST https://heho.vercel.app/api/v1/database/tables/connect \
-H "Authorization: Bearer YOUR_HEHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tableName": "existing_table"
}'Request Body (JSON)
| Field | Type | Description |
|---|---|---|
tableName | string | The name of the table to delete (Required). |
curl -X DELETE https://heho.vercel.app/api/v1/database/tables \
-H "Authorization: Bearer YOUR_HEHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tableName": "customers"
}'Request Body (JSON)
| Field | Type | Description |
|---|---|---|
action | string | The operation to perform: read, add, edit, delete (Required). |
tableName | string | The name of the table (Required). |
data | object | The row data for add or edit actions. |
id | any | The primary key value for edit or delete actions. |
query | object | Filter criteria for read action (e.g., { "id": 1 }). |
curl -X POST https://heho.vercel.app/api/v1/database/manage \
-H "Authorization: Bearer YOUR_HEHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "add",
"tableName": "products",
"data": { "name": "New Product", "price": 99.99 }
}'curl -X POST https://heho.vercel.app/api/v1/database/manage \
-H "Authorization: Bearer YOUR_HEHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "read",
"tableName": "products"
}'