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

# Raw HTTP Quickstart

> Dùng cURL để tải lên một tệp, tạo một dự án, thăm dò tác vụ và xuất đầu ra karaoke đã hoàn tất.

# Khởi động nhanh Raw HTTP

Dùng hướng dẫn này khi bạn muốn các ví dụ HTTP trực tiếp.

Nếu bạn đang phát triển bằng Node.js hoặc Bun, hãy bắt đầu với [Khởi động nhanh SDK Node.js](/vi/sdk) thay vì vậy.

## 1. Tạo một đích tải lên

```bash theme={null}
curl -X POST https://api.youka.io/vi/api/v1/uploads \
  -H "Authorization: Bearer yk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "song.mp3",
    "contentType": "audio/mpeg",
    "contentLength": 12345678
  }'
```

Tải lên các byte của tệp tới `uploadUrl` được trả về.

## 2. Tạo một dự án

```bash theme={null}
curl -X POST https://api.youka.io/vi/api/v1/projects \
  -H "Authorization: Bearer yk_..." \
  -H "Idempotency-Key: create-project-song-1" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Artist - Song",
    "inputFileId": "file_123",
    "lyricsSource": {
      "type": "align",
      "lyrics": "First line\nSecond line\n...",
      "syncModel": "musicai-alignment",
      "language": "en"
    },
    "splitModel": "mdx23c"
  }'
```

## 3. Thăm dò tác vụ

```bash theme={null}
curl https://api.youka.io/vi/api/v1/tasks/task_123 \
  -H "Authorization: Bearer yk_..."
```

Khi tác vụ ở trạng thái kết thúc, `output` của nó sẽ chứa các ID kết quả chính cho thao tác.

## 4. Đọc trạng thái dự án

```bash theme={null}
curl https://api.youka.io/vi/api/v1/projects/proj_123 \
  -H "Authorization: Bearer yk_..."
```

Lệnh này trả về trạng thái dự án tồn tại lâu dài, bao gồm stems, căn chỉnh, xuất, và các thiết lập dự án đang hoạt động.

## 5. Tạo một bản xuất

```bash theme={null}
curl -X POST https://api.youka.io/vi/api/v1/projects/proj_123/exports \
  -H "Authorization: Bearer yk_..." \
  -H "Idempotency-Key: export-song-1" \
  -H "Content-Type: application/json" \
  -d '{
    "resolution": "1080p",
    "quality": "high"
  }'
```

Sau đó thăm dò tác vụ được trả về hoặc đọc trực tiếp bản xuất:

```bash theme={null}
curl https://api.youka.io/vi/api/v1/exports/export_123 \
  -H "Authorization: Bearer yk_..."
```
