Hunnt AI API Documentation

Introduction

Description will show here

This documentation aims to provide all the information you need to work with our API.       

Authenticating requests

To authenticate requests, include a x-api-key header with the value "{YOUR_API_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Reports

Get Website Health Report

GET
https://hunnt.ai
/api/v1/site/healthy-report
requires authentication

Headers

x-api-key
Example:
{YOUR_API_KEY}
Accept-Language
Example:
{string} Optional. Language preference (en|ar). Default: en
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://hunnt.ai/api/v1/site/healthy-report" \
    --header "x-api-key: {YOUR_API_KEY}" \
    --header "Accept-Language: {string} Optional. Language preference (en|ar). Default: en" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "success": false,
    "message": "Invalid API key",
    "errors": [
        "Invalid API key"
    ]
}

Articles

This endpoint allows clients to submit their existing articles for AI-powered improvement

Improve Existing Articles

POST
https://hunnt.ai
/api/v1/article/improve
requires authentication

Headers

x-api-key
Example:
{YOUR_API_KEY}
Authorization
Example:
Bearer {token} Required. Client authentication token
Accept-Language
Example:
{string} Optional. Language preference (en|ar). Default: en
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://hunnt.ai/api/v1/article/improve" \
    --header "x-api-key: {YOUR_API_KEY}" \
    --header "Authorization: Bearer {token} Required. Client authentication token" \
    --header "Accept-Language: {string} Optional. Language preference (en|ar). Default: en" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"articles_list\": [
        \"consequatur\"
    ]
}"
Example response:
{
    "success": true,
    "message": "Data Saved with session id: sess_abc123,sess_abc124",
    "data": {
        "post_ids": [
            123,
            456
        ]
    }
}
{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "articles_list": [
            "The articles list field is required."
        ],
        "articles_list.0.article_id": [
            "The article id field is required."
        ],
        "articles_list.0.article_title": [
            "The article title field is required."
        ],
        "articles_list.0.article_content": [
            "The article content field is required."
        ]
    }
}
{
    "success": false,
    "message": "The below articles already sent.",
    "errors": {
        "Article ID 123": "SEO Best Practices 2025",
        "Article ID 456": "Content Marketing Guide 2025"
    }
}

Generate New Articles (Client)

POST
https://hunnt.ai
/api/v1/article/generate
requires authentication

Headers

x-api-key
Example:
{YOUR_API_KEY}
Accept-Language
Example:
{string} Optional. Language preference (en|ar). Default: en
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://hunnt.ai/api/v1/article/generate" \
    --header "x-api-key: {YOUR_API_KEY}" \
    --header "Accept-Language: {string} Optional. Language preference (en|ar). Default: en" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"articles_list\": [
        {
            \"number_of_articles\": 15,
            \"language\": \"en\"
        }
    ]
}"
Example response:
{
    "success": true,
    "message": "Articles is generating",
    "data": []
}
{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "articles_list": [
            "The articles list field is required.",
            "The total number of articles must be 15, 30, 60, 90, 120, or a number less than 15."
        ],
        "articles_list.0.number_of_articles": [
            "The number of articles field is required."
        ],
        "articles_list.0.language": [
            "The selected language is invalid."
        ]
    }
}
{
    "success": false,
    "message": "Insufficient articles quota",
    "errors": [
        "You don't have enough articles in your subscription plan. Please upgrade your plan."
    ]
}
{
    "success": false,
    "message": "Internal server error",
    "errors": []
}

Restore Original Article Content

GET
https://hunnt.ai
/api/v1/article/restore
requires authentication

Headers

x-api-key
Example:
{YOUR_API_KEY}
Accept-Language
Example:
{string} Optional. Language preference (en|ar). Default: en
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

article_id
integer
required

The article ID from your CMS/platform.

Example:
123
Example request:
curl --request GET \
    --get "https://hunnt.ai/api/v1/article/restore?article_id=123" \
    --header "x-api-key: {YOUR_API_KEY}" \
    --header "Accept-Language: {string} Optional. Language preference (en|ar). Default: en" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "success": true,
    "message": "Article restored successfully",
    "data": {
        "article": {
            "article_title": "SEO Best Practices 2025",
            "article_content": "<p>This is the original article content before improvement...</p>",
            "article_slug": "seo-best-practices-2025",
            "language": "en",
            "categories": [
                "SEO",
                "Marketing",
                "Digital"
            ]
        }
    }
}
{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "article_id": [
            "The article id field is required.",
            "The article id must be a number."
        ]
    }
}
{
    "success": false,
    "message": "Article not found",
    "errors": [
        "Article not found"
    ]
}
{
    "success": false,
    "message": "Internal server error",
    "errors": []
}

Generate New Articles (Agency)

POST
https://hunnt.ai
/api/v1/agency/article/generate
requires authentication

Headers

x-api-key
Example:
{YOUR_API_KEY}
Accept-Language
Example:
{string} Optional. Language preference (en|ar). Default: en
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://hunnt.ai/api/v1/agency/article/generate" \
    --header "x-api-key: {YOUR_API_KEY}" \
    --header "Accept-Language: {string} Optional. Language preference (en|ar). Default: en" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"publish_type\": \"manual\",
    \"articles\": [
        {
            \"language\": \"en\",
            \"number_of_articles\": 15
        },
        {
            \"language\": \"ar\",
            \"number_of_articles\": 10
        }
    ],
    \"start_date\": \"2025-03-01\",
    \"start_time\": \"10:00\",
    \"repeat_days\": 7,
    \"publish_datetime\": {
        \"en\": [
            \"2025-03-01 10:00:00\",
            \"2025-03-08 10:00:00\"
        ],
        \"ar\": [
            \"2025-03-02 14:00:00\"
        ]
    }
}"
Example response:
{
    "success": true,
    "message": "Articles is generating",
    "data": []
}
{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "publish_type": [
            "The publish type field is required."
        ],
        "articles": [
            "The articles field is required."
        ],
        "start_date": [
            "The start date field is required when publish type is semi_automatic."
        ],
        "start_time": [
            "The start time field is required when publish type is semi_automatic."
        ],
        "repeat_days": [
            "The repeat days field is required when publish type is semi_automatic."
        ],
        "publish_datetime": [
            "The publish datetime must contain at least one of the following keys: ar or en.",
            "The publish datetime contains invalid keys: fr"
        ]
    }
}
{
    "success": false,
    "message": "You don't have permission to generate articles",
    "errors": {
        "site": [
            "You don't have permission to generate articles"
        ]
    }
}
{
    "success": false,
    "message": "There is not enough credit to generate new articles",
    "errors": {
        "There is not enough credit to generate new articles": [
            "There is not enough credit to generate new articles"
        ]
    }
}
{
    "success": false,
    "message": "Article generation is not available for this site at this time",
    "errors": {
        "error": "Article generation is not available for this site at this time",
        "start_date": "Start Date: 01 Mar 2025",
        "end_date": "End Date: 31 Mar 2025"
    }
}
{
    "success": false,
    "message": "No articles plan found",
    "errors": [
        "No articles plan found"
    ]
}
{
    "success": false,
    "message": "Internal server error",
    "errors": []
}