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

# Quick Start

> Generate your first AI video in under 5 minutes with DomoAI Enterprise API

## Step 1: Get Your API Key

To get started, you'll need an API key. Visit the [Dashboard - API Keys](https://platform.domoai.com/api-keys) to generate your Enterprise API key.

<Note>
  You'll only see your API key once! Store it securely and never share it publicly.
</Note>

## Step 2: Generate Your First Video

### Simple Text-to-Video Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.domoai.com/v1/video/text2video" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <YOUR_API_KEY>" \
    -d '{
      "prompt": "A beautiful sunrise over mountains with flowing clouds",
      "model": "t2v-2.4-faster",
      "duration": 5
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.domoai.com/v1/video/text2video', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer <YOUR_API_KEY>'
    },
    body: JSON.stringify({
      prompt: 'A beautiful sunrise over mountains with flowing clouds',
      model: 't2v-2.4-faster',
      duration: 5
    })
  });

  const result = await response.json();
  console.log('Task ID:', result.data.task_id);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.domoai.com/v1/video/text2video',
      headers={
          'Content-Type': 'application/json',
          'Authorization': 'Bearer <YOUR_API_KEY>'
      },
      json={
          'prompt': 'A beautiful sunrise over mountains with flowing clouds',
          'model': 't2v-2.4-faster',
          'duration': 5
      }
  )

  result = response.json()
  print(f"Task ID: {result['data']['task_id']}")
  ```
</CodeGroup>

### Expected Response

```json theme={null}
{
  "data": {
    "task_id": "<YOUR_TASK_ID>"
  }
}
```

## Step 3: Check Your Video Status

Use the task ID to check your video generation status:

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer <YOUR_API_KEY>" \
    "https://api.domoai.com/v1/tasks/<YOUR_TASK_ID>"
  ```

  ```javascript JavaScript theme={null}
  const taskId = "<YOUR_TASK_ID>";
  const response = await fetch(`https://api.domoai.com/v1/tasks/${taskId}`, {
    headers: {
      'Authorization': 'Bearer <YOUR_API_KEY>'
    }
  });

  const task = await response.json();
  console.log('Status:', task.data.status);
  if (task.data.status === 'COMPLETED') {
    console.log('Video URL:', task.data.video_url);
  }
  ```

  ```python Python theme={null}
  import requests

  task_id = "<YOUR_TASK_ID>"

  response = requests.get(
      f"https://api.domoai.com/v1/tasks/{task_id}",
      headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
  )

  task = response.json()
  print(f"Status: {task['data']['status']}")
  if task['data']['status'] == 'COMPLETED':
      print(f"Video URL: {task['data']['video_url']}")
  ```
</CodeGroup>

## Common Quick Start Issues

<Accordion title="🔐 401 Unauthorized">
  **Problem**: "Invalid or revoked API Key"

  **Quick Fix**:

  * Double-check your API key is correct
  * Ensure you're using `Bearer <YOUR_API_KEY>` format
  * Verify key hasn't been revoked in [Dashboard - API Keys](https://platform.domoai.com/api-keys)
</Accordion>

<Accordion title="💳 402 Payment Required">
  **Problem**: "Insufficient credits"

  **Quick Fix**:

  * Check your credit balance in [Dashboard - Billing](https://platform.domoai.com/billing)
  * Purchase additional credits
</Accordion>

## Next Steps

Congratulations! You've generated your first AI video. Here's what to explore next:

<CardGroup cols={2}>
  <Card title="Complete API Guide" icon="book" href="/api-reference/introduction">
    Deep dive into all API features and best practices
  </Card>

  <Card title="Explore Templates" icon="palette" href="/resources/templates">
    Browse our collection of professional video templates
  </Card>

  <Card title="Authentication" icon="shield-halved" href="/api-reference/authentication">
    Learn about security best practices and error handling
  </Card>

  <Card title="Contact Support" icon="envelope" href="mailto:support@domoai.app">
    Get help from our support team via email
  </Card>
</CardGroup>
