{
  "schema": "agent-manifest/1.0",
  "name": "STIT Techpack API",
  "description": "World's first agentic techpack platform for fashion manufacturing. Create, manage, and export complete garment technical packages via REST API, MCP server, or Python/TypeScript SDK.",
  "version": "1.0.0",
  "base_url": "https://api.stit.ai/api/v1",
  "sandbox_url": "https://sandbox.api.stit.ai/api/v1",
  "docs_url": "https://api.stit.ai/docs",
  "openapi_url": "https://api.stit.ai/openapi.json",
  "auth": {
    "type": "bearer",
    "description": "API key obtained from POST /api-keys (requires account)",
    "key_format": "tp_sk_<64-hex>",
    "obtain": {
      "method": "POST",
      "path": "/api-keys",
      "requires": "user_account"
    },
    "sandbox": {
      "description": "Free sandbox environment — no credits consumed, no account required",
      "url": "https://sandbox.api.stit.ai",
      "key_prefix": "tp_sk_sandbox_"
    }
  },
  "integrations": {
    "mcp_server": {
      "command": "npx @stit/mcp-server",
      "description": "Native Claude/Cursor/Cline integration with 15 tools",
      "tools_count": 15
    },
    "sdk_python": {
      "install": "pip install stit-sdk",
      "package": "stit-sdk",
      "python_version": ">=3.11",
      "async": true
    },
    "sdk_typescript": {
      "install": "npm install @stit/sdk",
      "package": "@stit/sdk",
      "esm": true
    }
  },
  "capabilities": [
    {
      "id": "create_techpack",
      "name": "Create Techpack",
      "description": "Create a new garment techpack with style info",
      "endpoint": "POST /techpacks",
      "credits": 0
    },
    {
      "id": "generate_bom",
      "name": "Generate Bill of Materials",
      "description": "AI-powered BOM generation from garment description (13 internal agents)",
      "endpoint": "POST /techpacks/{id}/bom/generate",
      "credits": 50,
      "ai": true
    },
    {
      "id": "create_spec_measurements",
      "name": "Create Spec Measurements",
      "description": "Define size specs, POM points, and measurement values",
      "endpoint": "POST /techpacks/{id}/spec/sizes",
      "credits": 0
    },
    {
      "id": "generate_tech_notes",
      "name": "Generate Tech Notes",
      "description": "AI-powered construction notes generation",
      "endpoint": "POST /techpacks/{id}/tech-notes/generate",
      "credits": 30,
      "ai": true
    },
    {
      "id": "generate_grading",
      "name": "Calculate Size Grading",
      "description": "Proportional or fixed-increment size grading table",
      "endpoint": "POST /techpacks/{id}/spec/grading",
      "credits": 10,
      "ai": true
    },
    {
      "id": "export_pdf",
      "name": "Export to PDF",
      "description": "Generate multilingual PDF/Excel techpack document",
      "endpoint": "POST /export/techpack/{id}",
      "credits": 20,
      "formats": ["PDF", "XLSX", "CSV"],
      "languages": ["en", "zh", "zh-TW", "ja", "ko", "fr", "de", "es", "it", "pt", "yue"]
    },
    {
      "id": "manage_fitting_sessions",
      "name": "Manage Fitting Sessions",
      "description": "Create fitting sessions, log issues, upload audio for AI analysis",
      "endpoint": "POST /techpacks/{id}/fitting/sessions",
      "credits": 0
    },
    {
      "id": "webhook_subscribe",
      "name": "Webhook Subscriptions",
      "description": "Subscribe to async event callbacks for agent automation",
      "endpoint": "POST /webhooks",
      "credits": 0,
      "events": [
        "techpack.created",
        "techpack.status_changed",
        "export.completed",
        "export.failed",
        "bom.item_added",
        "fitting.issue_created",
        "approval.requested",
        "approval.completed"
      ]
    }
  ],
  "techpack_workflow": {
    "description": "Complete techpack creation workflow",
    "stages": ["design", "proto", "sms", "pps", "pp", "bulk"],
    "autonomy_levels": {
      "L1": "Read-only suggestions",
      "L2": "Draft with user review",
      "L3": "Auto-fill with approval gate",
      "L4": "Auto-execute with review",
      "L5": "Full batch automation"
    },
    "typical_flow": [
      "POST /techpacks — create techpack",
      "POST /techpacks/{id}/bom/generate — AI BOM",
      "POST /techpacks/{id}/spec/sizes — size spec",
      "POST /techpacks/{id}/spec/pom-points — POM points (repeat)",
      "POST /techpacks/{id}/spec/measurements — values (repeat)",
      "POST /techpacks/{id}/spec/grading — size grading",
      "POST /techpacks/{id}/tech-notes/generate — AI notes",
      "POST /export/techpack/{id} — export",
      "GET /export/{export_id}/status — poll until complete"
    ]
  },
  "rate_limits": {
    "description": "Rate limit info returned in every response header",
    "headers": [
      "RateLimit-Limit",
      "RateLimit-Remaining",
      "RateLimit-Reset",
      "Retry-After (on 429 only)",
      "X-Credits-Remaining (on AI endpoints)"
    ]
  },
  "credits": {
    "free_signup": 200,
    "agent_plan_monthly": 10000,
    "on_insufficient": "HTTP 402 with credits_required and credits_available"
  },
  "garment_categories": [
    "dress", "top", "bottom", "outerwear", "swimwear",
    "activewear", "lingerie", "accessories", "suit", "knitwear"
  ],
  "fashion_segments": ["womenswear", "menswear", "kidswear", "casual"],
  "contact": {
    "api_support": "api@stit.ai",
    "docs": "https://docs.stit.ai",
    "github": "https://github.com/stit-ai"
  }
}
