> ## 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.

# क्विकस्टार्ट

> एक कराओके प्रोजेक्ट बनाएं, उसके पूरा होने का इंतज़ार करें, उसे एक्सपोर्ट करें, और परिणाम डाउनलोड करें

यह गाइड `@youka/sdk` का उपयोग करके एक कच्ची ऑडियो फ़ाइल से रेंडर किए गए कराओके वीडियो तक पहुँचने का सबसे तेज़ रास्ता बताती है।

## शुरू करने से पहले

* Node.js 20 या बाद का संस्करण
* `YOUKA_API_KEY` में एक Youka API key ( **API keys** के तहत [online.youka.io/account](https://online.youka.io/account) पर जाकर एक बनाएं)
* एक लोकल ऑडियो फ़ाइल (`./song.mp3`) या एक रिमोट URL

## इंस्टॉल

```bash theme={null}
npm install @youka/sdk
```

## बनाएं, इंतज़ार करें, एक्सपोर्ट करें

```ts theme={null}
import { YoukaClient, YoukaRequestError, YoukaTaskError } from "@youka/sdk";

const client = new YoukaClient({
  apiKey: process.env.YOUKA_API_KEY!,
});

async function main() {
  // 1. एक लोकल फ़ाइल से प्रोजेक्ट बनाएं
  const projectOperation = await client.projects.create({
    source: { type: "path", path: "./song.mp3" },
    lyricsSource: { type: "transcribe" },
  });

  // 2. stems और lyrics sync के पूरा होने का इंतज़ार करें
  const { project } = await client.projects.wait(projectOperation);
  console.log("Project ready:", project.id, project.title);

  // 3. एक एक्सपोर्ट शुरू करें
  const exportOperation = await client.exports.create(project.id, {
    resolution: "1080p",
    quality: "high",
  });

  // 4. एक्सपोर्ट के पूरा होने का इंतज़ार करें
  const finishedExport = await client.exports.wait(exportOperation);
  await client.exports.download(finishedExport, {
    output: "./exports",
  });
  console.log("Export ready:", finishedExport.url);
}

main().catch((error) => {
  if (error instanceof YoukaRequestError) {
    console.error("Request failed:", error.code, error.status, error.message);
    process.exit(1);
  }
  if (error instanceof YoukaTaskError) {
    console.error("Task failed:", error.code, error.status, error.message);
    process.exit(1);
  }
  throw error;
});
```

<Note>
  `client.projects.create()` `path`, `bytes`, और `url`
  sources के लिए uploads संभालता है। लो-लेवल upload नियंत्रण के लिए, `client.uploads.*` का उपयोग करें।
</Note>

## तीन source types

<Tabs>
  <Tab title="लोकल फ़ाइल">
    ```ts theme={null}
    const operation = await client.projects.create({
      source: { type: "path", path: "./song.mp3" },
    });
    ```
  </Tab>

  <Tab title="इन-मेमोरी bytes">
    ```ts theme={null}
    const fileBuffer = new Uint8Array([/* audio bytes */]);

    const operation = await client.projects.create({
      source: {
        type: "bytes",
        data: fileBuffer,
        filename: "song.mp3",
      },
    });
    ```
  </Tab>

  <Tab title="रिमोट URL">
    ```ts theme={null}
    const operation = await client.projects.create({
      source: {
        type: "url",
        url: "https://example.com/song.mp4",
      },
    });
    ```
  </Tab>
</Tabs>

## आगे क्या

* [Projects](/hi/sdk/projects) — पूर्ण projects API
* [Exports](/hi/sdk/exports) — लोकल render और `client.exports.prepareLocal`
* [Errors](/hi/sdk/errors) — `YoukaRequestError` और `YoukaTaskError` को संभालें
* [AI agents](/hi/agents) — अनुशंसित polling और retry पैटर्न
