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

# Cartoon Model

> Extra-expressive avatars for cartoon, stylized, and non-human characters

export const DemoCard = ({label, scenario, children}) => {
  const cardRef = useRef(null);
  const [playing, setPlaying] = useState(false);
  useEffect(() => {
    const v = cardRef.current && cardRef.current.querySelector("video");
    if (!v) return undefined;
    const onPlay = () => setPlaying(true);
    const onPause = () => setPlaying(false);
    v.addEventListener("play", onPlay);
    v.addEventListener("pause", onPause);
    v.addEventListener("ended", onPause);
    return () => {
      v.removeEventListener("play", onPlay);
      v.removeEventListener("pause", onPause);
      v.removeEventListener("ended", onPause);
    };
  }, []);
  const toggle = () => {
    const v = cardRef.current && cardRef.current.querySelector("video");
    if (!v) return;
    if (v.paused) {
      const videos = document.querySelectorAll(".lite-demo-card video");
      for (let i = 0; i < videos.length; i++) {
        if (videos[i] !== v) videos[i].pause();
      }
      v.currentTime = 0;
      v.play();
    } else {
      v.pause();
    }
  };
  return <div ref={cardRef} className="lite-demo-card not-prose" data-playing={playing ? "true" : "false"} role="button" tabIndex={0} aria-label={(playing ? "Pause demo: " : "Play demo: ") + (label || scenario)} onClick={toggle} onKeyDown={e => {
    if (e.key === "Enter" || e.key === " ") {
      e.preventDefault();
      toggle();
    }
  }}>
      {children}
      {label && <div className="lite-demo-badge-wrap">
          <div className="lite-demo-badge">
            <svg className="lite-demo-badge-icon" viewBox="0 0 12 12" aria-hidden="true">
              <path d="M3 2.5v7l7-3.5L3 2.5z" fill="currentColor" />
            </svg>
            <span>{label}</span>
          </div>
        </div>}
      <div className="lite-demo-hover">
        <div className="lite-demo-kicker">SCENARIO</div>
        <div className="lite-demo-scenario">{scenario}</div>
      </div>
    </div>;
};

## Overview

The Cartoon Model is tuned for animated characters. Use it to bring mascots, animals, creatures, anime characters, and talking objects to life:

* Instant avatar creation from a single image
* Works on characters without human anatomy
* Tuned for extra expressiveness and entertainment value

<Tip>
  The Cartoon Model is available to LemonSlice users on all subscription levels.
</Tip>

## Examples

Every character below was created from a single image, from 3D animated characters to anime. Select a card to play it.

