Skip to main content

Can I specify the destination folder when uploading files via the API?

Keep your media files perfectly organized from the moment you upload them using the Speak AI API. This feature allows you to automatically direct your uploaded files into specific folders, making i...

Vatsal Shah avatar
Written by Vatsal Shah
Updated over 2 weeks ago

API File Upload Folders

Overview

Keep your media files perfectly organized from the moment you upload them using the Speak AI API. This feature allows you to automatically direct your uploaded files into specific folders, making it easier to manage and locate your content later.

No more manual sorting after uploads! By specifying a destination folder, you ensure that your audio and video files are categorized correctly right away, saving you time and effort.

How It Works

When you upload files through the Speak AI API, you can now tell us exactly which folder they should go into. Simply include a special parameter in your API request. If you don't specify a folder, your files will be placed in your main media library.

Getting Started

To use this feature, you'll need your Speak AI API Key and the ID of the folder you want to upload to. You can find the folder ID in your Speak AI Dashboard.

To access this feature, go to API Docs.

Step-By-Step Guide

Follow these steps to upload files to a specific folder:

  1. Find Your Folder ID: Make a get request to list folders and select use the folderId folderId:. Copy this alphanumeric ID.

  2. Configure Your API Request: When making a POST request to https://api.speakai.co/api/v1/media/upload, add the folderId parameter to the body of your request.

  3. Send the Request: Submit your API call. The response you receive will confirm the folderId that was used for the upload.

Examples

Here's an example of what your API request payload might look like:

{
  "url": "https://example.com/audio.mp3",
  "folderId": "64f8a...",
  "name": "My API Upload"
}

Troubleshooting

If you encounter issues, here are some common problems and solutions:

  • Error: Invalid Folder ID: Double-check that the folderId you entered is exactly the same as the one from your dashboard URL. Also, ensure that your user account has permission to upload files to that specific folder.

Next Steps

Ready to streamline your media uploads? Here's what to do next:

  • Login to your account and navigate to the API settings section.

  • Try it out by uploading a file to a specific folder using the API.

  • Explore the options to see how this feature can best fit your workflow.

Need help? Contact our support team or check out our other guides.

Did this answer your question?