{
    "info": {
        "_postman_id": "320ed62d5dd025ed40934ea116978478",
        "name": "Hifisys AI Blog Generator API",
        "description": "Production-grade AI article engine that creates long-form, reader-first content, outlines, and SEO metadata.\n\nOfficial REST API Postman Collection for Hifisys Enterprise Platform. Managed dynamically.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "Authentication & Health",
            "item": [
                {
                    "name": "Verify API Key Authentication",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/ai/blog/generate",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ai",
                                "blog",
                                "generate"
                            ]
                        },
                        "description": "Validates that your API key is active, properly provisioned, and has appropriate scopes."
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success field\", function () {",
                                    "    var jsonData = pm.response.json();",
                                    "    pm.expect(jsonData).to.be.an(\"object\");",
                                    "    pm.expect(jsonData).to.have.property(\"success\");",
                                    "});",
                                    "pm.test(\"Headers contain quota or rate limit info\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                }
            ]
        },
        {
            "name": "Article Generation",
            "item": [
                {
                    "name": "Generate Full Article",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-API-Key",
                                "value": "{{api_key}}",
                                "type": "text"
                            },
                            {
                                "key": "Accept",
                                "value": "application/json",
                                "type": "text"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "type": "text"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/api/v1/ai/blog/generate",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "api",
                                "v1",
                                "ai",
                                "blog",
                                "generate"
                            ]
                        },
                        "description": "Generates a full-length SEO-optimized article with title, headings, HTML content, meta tags, and estimated read time.\n\nRequired Scope: `blog:generate`",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"topic\": \"Top 10 Emerging AI Trends in Enterprise Automation\",\n    \"target_keywords\": \"Sample Target_keywords\",\n    \"tone\": \"Sample Tone\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "pm.test(\"Status code is 200 or 201\", function () {",
                                    "    pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                                    "});",
                                    "pm.test(\"Response is valid JSON with success flag\", function () {",
                                    "    var json = pm.response.json();",
                                    "    pm.expect(json).to.be.an(\"object\");",
                                    "    pm.expect(json).to.have.property(\"success\");",
                                    "    pm.expect(json.success).to.be.true;",
                                    "});",
                                    "pm.test(\"Rate limit and Quota headers present\", function () {",
                                    "    if (pm.response.headers.has(\"X-Quota-Monthly\")) {",
                                    "        pm.expect(pm.response.headers.get(\"X-Quota-Monthly\")).to.not.be.empty;",
                                    "    }",
                                    "});"
                                ],
                                "type": "text/javascript"
                            }
                        }
                    ]
                }
            ]
        }
    ],
    "variable": [
        {
            "key": "base_url",
            "value": "https://hifisys.com",
            "type": "string"
        },
        {
            "key": "api_key",
            "value": "YOUR_API_KEY",
            "type": "string"
        },
        {
            "key": "product_slug",
            "value": "ai-blog-generator-api",
            "type": "string"
        },
        {
            "key": "api_version",
            "value": "v1",
            "type": "string"
        }
    ]
}