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

# API quickstart

> Generate your first Yuzu video via the API in under five minutes.

This walk-through generates a 60–70 second sales-email video from a call summary using the public API. If you're driving Yuzu from the dashboard instead, see the [UI quickstart](/quickstart).

## 1. Get an API key

1. Sign in at [app.yuzulabs.io](https://app.yuzulabs.io).
2. Open **Settings → API Keys**.
3. Click **Create key**, give it a name, and select scopes: `flows:create`, `flows:read`, `flows:approve`, `flows:cancel`. Use `*` for full access.
4. Copy the key. It starts with `yzlk_` and is only shown once.

<Warning>
  Keys are scoped to a single workspace. Treat them like passwords — never commit them to source control.
</Warning>

## 2. Make sure your workspace is ready

Before the first request, your workspace needs:

* At least one **avatar** that's been processed (16:9).
* A configured **ElevenLabs voice** (or use the workspace default).
* Available **video quota**.

You can confirm all three from **Settings → Brand & Voice**.

## 3. Create a video

```bash theme={null}
curl -X POST https://app.yuzulabs.io/api/v1/flows/sales-email-video \
  -H "Authorization: Bearer yzlk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "emailContent": "Great call with John from Acme Corp today. We discussed video marketing pain points: (1) production time, (2) brand consistency, (3) scaling content. Next step: send a product demo.",
    "autoApproveScript": true,
    "prospectName": "John",
    "prospectCompany": "Acme Corp"
  }'
```

You'll get back a `flowId`. The flow runs asynchronously — script → segments → voice → render.

## 4. Poll for completion

```bash theme={null}
curl https://app.yuzulabs.io/api/v1/flows/sales-email-video/{flowId} \
  -H "Authorization: Bearer yzlk_your_api_key_here"
```

When `status` is `completed`, the response includes `videoUrl`.

## Next steps

<CardGroup cols={2}>
  <Card title="Full API reference" icon="book" href="/api-reference/sales-email-video">
    Every parameter, status, and error code.
  </Card>

  <Card title="Authentication and errors" icon="shield" href="/api-reference/introduction">
    Bearer tokens, scopes, error codes.
  </Card>
</CardGroup>
