Skip to content

AI API

This API provides an advanced conversational AI optimized for natural, witty, and context-aware interactions. Suitable for ChatBots, Coding, AI Agents, Short replies, writing memos, etc.

POST /api/v1/ai

The following parameters are accepted in the request body:

FieldTypeRequiredDescription
promptstringYesThe user’s input message.
personastringOptionalDefines the AI’s character (e.g., “Sarcastic Bot”, “Helpful Doctor”).

Choose your preferred method to interact with the Heavstal AI API:

Terminal window
curl -X POST https://heavstal.com.ng/api/v1/ai \
-H "Content-Type: application/json" \
-H "x-api-key: <YOUR_API_KEY>" \
-d '{"prompt": "Explain quantum physics like I am 5", "persona": "A 21th century Physicists with 5 PhDs"}'
{
"status": "success",
"creator": "HEAVSTAL TECH",
"data": {
"model": "gemini-3.1-pro",
"response": "..."
}
}