<div className="lite-demo-grid not-prose">
  <DemoCard scenario="Captain Pip, which way should we go?">
    <img className="lite-demo-poster" src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/images/cartoon/penguin.webp?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=c616290c0c76859ec04f9762277ef4b0" alt="" width="416" height="672" data-path="images/cartoon/penguin.webp" />

    <video className="lite-demo-clip" playsInline preload="metadata" loop>
      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/penguin.mp4?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=de0e615634f0ae6e6d55fadaddcf5864" type="video/mp4" data-path="videos/cartoon/penguin.mp4" />

      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/penguin.webm?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=13385b6ea5cb99c706fc9550ee2ad469" type="video/webm" data-path="videos/cartoon/penguin.webm" />
    </video>
  </DemoCard>

  <DemoCard scenario="Professor Shelly, how do sea turtles find their way home?">
    <img className="lite-demo-poster" src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/images/cartoon/turtle.webp?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=ca2283799d99d75a7b2197933d71469a" alt="" width="416" height="672" data-path="images/cartoon/turtle.webp" />

    <video className="lite-demo-clip" playsInline preload="metadata" loop>
      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/turtle.mp4?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=529fbab9af3ecf1a49c07d23a8eaedfc" type="video/mp4" data-path="videos/cartoon/turtle.mp4" />

      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/turtle.webm?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=9b1ad470f3c2fed8deb763a29ea1d5ea" type="video/webm" data-path="videos/cartoon/turtle.webm" />
    </video>
  </DemoCard>

  <DemoCard scenario="Hey, Mochi, what's on my schedule today?">
    <img className="lite-demo-poster" src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/images/cartoon/axolotl.webp?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=eb83216b85e952534cf5b119e9b994f2" alt="" width="416" height="672" data-path="images/cartoon/axolotl.webp" />

    <video className="lite-demo-clip" playsInline preload="metadata" loop>
      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/axolotl.mp4?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=3e1283b0d6d4dd16c711551b042b009a" type="video/mp4" data-path="videos/cartoon/axolotl.mp4" />

      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/axolotl.webm?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=0612bf0985935b7d7d949dc810bfdf73" type="video/webm" data-path="videos/cartoon/axolotl.webm" />
    </video>
  </DemoCard>

  <DemoCard scenario="Gizmo, what do you miss most about home?">
    <img className="lite-demo-poster" src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/images/cartoon/alien.webp?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=cdc0cfdcba8d9ee2c7d15d9faee9dc15" alt="" width="416" height="672" data-path="images/cartoon/alien.webp" />

    <video className="lite-demo-clip" playsInline preload="metadata" loop>
      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/alien.mp4?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=b71484f7fc13ddd9d96f5c3a836eb65e" type="video/mp4" data-path="videos/cartoon/alien.mp4" />

      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/alien.webm?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=f932299db85ef78c5db0a1915a35ac0a" type="video/webm" data-path="videos/cartoon/alien.webm" />
    </video>
  </DemoCard>

  <DemoCard scenario="How do I say good morning in Japanese?">
    <img className="lite-demo-poster" src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/images/cartoon/hana.webp?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=7f70620b583ccf691ba0cc49b2be66ee" alt="" width="416" height="672" data-path="images/cartoon/hana.webp" />

    <video className="lite-demo-clip" playsInline preload="metadata" loop>
      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/hana.mp4?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=2890ae6351fb8d701330cea5a4d161e1" type="video/mp4" data-path="videos/cartoon/hana.mp4" />

      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/hana.webm?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=66d870c419040f7ce3ca8cbbb1565156" type="video/webm" data-path="videos/cartoon/hana.webm" />
    </video>
  </DemoCard>

  <DemoCard scenario="Any tips for this boss fight?">
    <img className="lite-demo-poster" src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/images/cartoon/kenji.webp?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=11abd9a44da6e707c05f0866557fa5a4" alt="" width="416" height="672" data-path="images/cartoon/kenji.webp" />

    <video className="lite-demo-clip" playsInline preload="metadata" loop>
      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/kenji.mp4?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=4e93b05f20424602bc4e38300c026dd9" type="video/mp4" data-path="videos/cartoon/kenji.mp4" />

      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/kenji.webm?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=5ff6a0d6cb811a46b38352c85e788a2e" type="video/webm" data-path="videos/cartoon/kenji.webm" />
    </video>
  </DemoCard>

  <DemoCard scenario="What's beyond the forest?">
    <img className="lite-demo-poster" src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/images/cartoon/sora.webp?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=2e7d4865c6096ceb7b8c88656c9dee2c" alt="" width="416" height="672" data-path="images/cartoon/sora.webp" />

    <video className="lite-demo-clip" playsInline preload="metadata" loop>
      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/sora.mp4?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=d0dbeea1bf9cefb0646241cc175124da" type="video/mp4" data-path="videos/cartoon/sora.mp4" />

      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/sora.webm?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=f0d26cc99321e885da6d696a6a370958" type="video/webm" data-path="videos/cartoon/sora.webm" />
    </video>
  </DemoCard>

  <DemoCard scenario="How should I warm up before a run?">
    <img className="lite-demo-poster" src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/images/cartoon/riku.webp?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=4831bf9cee236cea5322191d3e93b4d6" alt="" width="416" height="672" data-path="images/cartoon/riku.webp" />

    <video className="lite-demo-clip" playsInline preload="metadata" loop>
      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/riku.mp4?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=5f9fdbc285fb66eee4bdebd092beaaa0" type="video/mp4" data-path="videos/cartoon/riku.mp4" />

      <source src="https://mintcdn.com/lemonslice/9BzQH7V2hUv4h5rN/videos/cartoon/riku.webm?fit=max&auto=format&n=9BzQH7V2hUv4h5rN&q=85&s=a5d024820e3b7462929e1c5bb6926d15" type="video/webm" data-path="videos/cartoon/riku.webm" />
    </video>
  </DemoCard>
</div>

## Usage

Set the optional `model` parameter to `"cartoon"` when starting a session. The only supported `aspect_ratio` is `"2x3"`.

<CodeGroup>
  ```python LiveKit (Python) theme={null}
  avatar = lemonslice.AvatarSession(
      agent_image_url="...",
      model="cartoon",
      aspect_ratio="2x3",
  )
  ```

  ```javascript LiveKit (Node.js) theme={null}
  const avatar = new lemonslice.AvatarSession({
    agentImageUrl: "...",
    extraPayload: { model: "cartoon", aspectRatio: "2x3" },
  });
  ```

  ```python Pipecat (Python) theme={null}
  transport = LemonSliceTransport(
      ...
      session_request=LemonSliceNewSessionRequest(
          agent_image_url="...",
          model="cartoon",
          aspect_ratio="2x3",
      ),
  )
  ```

  ```json Agora theme={null}
  {
    "avatar": {
      "vendor": "generic",
      "enable": true,
      "params": {
        "api_key": "<lemonslice_api_key>",
        "api_base_url": "https://lemonslice.com/api/liveai/agora",
        "avatar_id": "lemonslice",
        "agent_image_url": "<public_image_url>",
        "model": "cartoon",
        "aspect_ratio": "2x3",
        "video_encoding": "H264",
        "agora_uid": "<avatar_rtc_uid>",
        "agora_token": "<avatar_rtc_token>"
      }
    }
  }
  ```

  ```bash WebSocket theme={null}
  curl --request POST \
    --url "https://lemonslice.com/api/liveai/sessions" \
    --header "X-API-Key: $LEMONSLICE_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
      "transport_type": "websocket-livekit",
      "agent_image_url": "https://example.com/avatar.png",
      "model": "cartoon",
      "aspect_ratio": "2x3",
      "livekit_properties": {
        "livekit_url": "wss://your-project.livekit.cloud",
        "livekit_token": "<agent_access_token>"
      }
    }'
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.