Download a file from a repository.
Example
You can download any public files without authentication.
curl -X GET \
https://hub.oxen.ai/api/repos/ox/CatVsDogBoundingBox/file/main/images/000000000400.jpg \
-o ~/Downloads/dog.jpg
Authentication
If you want to download files from your own private repositories, you must supply the Authorization
header with a valid token.
curl -X GET -H "Authorization: Bearer $TOKEN" \
https://hub.oxen.ai/api/repos/my-namespace/my-private-repo/file/main/secret_image.png \
-o ~/Downloads/secret_image.png
Pre-signed URLs
You can also get a pre-signed URL for a file. This is useful if you want to download a file from a web page.
curl -X GET -H "Authorization: Bearer $TOKEN" \
https://hub.oxen.ai/api/repos/my-namespace/my-private-repo/file/presigned_url/main/secret_image.png