{
  "info": {
    "_postman_id": "b7a1c2d3-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
    "name": "NeuroHub API",
    "description": "NeuroHub model marketplace — OpenAI-compatible inference (/v1) and control plane (/api/v1).\n\nSet the collection variables:\n- baseUrl — https://novastep.tech\n- apiKey  — an API key from the web app (API → API keys)\n- email / password — for the login request",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{apiKey}}", "type": "string" }]
  },
  "variable": [
    { "key": "baseUrl", "value": "https://novastep.tech" },
    { "key": "apiKey", "value": "" },
    { "key": "email", "value": "" },
    { "key": "password", "value": "" },
    { "key": "model", "value": "llama-3.1-8b-instruct" },
    { "key": "orgSlug", "value": "" }
  ],
  "item": [
    {
      "name": "OpenAI-compatible inference",
      "item": [
        {
          "name": "List models",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{baseUrl}}/v1/models", "host": ["{{baseUrl}}"], "path": ["v1", "models"] }
          }
        },
        {
          "name": "Chat completion",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"model\": \"{{model}}\",\n  \"messages\": [\n    { \"role\": \"system\", \"content\": \"You are a helpful assistant.\" },\n    { \"role\": \"user\", \"content\": \"Привет!\" }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 512,\n  \"stream\": false\n}"
            },
            "url": { "raw": "{{baseUrl}}/v1/chat/completions", "host": ["{{baseUrl}}"], "path": ["v1", "chat", "completions"] }
          }
        }
      ]
    },
    {
      "name": "Catalog",
      "item": [
        {
          "name": "Browse catalog",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/api/v1/models?page=1&page_size=24",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "models"],
              "query": [
                { "key": "page", "value": "1" },
                { "key": "page_size", "value": "24" },
                { "key": "type", "value": "llm", "disabled": true },
                { "key": "q", "value": "", "disabled": true },
                { "key": "organization", "value": "", "disabled": true }
              ]
            }
          }
        },
        {
          "name": "Get model card",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{baseUrl}}/api/v1/models/{{model}}", "host": ["{{baseUrl}}"], "path": ["api", "v1", "models", "{{model}}"] }
          }
        }
      ]
    },
    {
      "name": "Organizations",
      "item": [
        {
          "name": "List organizations",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{baseUrl}}/api/v1/orgs", "host": ["{{baseUrl}}"], "path": ["api", "v1", "orgs"] }
          }
        },
        {
          "name": "Get organization",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{baseUrl}}/api/v1/orgs/{{orgSlug}}", "host": ["{{baseUrl}}"], "path": ["api", "v1", "orgs", "{{orgSlug}}"] }
          }
        }
      ]
    },
    {
      "name": "Account & billing",
      "item": [
        {
          "name": "Login",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{email}}\",\n  \"password\": \"{{password}}\"\n}"
            },
            "description": "Optional: add \"account_type\": \"company\" to sign in to the company area (requires a company account, else 403). Add \"totp_code\" (6-digit code or a recovery code) when 2FA is enabled.",
            "url": { "raw": "{{baseUrl}}/api/v1/auth/login", "host": ["{{baseUrl}}"], "path": ["api", "v1", "auth", "login"] }
          }
        },
        {
          "name": "Register company account",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"company@example.com\",\n  \"password\": \"Str0ngPass9!\",\n  \"lang\": \"en\",\n  \"company_name\": \"Acme Labs\",\n  \"legal_name\": \"Acme Labs LLC\",\n  \"website\": \"https://acme.example\"\n}"
            },
            "description": "Creates a company account (account_type=company) plus a publisher organization in pending status. Rate limit 5/hour.",
            "url": { "raw": "{{baseUrl}}/api/v1/auth/register-company", "host": ["{{baseUrl}}"], "path": ["api", "v1", "auth", "register-company"] }
          }
        },
        {
          "name": "Current user",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{baseUrl}}/api/v1/auth/me", "host": ["{{baseUrl}}"], "path": ["api", "v1", "auth", "me"] }
          }
        },
        {
          "name": "Wallet balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{baseUrl}}/api/v1/wallet", "host": ["{{baseUrl}}"], "path": ["api", "v1", "wallet"] }
          }
        },
        {
          "name": "Usage summary",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{baseUrl}}/api/v1/me/usage", "host": ["{{baseUrl}}"], "path": ["api", "v1", "me", "usage"] }
          }
        }
      ]
    },
    {
      "name": "Two-factor authentication (2FA)",
      "item": [
        {
          "name": "Status",
          "request": {
            "method": "GET",
            "header": [],
            "url": { "raw": "{{baseUrl}}/api/v1/auth/2fa", "host": ["{{baseUrl}}"], "path": ["api", "v1", "auth", "2fa"] }
          }
        },
        {
          "name": "Begin enrollment",
          "request": {
            "method": "POST",
            "header": [],
            "description": "Returns a secret, an otpauth:// URL and a QR SVG. Scan it in an authenticator app; 2FA stays off until Enable confirms a code.",
            "url": { "raw": "{{baseUrl}}/api/v1/auth/2fa/setup", "host": ["{{baseUrl}}"], "path": ["api", "v1", "auth", "2fa", "setup"] }
          }
        },
        {
          "name": "Enable",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"code\": \"123456\"\n}"
            },
            "description": "Arms 2FA and returns one-time recovery codes (shown once).",
            "url": { "raw": "{{baseUrl}}/api/v1/auth/2fa/enable", "host": ["{{baseUrl}}"], "path": ["api", "v1", "auth", "2fa", "enable"] }
          }
        },
        {
          "name": "Disable",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"password\": \"{{password}}\",\n  \"code\": \"123456\"\n}"
            },
            "description": "Disables 2FA. Requires the account password and a valid second factor.",
            "url": { "raw": "{{baseUrl}}/api/v1/auth/2fa/disable", "host": ["{{baseUrl}}"], "path": ["api", "v1", "auth", "2fa", "disable"] }
          }
        }
      ]
    }
  ]
}
