> Docs index: https://movekit.com/llms.txt. HTML version: https://movekit.com/docs/guides/ai-workout-chatbot

# AI workout chatbots

Give your in-app AI workout coach real exercise slugs, audited form cues, and 16:9 looping 3D animations instead of plain-text lists.

## Keep clips grounded and on demand

An AI workout coach can recommend any exercise on demand, which makes shipping hundreds of video files inside an app bundle impractical. Turn on [MoveKit Hosted](https://movekit.com/docs/hosted) on your account, sync `movekit/embeds.json` on your backend at build or deploy time, and attach your own clean Hosted video and poster URLs to each exercise your chatbot recommends.

> **Previews vs licensed clips**
>
> MoveKit's public MCP endpoint (`/mcp/catalog`) returns watermarked preview clips for discovery and in-chat demos. In production inside your own app, always map each slug to your licensed video and poster URLs from `movekit/embeds.json` (Hosted) or your own storage (self-hosted).

> **Keep your key on the server**
>
> Pass `MOVEKIT_API_KEY` only from your backend or build job, never from browser or mobile client code. Map model-selected slugs against your backend `embeds.json` or `catalog.json` so unowned or invented names never break playback.

## Connect OpenAI or Claude to MoveKit MCP

Both the OpenAI Responses API and the Anthropic Messages API call MoveKit's remote Streamable HTTP MCP server (`https://movekit.com/mcp`) directly from your backend. Instruct your model to run a two-step lookup: call `search_exercises` first to resolve verified MoveKit slugs, then pass those exact slugs to `get_exercise_cues` or `render_workout_plan`.

OpenAI Responses API:

```ts
import OpenAI from "openai"

const client = new OpenAI()
const response = await client.responses.create({
  model: "gpt-5",
  input: "Build a 30-minute dumbbell upper-body workout for a beginner.",
  tools: [
    {
      type: "mcp",
      server_label: "movekit",
      server_url: "https://movekit.com/mcp",
      authorization: process.env.MOVEKIT_API_KEY,
      allowed_tools: ["search_exercises", "get_exercise_cues", "list_owned"],
      require_approval: "never",
    },
  ],
})
```

Claude Messages API:

```ts
import Anthropic from "@anthropic-ai/sdk"

const anthropic = new Anthropic()
const message = await anthropic.beta.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 1500,
  betas: ["mcp-client-2026-09-15"],
  messages: [{ role: "user", content: "Build a 30-minute dumbbell upper-body workout." }],
  mcp_servers: [
    {
      type: "url",
      name: "movekit",
      url: "https://movekit.com/mcp",
      authorization_token: process.env.MOVEKIT_API_KEY,
    },
  ],
  tools: [{ type: "mcp_toolset", mcp_server_name: "movekit" }],
})
```

## Render looping workout cards in your chat UI

Once your model picks MoveKit slugs, hydrate each slug on your backend with your licensed video and poster URLs (from `movekit/embeds.json` on Hosted or your own storage) and render a 16:9 looping player.

Backend lookup (embeds.json):

```ts
import embeds from "./movekit/embeds.json"

const bySlug = new Map(embeds.data.map((row) => [row.slug, row]))

export function hydrateWorkout(slugs: string[]) {
  return slugs.flatMap((slug) => {
    const row = bySlug.get(slug)
    if (!row) return []
    return [{ slug: row.slug, name: row.name, videoUrl: row.video.url, posterUrl: row.poster.url }]
  })
}
```

React / Web:

```tsx
<video
  src={exercise.videoUrl}
  poster={exercise.posterUrl}
  autoPlay
  loop
  muted
  playsInline
  preload="metadata"
  style={{ aspectRatio: "16 / 9", width: "100%" }}
/>
```

OpenAI ChatKit:

```python
# ChatKit Widgets do not include a <Video> node.
# Show each exercise's 16:9 poster in an Image and open your app's native
# looping player via a client onClickAction.
item = {
    "type": "Button",
    "label": "Watch 3D",
    "onClickAction": {
        "type": "movekit.play_exercise",
        "handler": "client",
        "payload": {"slug": ex["slug"], "videoUrl": ex["videoUrl"], "posterUrl": ex["posterUrl"]},
    },
}
```

For web chatbots that support the open MCP Apps standard (`io.modelcontextprotocol/ui`), you can also render MoveKit's interactive `ui://movekit/workout-player.html` bundle inside a sandboxed iframe using `AppBridge` from `@modelcontextprotocol/ext-apps` or `@mcp-ui/client`.
