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

# Quickstart

> Submit your first AI job in under 5 minutes

# Quickstart

Get up and running with PixelByte API in three simple steps.

## Step 1: Get Your API Key

Create an API key from the [PixelByte Dashboard](https://developer.muvi.video).

1. Sign in to your account
2. Navigate to **Settings** > **API Keys**
3. Click **Create New Key**
4. Copy your key and store it securely

<Warning>
  Your API key is shown only once. Store it in a secure location like an environment variable.
</Warning>

```bash theme={null}
export PIXELBYTE_API_KEY="pb_your_api_key_here"
```

## Step 2: Submit Your First Job

Let's generate a video using Google's Veo model.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.muvi.video/v1/jobs/submit \
    -H "Authorization: Bearer $PIXELBYTE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "google/veo-3.1-fast/text-to-video",
      "input": {
        "prompt": "A cat playing piano"
      }
    }'
  ```

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

  url = "https://api.muvi.video/v1/jobs/submit"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
  }
  payload = {
      "model": "google/veo-3.1-fast/text-to-video",
      "input": {
          "prompt": "A cat playing piano"
      }
  }

  response = requests.post(url, json=payload, headers=headers)
  data = response.json()
  print(data)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.muvi.video/v1/jobs/submit", {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      model: "google/veo-3.1-fast/text-to-video",
      input: {
        prompt: "A cat playing piano"
      }
    })
  });

  const data = await response.json();
  console.log(data);
  ```
</CodeGroup>

**Response:**

```json theme={null}
{
  "success": true,
  "data": {
    "jobId": "job_abc123",
    "status": "pending",
    "model": "google/veo-3.1-fast/text-to-video",
    "estimatedCost": 500000,
    "createdAt": "2026-02-18T12:00:00Z"
  },
  "requestId": "req_xyz789"
}
```

<Tip>
  Save the `jobId` from the response — you'll need it to check the status and retrieve the result.
</Tip>

## Step 3: Check Job Status & Get Result

AI generation takes time. Poll the status endpoint until the job completes.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.muvi.video/v1/jobs/job_abc123 \
    -H "Authorization: Bearer $PIXELBYTE_API_KEY"
  ```

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

  job_id = "job_abc123"
  url = f"https://api.muvi.video/v1/jobs/{job_id}"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY"
  }

  while True:
      response = requests.get(url, headers=headers)
      data = response.json()
      status = data["data"]["status"]

      print(f"Status: {status}")

      if status == "completed":
          print(f"Output: {data['data']['output']['url']}")
          break
      elif status == "failed":
          print(f"Error: {data['data']['error']}")
          break

      time.sleep(5)
  ```

  ```javascript JavaScript theme={null}
  const jobId = "job_abc123";

  async function pollJob() {
    while (true) {
      const response = await fetch(
        `https://api.muvi.video/v1/jobs/${jobId}`,
        {
          headers: {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      );

      const data = await response.json();
      const status = data.data.status;

      console.log(`Status: ${status}`);

      if (status === "completed") {
        console.log(`Output: ${data.data.output.url}`);
        break;
      } else if (status === "failed") {
        console.log(`Error: ${data.data.error}`);
        break;
      }

      await new Promise((r) => setTimeout(r, 5000));
    }
  }

  pollJob();
  ```
</CodeGroup>

**Completed response:**

```json theme={null}
{
  "success": true,
  "data": {
    "jobId": "job_abc123",
    "status": "completed",
    "model": "google/veo-3.1-fast/text-to-video",
    "output": {
      "url": "https://cdn.muvi.video/outputs/job_abc123/output.mp4",
      "contentType": "video/mp4",
      "durationSeconds": 8
    },
    "cost": 480000,
    "createdAt": "2026-02-18T12:00:00Z",
    "completedAt": "2026-02-18T12:01:30Z"
  },
  "requestId": "req_def456"
}
```

<Info>
  **Tip:** Use [webhooks](/api-reference/webhooks) instead of polling to get notified when jobs complete.
</Info>

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Learn about API key scopes, IP whitelisting, and key rotation.
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference">
    Explore all available endpoints and parameters.
  </Card>
</CardGroup>
