> ## Documentation Index
> Fetch the complete documentation index at: https://platform.minimax.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Cookbook

> Explore practical use cases and solutions for MiniMax API to quickly build AI applications.

export const SolutionsGrid = () => {
  const SOLUTIONS = [{
    title: "OpenClaw MiniMax Oauth + Telegram Setup Guide",
    description: "Use OpenClaw to connect MiniMax M2.1 to Telegram, creating your personal AI assistant.",
    img: "https://filecdn.minimax.chat/public/d4513857-f876-48f5-adf9-ec8d566d68e0.png",
    href: "/solutions/openclaw",
    author: "TARS",
    date: "2026.2.5",
    tags: ["text"]
  }, {
    title: "Control Robot Arm with Conversation",
    description: "Use MiniMax LLM & MCP visual understanding to control robotic arm with natural language.",
    img: "https://filecdn.minimax.chat/public/9a188a1b-f5ec-4600-b770-47713a14bb78.png",
    href: "/solutions/robot-agent",
    author: "Devin",
    date: "2026.1.26",
    tags: ["text", "agent", "application-demo"]
  }, {
    title: "Multi-Agent Cowork for Complex Tasks",
    description: "Integrate MiniMax LLM into Eigent's Multi-Agent framework to complete complex multi-step tasks.",
    img: "https://filecdn.minimax.io/public/3d8664e5-b8e0-431b-a9b3-dbbe182e318f.png",
    href: "/solutions/eigent",
    author: "Blue",
    date: "2026.1.17",
    tags: ["text", "agent"]
  }, {
    title: "Mini-Agent: Build Your First Intelligent Assistant",
    description: "Build an intelligent Agent with tool-calling capabilities from scratch using MiniMax LLM & Mini-Agent.",
    img: "https://filecdn.minimax.io/public/47e74c35-9534-4daa-8def-934cc235682a.png",
    href: "/solutions/mini-agent",
    author: "Blue",
    date: "2026.1.15",
    tags: ["text", "agent"]
  }];
  const TAG_META = {
    text: {
      label: "Text",
      color: "#ea580c"
    },
    speech: {
      label: "Speech",
      color: "#2563eb"
    },
    image: {
      label: "Image",
      color: "#9333ea"
    },
    agent: {
      label: "Agent",
      color: "#059669"
    },
    "ai-coding": {
      label: "AI Coding",
      color: "#4f46e5"
    },
    "application-demo": {
      label: "Application Demo",
      color: "#0d9488"
    }
  };
  const TAG_ORDER = ["text", "speech", "image", "agent", "ai-coding", "application-demo"];
  const [selected, setSelected] = useState([]);
  const [dropdownOpen, setDropdownOpen] = useState(false);
  const [search, setSearch] = useState("");
  const addTag = tag => {
    setSelected(prev => prev.includes(tag) ? prev : [...prev, tag]);
    setSearch("");
  };
  const removeTag = tag => setSelected(prev => prev.filter(t => t !== tag));
  const closeDropdown = () => {
    setDropdownOpen(false);
    setSearch("");
  };
  const availableTags = TAG_ORDER.filter(t => !selected.includes(t)).filter(t => {
    if (!search.trim()) return true;
    const q = search.trim().toLowerCase();
    return TAG_META[t].label.toLowerCase().includes(q) || t.toLowerCase().includes(q);
  });
  const visible = selected.length === 0 ? SOLUTIONS : SOLUTIONS.map(s => ({
    ...s,
    _hits: s.tags.filter(t => selected.includes(t)).length
  })).filter(s => s._hits > 0).sort((a, b) => b._hits - a._hits);
  const pillStyle = color => ({
    display: "inline-flex",
    alignItems: "center",
    gap: "6px",
    padding: "6px 8px 6px 14px",
    borderRadius: "999px",
    border: `1px solid ${color}33`,
    background: `${color}0d`,
    color: color,
    fontSize: "0.875rem",
    fontWeight: 500,
    whiteSpace: "nowrap",
    flexShrink: 0
  });
  const pillCloseStyle = {
    display: "inline-flex",
    alignItems: "center",
    justifyContent: "center",
    width: "16px",
    height: "16px",
    borderRadius: "50%",
    border: "none",
    background: "transparent",
    color: "currentColor",
    cursor: "pointer",
    fontSize: "0.875rem",
    lineHeight: 1,
    padding: 0,
    opacity: 0.7
  };
  const filterBtnStyle = {
    display: "inline-flex",
    alignItems: "center",
    gap: "8px",
    padding: "6px 14px",
    borderRadius: "999px",
    border: "1px solid #d1d5db",
    background: "transparent",
    color: "#374151",
    fontSize: "0.875rem",
    fontWeight: 500,
    cursor: "pointer",
    flexShrink: 0,
    whiteSpace: "nowrap"
  };
  const dropdownStyle = {
    position: "absolute",
    top: "calc(100% + 6px)",
    right: 0,
    width: "240px",
    background: "#ffffff",
    border: "1px solid #e5e7eb",
    borderRadius: "12px",
    boxShadow: "0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04)",
    padding: "12px",
    zIndex: 20
  };
  const searchInputStyle = {
    width: "100%",
    boxSizing: "border-box",
    padding: "8px 12px",
    border: "1px solid #e5e7eb",
    borderRadius: "8px",
    fontSize: "0.875rem",
    background: "#f9fafb",
    color: "#111827",
    outline: "none",
    marginBottom: "8px"
  };
  const dropdownItemStyle = color => ({
    display: "block",
    width: "100%",
    textAlign: "left",
    padding: "8px 8px",
    border: "none",
    borderRadius: "6px",
    background: "transparent",
    color: color,
    fontSize: "0.95rem",
    fontWeight: 600,
    cursor: "pointer"
  });
  const cardStyle = {
    display: "flex",
    flexDirection: "column",
    textDecoration: "none",
    color: "inherit",
    borderRadius: "12px",
    overflow: "hidden",
    border: "1px solid #e5e7eb",
    background: "#ffffff",
    transition: "transform 0.15s ease, box-shadow 0.15s ease"
  };
  const cardImgStyle = {
    width: "100%",
    height: "180px",
    objectFit: "cover",
    display: "block"
  };
  const cardTagBadge = (color, isHit) => isHit ? {
    fontSize: "0.7rem",
    padding: "2px 8px",
    borderRadius: "4px",
    border: `1px solid ${color}33`,
    background: `${color}0d`,
    color: color,
    whiteSpace: "nowrap"
  } : {
    fontSize: "0.7rem",
    padding: "2px 8px",
    borderRadius: "4px",
    border: "1px solid #e5e7eb",
    background: "#f9fafb",
    color: "#6b7280",
    whiteSpace: "nowrap"
  };
  return <div>
      {}
      <style>{`
        .sg-tag-scroll { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.12) transparent; }
        .sg-tag-scroll::-webkit-scrollbar { height: 4px; }
        .sg-tag-scroll::-webkit-scrollbar-track { background: transparent; }
        .sg-tag-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 2px; transition: background 0.15s; }
        .sg-tag-scroll:hover::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); }
      `}</style>

      {}
      <div style={{
    display: "flex",
    gap: "8px",
    marginBottom: "20px",
    alignItems: "center",
    position: "relative"
  }}>
        <div className="sg-tag-scroll" style={{
    flex: 1,
    minWidth: 0,
    display: "flex",
    gap: "8px",
    overflowX: "auto",
    paddingBottom: "2px"
  }}>
          {selected.length === 0 && <span style={{
    color: "#9ca3af",
    fontSize: "0.875rem",
    padding: "6px 0"
  }}>
              Click the “Filter” button on the right to pick tags and narrow down solutions
            </span>}
          {selected.map(tag => {
    const meta = TAG_META[tag];
    return <span key={tag} style={pillStyle(meta.color)}>
                {meta.label}
                <button type="button" aria-label={`Remove ${meta.label}`} onClick={() => removeTag(tag)} style={pillCloseStyle}>
                  ×
                </button>
              </span>;
  })}
        </div>

        <div style={{
    position: "relative",
    flexShrink: 0
  }}>
          <button type="button" onClick={() => setDropdownOpen(v => !v)} style={filterBtnStyle} aria-expanded={dropdownOpen}>
            {}
            <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
              <polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" />
            </svg>
            Filter
            {}
            <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" style={{
    transform: dropdownOpen ? "rotate(180deg)" : "rotate(0deg)",
    transition: "transform 0.15s"
  }}>
              <polyline points="6 9 12 15 18 9" />
            </svg>
          </button>

          {dropdownOpen && <>
              {}
              <div onClick={closeDropdown} style={{
    position: "fixed",
    inset: 0,
    zIndex: 10,
    background: "transparent"
  }} />
              <div style={dropdownStyle} role="dialog">
                <input type="text" placeholder="Search tags…" value={search} onChange={e => setSearch(e.target.value)} style={searchInputStyle} autoFocus />
                <div style={{
    display: "flex",
    flexDirection: "column",
    gap: "2px",
    maxHeight: "280px",
    overflowY: "auto"
  }}>
                  {availableTags.length === 0 ? <div style={{
    padding: "12px 8px",
    color: "#9ca3af",
    fontSize: "0.875rem",
    textAlign: "center"
  }}>
                      {selected.length === TAG_ORDER.length ? "All tags selected" : "No matching tags"}
                    </div> : availableTags.map(tag => {
    const meta = TAG_META[tag];
    return <button key={tag} type="button" onClick={() => addTag(tag)} style={dropdownItemStyle(meta.color)} onMouseEnter={e => e.currentTarget.style.background = `${meta.color}0d`} onMouseLeave={e => e.currentTarget.style.background = "transparent"}>
                          {meta.label}
                        </button>;
  })}
                </div>
                {selected.length > 0 && <div style={{
    borderTop: "1px solid #f3f4f6",
    marginTop: "8px",
    paddingTop: "8px"
  }}>
                    <button type="button" onClick={() => {
    setSelected([]);
    setSearch("");
  }} style={{
    width: "100%",
    padding: "6px 8px",
    border: "none",
    borderRadius: "6px",
    background: "transparent",
    color: "#6b7280",
    fontSize: "0.8125rem",
    cursor: "pointer",
    textAlign: "center"
  }}>
                      Clear selection ({selected.length})
                    </button>
                  </div>}
              </div>
            </>}
        </div>
      </div>

      {}
      <div style={{
    display: "grid",
    gridTemplateColumns: "repeat(auto-fit, minmax(300px, 1fr))",
    gap: "16px"
  }}>
        {visible.map(s => <a key={s.href} href={s.href} style={cardStyle} onMouseEnter={e => {
    e.currentTarget.style.transform = "translateY(-2px)";
    e.currentTarget.style.boxShadow = "0 8px 24px rgba(0, 0, 0, 0.08)";
  }} onMouseLeave={e => {
    e.currentTarget.style.transform = "translateY(0)";
    e.currentTarget.style.boxShadow = "none";
  }}>
            <img src={s.img} style={cardImgStyle} alt={s.title} />
            <div style={{
    padding: "16px",
    display: "flex",
    flexDirection: "column",
    flexGrow: 1,
    gap: "8px"
  }}>
              <h3 style={{
    margin: 0,
    fontSize: "1rem",
    fontWeight: 600,
    lineHeight: 1.4
  }}>
                {s.title}
              </h3>
              <p style={{
    margin: 0,
    fontSize: "0.875rem",
    color: "#6b7280",
    lineHeight: 1.5,
    flexGrow: 1
  }}>
                {s.description}
              </p>
              <div style={{
    fontSize: "0.8125rem",
    color: "#6b7280",
    fontWeight: 600
  }}>
                {s.date} · @{s.author}
              </div>
              <div style={{
    display: "flex",
    flexWrap: "wrap",
    gap: "4px",
    marginTop: "4px"
  }}>
                {s.tags.map(t => {
    const meta = TAG_META[t];
    const isHit = selected.includes(t);
    return <span key={t} style={cardTagBadge(meta ? meta.color : "#6b7280", isHit)}>
                      {meta ? meta.label : t}
                    </span>;
  })}
              </div>
            </div>
          </a>)}
      </div>

      {visible.length === 0 && <div style={{
    textAlign: "center",
    padding: "48px 16px",
    color: "#9ca3af",
    fontSize: "0.875rem"
  }}>
          No solutions match the selected tags. Try clearing some filters.
        </div>}
    </div>;
};

<SolutionsGrid />

***

## Start Building

Ready to start building your AI applications?

<Columns cols={3}>
  <Card title="Quick Start" icon="rocket" href="/guides/quickstart">
    Learn how to quickly integrate MiniMax API
  </Card>

  <Card title="API Reference" icon="book-open" href="/api-reference/api-overview">
    View complete API documentation
  </Card>

  <Card title="Contact Us" icon="message-circle" href="mailto:api@minimax.io">
    Have questions? Contact our technical support team
  </Card>
</Columns>
