{
  "info": {
    "_postman_id": "bilgesam-ai-agent-api-v1",
    "name": "Bilgesam AI Agent API v1",
    "description": "AI-powered assistant API with web search and image generation capabilities for Bilgesam.com platform.\n\n## Authentication\nAll endpoints require Bearer token authentication. Use your API key in the Authorization header.\n\n## Credit System\n1 Credit = 10 API Requests\n\n## Endpoints\n- POST /api/v1/agent - Create a new AI agent request\n- GET /api/v1/agent/{requestId} - Get request result\n\n## Request Options\n- `message` (required): The message to send\n- `language` (optional): Language code (en, es, tr). Default: en\n- `mcpIds` (optional): Array of MCP tool IDs to enable\n- `messageHistory` (optional): Array of previous messages (max 5) for context\n- `fileUrl` (optional): URL of a file (image or document) to analyze. File type is auto-detected from the URL extension or content-type header. Supported: images (jpg, png, webp, gif), documents (pdf, doc, docx, txt, csv)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_key}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://www.bilgesam.com",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "sk_your_api_key_here",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Ask a Question",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"message\": \"What are the latest developments in artificial intelligence?\",\n  \"language\": \"en\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/agent",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "agent"]
        },
        "description": "Basic question in English."
      },
      "response": []
    },
    {
      "name": "Follow-up with Message History",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"message\": \"Can you explain more about that?\",\n  \"language\": \"en\",\n  \"messageHistory\": [\n    { \"role\": \"user\", \"content\": \"What is machine learning?\" },\n    { \"role\": \"assistant\", \"content\": \"Machine learning is a subset of AI...\" }\n  ]\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/agent",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "agent"]
        },
        "description": "Follow-up question using message history for context (max 5 messages)."
      },
      "response": []
    },
    {
      "name": "Web Search",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"message\": \"What are the latest AI news and developments?\",\n  \"language\": \"en\",\n  \"mcpIds\": [\"service-tools\"]\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/agent",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "agent"]
        },
        "description": "Search for latest AI news using service-tools MCP."
      },
      "response": []
    },
    {
      "name": "Soru Sor (Türkçe)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"message\": \"Yapay zeka hakkında bilgi verir misin?\",\n  \"language\": \"tr\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/agent",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "agent"]
        },
        "description": "Turkish language request."
      },
      "response": []
    },
    {
      "name": "Latest News (Web Search)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"message\": \"What are the latest news and developments?\",\n  \"language\": \"en\",\n  \"mcpIds\": [\"service-tools\"]\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/agent",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "agent"]
        },
        "description": "Search for latest news using service-tools MCP."
      },
      "response": []
    },
    {
      "name": "Analyze Image from URL",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"message\": \"Analyze this image and describe what you see\",\n  \"language\": \"en\",\n  \"fileUrl\": \"https://example.com/photo.jpg\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/agent",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "agent"]
        },
        "description": "Analyze an image from a URL. The file type is auto-detected from the URL extension. Supported image formats: jpg, jpeg, png, gif, webp, bmp, svg, avif."
      },
      "response": []
    },
    {
      "name": "Analyze Document from URL",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"message\": \"Summarize this document\",\n  \"language\": \"en\",\n  \"fileUrl\": \"https://example.com/report.pdf\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/api/v1/agent",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "agent"]
        },
        "description": "Analyze a document from a URL. The file type is auto-detected from the URL extension or content-type header. Supported document formats: pdf, doc, docx, txt, csv, xls, xlsx, ppt, pptx, md, rtf."
      },
      "response": []
    },
    {
      "name": "Get Request Result",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/api/v1/agent/:requestId",
          "host": ["{{base_url}}"],
          "path": ["api", "v1", "agent", ":requestId"],
          "variable": [
            {
              "key": "requestId",
              "value": "550e8400-e29b-41d4-a716-446655440000",
              "description": "The UUID returned from POST request"
            }
          ]
        },
        "description": "Get the status and response for a specific request.\n\n**Response Statuses:**\n- `pending`: Request is queued\n- `processing`: AI is generating response\n- `completed`: Response is ready\n- `failed`: Request failed"
      },
      "response": []
    }
  ]
}
