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

# Quickstart

> Create your first AI video in under 5 minutes

## Get Your API Key

First, you'll need an API key to authenticate your requests.

<Steps>
  <Step title="Sign up or log in">
    Go to [hooked.so](https://hooked.so) and create an account or log in
  </Step>

  <Step title="Navigate to API settings">
    Go to Settings → API Keys in your dashboard
  </Step>

  <Step title="Generate API key">
    Click "Generate New API Key" and save it securely
  </Step>
</Steps>

<Warning>
  Keep your API key secret! Never commit it to version control or share it publicly.
</Warning>

## Your First Video

Let's create a simple educational video using the Class project type.

### Step 1: List Available Avatars

First, let's see which avatars are available:

```bash theme={null}
curl -X GET "https://api.hooked.so/v1/avatar/list" \
  -H "x-api-key: your_api_key_here"
```

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "avatars": [
        {
          "id": "avatar_sarah_01",
          "name": "Sarah",
          "gender": "Female",
          "age": "Young",
          "type": "Realistic",
          "thumbnail": "https://...",
          "isCustom": false
        }
      ],
      "total": 50
    }
  }
  ```
</ResponseExample>

### Step 2: List Available Voices

Now let's get the available voices:

```bash theme={null}
curl -X GET "https://api.hooked.so/v1/voice/list?language=English&gender=Female" \
  -H "x-api-key: your_api_key_here"
```

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "voices": [
        {
          "id": "1004",
          "voiceId": "tzX5paJ07p5hyWFcU3uG",
          "name": "Jude",
          "gender": "Male",
          "language": "English",
          "accent": "British"
        }
      ],
      "total": 150
    }
  }
  ```
</ResponseExample>

### Step 3: Create Your Video

Now that you have an avatar ID and voice ID, create your video:

```bash theme={null}
curl -X POST "https://api.hooked.so/v1/project/create" \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "class",
    "name": "My First Tutorial",
    "script": "Hello! Welcome to this tutorial. Today, I will show you how to use our amazing product. It is very simple and easy to understand. Let me guide you through the key features.",
    "avatarId": "avatar_sarah_01",
    "voiceId": "tzX5paJ07p5hyWFcU3uG",
    "webhook": "https://your-domain.com/webhook"
  }'
```

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "message": "Project created successfully",
    "data": {
      "projectId": "proj_abc123",
      "status": "processing",
      "estimatedTime": "3-5 minutes"
    }
  }
  ```
</ResponseExample>

### Step 4: Receive Webhook Notification

When your video is ready, we'll send a POST request to your webhook URL:

```json theme={null}
{
  "event": "project.completed",
  "projectId": "proj_abc123",
  "status": "completed",
  "video": {
    "id": "video_xyz789",
    "url": "https://cdn.hooked.so/videos/xyz789.mp4",
    "duration": 45,
    "thumbnail": "https://cdn.hooked.so/thumbnails/xyz789.jpg"
  },
  "createdAt": "2024-01-15T10:30:00Z",
  "completedAt": "2024-01-15T10:33:00Z"
}
```

<Check>
  Congratulations! You've just created your first AI video with Hooked.
</Check>

## Next Steps

<CardGroup cols={2}>
  <Card title="Add Music & Captions" icon="music" href="/api-reference/music/list">
    Enhance your videos with background music and captions
  </Card>

  <Card title="View Examples" icon="book" href="/examples/class-video">
    See complete code examples for different use cases
  </Card>

  <Card title="Use Templates" icon="clone" href="/api-reference/template/list">
    Create personalized videos at scale with templates
  </Card>

  <Card title="Complete Workflow" icon="diagram-project" href="/api-reference/video/workflow">
    Learn the end-to-end video creation process
  </Card>
</CardGroup>

## Common Issues

<AccordionGroup>
  <Accordion title="Authentication failed">
    Make sure your API key is correct and included in the `x-api-key` header. API keys can be managed in your dashboard settings.
  </Accordion>

  <Accordion title="Invalid avatar or voice ID">
    Double-check that the IDs exist by listing resources first. IDs are case-sensitive.
  </Accordion>

  <Accordion title="Script too short or too long">
    Scripts should be between 10 and 5000 characters. Very short scripts may not generate meaningful videos.
  </Accordion>

  <Accordion title="Webhook not receiving notifications">
    Ensure your webhook URL is publicly accessible and returns a 200 status code. Test it with a tool like webhook.site first.
  </Accordion>
</AccordionGroup>

## Tips for Better Videos

<Tip>
  **Write natural scripts**: Write as if you're speaking to a friend. Avoid overly formal or robotic language.
</Tip>

<Tip>
  **Match voice to avatar**: Choose voices that match your avatar's age and gender for more authentic results.
</Tip>

<Tip>
  **Add pauses**: Use commas and periods naturally to create appropriate pauses in speech.
</Tip>

<Tip>
  **Test webhooks**: Use services like webhook.site to test your webhook integration before going live.
</Tip>
