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

# Uploading from YouTube

> Process a YouTube video by its link.

Pass a link to the video, and AiGenda downloads the audio track itself.

```bash theme={null}
curl -X POST https://api.aigenda.tech/api/spaces/1024/audio/by_youtube/ \
  -H "Authorization: Bearer <access>" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.youtube.com/watch?v=VIDEO_ID"}'
```

```json Response 201 theme={null}
{ "audio_id": 51234 }
```

| Field | Rule |
| - | - |
| `url` | YouTube video link, up to 2048 characters. The video must open without signing in |

You don't set a title or format. While the video downloads, the recording is hidden from the list; once downloaded, it gets the video's title.

## What's next

As with [uploading by URL](/en/upload/url), the file is downloaded after the response:

1. Take `audio_id` from the response.
2. Poll [`info/`](/en/api-reference/audio/info) for that `audio_id` until you get `is_uploaded: true`. A long video takes longer to download.
3. Start [processing](/en/processing/start).

If the video can't be downloaded, the recording stays at `is_uploaded: false` with no separate error. Set a wait timeout and treat the upload as failed after it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.