{
    "variable": [
        {
            "id": "baseUrl",
            "key": "baseUrl",
            "type": "string",
            "name": "string",
            "value": "https:\/\/mconnect.kai.kaino.io"
        }
    ],
    "info": {
        "name": "kai API",
        "_postman_id": "e2ba153b-62b6-42d3-9514-a671e4a19991",
        "description": "OpenAI-compatible API gateway for AI services. Use standard OpenAI SDKs with your kai API key.",
        "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
    },
    "item": [
        {
            "name": "Chat",
            "description": "",
            "item": [
                {
                    "name": "Create a chat completion.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/chat\/completions",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/chat\/completions"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"messages\":[{\"role\":\"system\",\"content\":\"You are a helpful assistant.\"},{\"role\":\"user\",\"content\":\"Hello!\"}],\"model\":\"\",\"temperature\":0.7,\"max_tokens\":1024,\"top_p\":1,\"stream\":false,\"n\":1,\"presence_penalty\":0,\"frequency_penalty\":0}"
                        },
                        "description": "Generates a model response for the given conversation. Follows the OpenAI chat\ncompletions format. Token usage is included in successful responses and counted\ntoward your billing period.\n\nStreaming is not currently supported \u2014 set `stream` to `false` or omit it."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"id\":\"chatcmpl-kai-abc123\",\"object\":\"chat.completion\",\"model\":\"Meta-Llama-3_3-70B-Instruct\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Hello! How can I help you today?\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":25,\"completion_tokens\":12,\"total_tokens\":37}}",
                            "name": "Successful completion"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Audio",
            "description": "",
            "item": [
                {
                    "name": "Transcribe audio or video.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/audio\/transcriptions",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/audio\/transcriptions"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "multipart\/form-data"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "model",
                                    "value": "",
                                    "type": "text",
                                    "description": "The transcription model to use. Use `GET \/v1\/models` to list available models. If omitted, the default model for your plan is used."
                                },
                                {
                                    "key": "language",
                                    "value": "de",
                                    "type": "text",
                                    "description": "The language of the audio in ISO-639-1 format (e.g., `de`, `en`). Optional. Must be 2 characters."
                                },
                                {
                                    "key": "prompt",
                                    "value": "This is a medical consultation.",
                                    "type": "text",
                                    "description": "Optional text to guide the model's style. Max 1000 characters. Must not be greater than 1000 characters."
                                },
                                {
                                    "key": "response_format",
                                    "value": "json",
                                    "type": "text",
                                    "description": "The format of the transcript output: `json`, `text`, `srt`, `verbose_json`, or `vtt`."
                                },
                                {
                                    "key": "temperature",
                                    "value": "0",
                                    "type": "text",
                                    "description": "Sampling temperature between 0 and 1. Lower is more deterministic. Must be at least 0. Must not be greater than 1."
                                },
                                {
                                    "key": "file",
                                    "src": [],
                                    "type": "file"
                                }
                            ]
                        },
                        "description": "Transcribes speech from an audio or video file. For video uploads, the audio track\nis automatically extracted before transcription. The file must contain at least one\naudio stream.\n\nCompatible with the OpenAI Whisper API format."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"text\":\"Der Patient berichtet \u00fcber anhaltende Kopfschmerzen seit zwei Wochen.\"}",
                            "name": "Successful transcription"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Documents",
            "description": "",
            "item": [
                {
                    "name": "Anonymize documents by detecting and replacing PII with placeholders.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/documents\/anonymize",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/documents\/anonymize"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "multipart\/form-data"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "pii_types[0]",
                                    "value": "name",
                                    "type": "text",
                                    "description": ""
                                },
                                {
                                    "key": "files[]",
                                    "src": [],
                                    "type": "file"
                                }
                            ]
                        },
                        "description": "Upload 1 file (PDF, DOCX, images, plain text). The API extracts text\n(with OCR fallback for scanned documents), detects personally identifiable\ninformation, and replaces it with numbered placeholders like\n`[[NAME_1]]`, `[[EMAIL_2]]`.\n\nReturns the sanitized text, a sanitized filename, and a mapping of placeholders\nto their original values.\n\nRequires the `documents_anonymize` permission on your API token's product."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"object\":\"list\",\"data\":[{\"original_filename\":\"patient_report.pdf\",\"sanitized_filename\":\"patient_report.pdf\",\"sanitized_text\":\"Patient: [[NAME_1]]\\nDiagnose: [[MEDICAL_1]]\",\"placeholders\":{\"[[NAME_1]]\":\"Max Mustermann\",\"[[MEDICAL_1]]\":\"Diabetes Typ 2\"},\"metadata\":{\"extraction_method\":\"pdf_parser\",\"used_ocr\":false,\"page_count\":2,\"strategy\":\"ai\"}}]}",
                            "name": "Successful anonymization"
                        }
                    ]
                },
                {
                    "name": "Strip metadata from a document and return the cleaned file.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/documents\/strip-metadata",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/documents\/strip-metadata"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "X-Metadata-Stripped",
                                "value": "true"
                            },
                            {
                                "key": "X-Strip-Method",
                                "value": "imagemagick"
                            },
                            {
                                "key": "X-Stripped-Fields",
                                "value": "EXIF,IPTC,XMP,ICC"
                            },
                            {
                                "key": "X-Original-Size",
                                "value": "245760"
                            },
                            {
                                "key": "X-Sanitized-Size",
                                "value": "101500"
                            },
                            {
                                "key": "Content-Type",
                                "value": "multipart\/form-data"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "file",
                                    "src": [],
                                    "type": "file"
                                }
                            ]
                        },
                        "description": "Upload a single file (PDF, image, DOCX, XLSX, XLS, or text).\nMetadata (EXIF, author, company, timestamps, etc.) is removed\nand the cleaned file is returned as a binary download.\n\nRequires the `documents_strip_metadata` permission on your API token's product."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "<<Binary file content>>",
                            "name": "Cleaned file as binary download"
                        },
                        {
                            "header": [],
                            "code": 400,
                            "body": "{\"error\":{\"message\":\"Failed to strip metadata from 'photo.jpg'\",\"type\":\"invalid_request_error\",\"param\":\"file\",\"code\":\"metadata_stripping_failed\"}}",
                            "name": "Metadata stripping failed"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Models",
            "description": "",
            "item": [
                {
                    "name": "List available models.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/models",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/models"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns models available for your API token. Use the model `id` values\nwhen calling chat or audio endpoints."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"object\":\"list\",\"data\":[{\"id\":\"Meta-Llama-3_3-70B-Instruct\",\"object\":\"model\",\"created\":1700000000,\"owned_by\":\"kai\"},{\"id\":\"mistral-nemo-instruct-2407\",\"object\":\"model\",\"created\":1700000000,\"owned_by\":\"kai\"},{\"id\":\"whisper-large-v3-turbo\",\"object\":\"model\",\"created\":1700000000,\"owned_by\":\"kai\"}]}",
                            "name": "Available models"
                        }
                    ]
                }
            ]
        },
        {
            "name": "Usage",
            "description": "",
            "item": [
                {
                    "name": "Get current billing period usage statistics.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/usage",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/usage"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns token status, product info, and usage counts for the current month.\nThe `status` field indicates whether the token is currently usable (`active`)\nor not (`inactive`)."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"status\":\"active\",\"is_free\":false,\"is_trial\":false,\"trial_ends_at\":null,\"period\":\"2025-01\",\"product\":\"aegis-pro\",\"product_label\":\"Aegis PRO\",\"usage_label\":\"API Requests\",\"total_requests\":42,\"total_ok\":40,\"total_errors\":2,\"total_tokens_in\":12500,\"total_tokens_out\":3200,\"rate_limit_per_minute\":10,\"max_concurrent_requests\":1,\"monthly_usage_cap\":100,\"usage_remaining\":60,\"trial_usage_limit\":null,\"trial_usage_remaining\":null,\"max_file_size\":26214400,\"addons\":[],\"enabled_features\":[],\"enabled_endpoints\":[\"chat_completions\",\"audio_transcriptions\",\"documents_anonymize\"]}",
                            "name": "Usage statistics"
                        }
                    ]
                }
            ]
        }
    ],
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "Authorization",
                "type": "string"
            }
        ]
    }
}