Upload your own media resources.
This document will guide you on how to upload your own media files (such as images or audio) via the Jogg.ai API. After a successful upload, you will receive a Jogg.ai-hosted URL, which can be used in other API calls, for example, as a video background or a custom voice source.
Why use this API?
When creating a video, certain parameters (like background_url
or audio_url
) require a publicly accessible URL. If your media file is not on a public server, you can use this API to upload the file to Jogg.ai’s secure servers to obtain a temporary, usable hosted URL.
Even if you have a publicly accessible URL, we still recommend uploading it to Jogg.ai’s secure servers, as your own URL might cause the task to fail due to network instability.
media_url
.media_url
as the value for the corresponding parameter.multipart/form-data
request body format.You can upload media to obtain your sign_url
and asset_id
.
sign_url
: Used as the address to upload media.asset_id
: Gets the address of the uploaded resource.Please refer to the Upload Media for more details.
Request:
Response:
You can upload pictures, videos, audio and other media resources.
Use the following cURL command to upload the file to the server. Make sure to replace <file-binary-data> with the actual binary data of the file.
Request:
Pesponse:
Now asset_id
is an available address to get resources.
Here’s an example:
Upload your own media resources.
This document will guide you on how to upload your own media files (such as images or audio) via the Jogg.ai API. After a successful upload, you will receive a Jogg.ai-hosted URL, which can be used in other API calls, for example, as a video background or a custom voice source.
Why use this API?
When creating a video, certain parameters (like background_url
or audio_url
) require a publicly accessible URL. If your media file is not on a public server, you can use this API to upload the file to Jogg.ai’s secure servers to obtain a temporary, usable hosted URL.
Even if you have a publicly accessible URL, we still recommend uploading it to Jogg.ai’s secure servers, as your own URL might cause the task to fail due to network instability.
media_url
.media_url
as the value for the corresponding parameter.multipart/form-data
request body format.You can upload media to obtain your sign_url
and asset_id
.
sign_url
: Used as the address to upload media.asset_id
: Gets the address of the uploaded resource.Please refer to the Upload Media for more details.
Request:
Response:
You can upload pictures, videos, audio and other media resources.
Use the following cURL command to upload the file to the server. Make sure to replace <file-binary-data> with the actual binary data of the file.
Request:
Pesponse:
Now asset_id
is an available address to get resources.
Here’s an example: