diff --git a/cloudinary/utils.py b/cloudinary/utils.py
index bf4cac4..a112aa6 100644
--- a/cloudinary/utils.py
+++ b/cloudinary/utils.py
@@ -8,6 +8,7 @@ import re
 import string
 import struct
 import time
+import urllib
 import zlib
 from collections import OrderedDict
 from datetime import datetime, date
@@ -557,7 +558,8 @@ def cloudinary_api_url(action='upload', **options):
     if not cloud_name:
         raise ValueError("Must supply cloud_name")
     resource_type = options.get("resource_type", "image")
-    return "/".join([cloudinary_prefix, "v1_1", cloud_name, resource_type, action])
+
+    return encode_unicode_url("/".join([cloudinary_prefix, "v1_1", cloud_name, resource_type, action]))
 
 
 def smart_escape(source, unsafe=r"([^a-zA-Z0-9_.\-\/:]+)"):
@@ -962,6 +964,20 @@ def base64_encode_url(url):
     return b64.decode('ascii')
 
 
+def encode_unicode_url(url_str):
+    """
+    Quote and encode possible unicode url string (applicable for python2)
+
+    :param url_str: Url string to encode
+
+    :return: Encoded string
+    """
+    if six.PY2:
+        url_str = urllib.quote(url_str.encode('utf-8'), ":/?#[]@!$&'()*+,;=")
+
+    return url_str
+
+
 def __json_serializer(obj):
     """JSON serializer for objects not serializable by default json code"""
     if isinstance(obj, (datetime, date)):

diff --git a/test/test_utils.py b/test/test_utils.py
index 591cbab..ccb82fc 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -10,7 +10,7 @@ import six
 from mock import patch
 
 import cloudinary.utils
-from cloudinary.utils import build_list_of_dicts, json_encode
+from cloudinary.utils import build_list_of_dicts, json_encode, encode_unicode_url
 from test.helper_test import TEST_IMAGE, REMOTE_TEST_IMAGE
 
 
@@ -816,6 +816,10 @@ class TestUtils(unittest.TestCase):
             json_encode({"t": self})
         self.assertIn("is not JSON serializable", str(te.exception))
 
+    def test_encode_unicode_url(self):
+        self.assertEqual("string", encode_unicode_url("string"))
+        self.assertEqual("encoded", encode_unicode_url(u"encoded"))
+
     def test_is_remote_url(self):
         self.assertFalse(cloudinary.utils.is_remote_url(TEST_IMAGE))
         self.assertTrue(cloudinary.utils.is_remote_url(REMOTE_TEST_IMAGE))

Using unicode literals in config causes UnicodeDecodeError on upload
If the `CLOUDINARY` settings are defined in a python file which uses unicode literals (or if the `cloud_name` is defined as a unicode literal manually) there is an error thrown deep down inside `httplib.py`. The reason for this is that `cloudinary_api_url` joins together all of the url parts which, if one of these elements is unicode, generates a URL which is a unicode string.

```
In [1]: "/".join(('non-unicode', u'unicode'))
Out[1]: u'non-unicode/unicode'
```

There was a python bug raised for this here https://bugs.python.org/issue11898 but it looks like it was treated as an invalid input. I guess you could say the same thing here and that passing a unicode string is undefined behaviour but at least this bug might help someone else with this problem.
test/test_utils.py::TestUtils::test_angle test/test_utils.py::TestUtils::test_array_should_define_a_set_of_variables test/test_utils.py::TestUtils::test_aspect_ratio test/test_utils.py::TestUtils::test_audio_codec test/test_utils.py::TestUtils::test_audio_frequency test/test_utils.py::TestUtils::test_background test/test_utils.py::TestUtils::test_base_transformation_array test/test_utils.py::TestUtils::test_base_transformations test/test_utils.py::TestUtils::test_bit_rate test/test_utils.py::TestUtils::test_border test/test_utils.py::TestUtils::test_build_list_of_dicts test/test_utils.py::TestUtils::test_cloud_name test/test_utils.py::TestUtils::test_cloud_name_options test/test_utils.py::TestUtils::test_cname test/test_utils.py::TestUtils::test_cname_subdomain test/test_utils.py::TestUtils::test_crop test/test_utils.py::TestUtils::test_default_image test/test_utils.py::TestUtils::test_density test/test_utils.py::TestUtils::test_disallow_url_suffix_in_non_upload_types test/test_utils.py::TestUtils::test_disallow_url_suffix_with_slash_or_dot test/test_utils.py::TestUtils::test_disallow_use_root_path_if_not_image_upload test/test_utils.py::TestUtils::test_dollar_key_should_define_a_variable test/test_utils.py::TestUtils::test_dpr test/test_utils.py::TestUtils::test_duration test/test_utils.py::TestUtils::test_effect test/test_utils.py::TestUtils::test_effect_with_array test/test_utils.py::TestUtils::test_effect_with_dict test/test_utils.py::TestUtils::test_encode_context test/test_utils.py::TestUtils::test_encode_unicode_url test/test_utils.py::TestUtils::test_end_offset test/test_utils.py::TestUtils::test_escape_public_id test/test_utils.py::TestUtils::test_escape_public_id_with_non_ascii_characters test/test_utils.py::TestUtils::test_fetch test/test_utils.py::TestUtils::test_fetch_format test/test_utils.py::TestUtils::test_fetch_overlay test/test_utils.py::TestUtils::test_flags test/test_utils.py::TestUtils::test_folder_version test/test_utils.py::TestUtils::test_format test/test_utils.py::TestUtils::test_html_width_height_on_angle test/test_utils.py::TestUtils::test_html_width_height_on_crop_fit_limit test/test_utils.py::TestUtils::test_http_escape test/test_utils.py::TestUtils::test_http_private_cdn test/test_utils.py::TestUtils::test_ignore_http test/test_utils.py::TestUtils::test_is_remote_url test/test_utils.py::TestUtils::test_json_encode test/test_utils.py::TestUtils::test_keyframe_interval test/test_utils.py::TestUtils::test_merge test/test_utils.py::TestUtils::test_no_empty_transformation test/test_utils.py::TestUtils::test_norm_auto_range_value test/test_utils.py::TestUtils::test_norm_range_value test/test_utils.py::TestUtils::test_not_sign_the_url_suffix test/test_utils.py::TestUtils::test_offset test/test_utils.py::TestUtils::test_original_width_and_height test/test_utils.py::TestUtils::test_overlay test/test_utils.py::TestUtils::test_overlay_error_1 test/test_utils.py::TestUtils::test_overlay_error_2 test/test_utils.py::TestUtils::test_overlay_options test/test_utils.py::TestUtils::test_page test/test_utils.py::TestUtils::test_put_format_after_url_suffix test/test_utils.py::TestUtils::test_raw_transformation test/test_utils.py::TestUtils::test_resource_type test/test_utils.py::TestUtils::test_responsive_width test/test_utils.py::TestUtils::test_secure_akamai test/test_utils.py::TestUtils::test_secure_distibution test/test_utils.py::TestUtils::test_secure_distribution test/test_utils.py::TestUtils::test_secure_distribution_overwrite test/test_utils.py::TestUtils::test_secure_non_akamai test/test_utils.py::TestUtils::test_shorten test/test_utils.py::TestUtils::test_should_place_defined_variables_before_ordered test/test_utils.py::TestUtils::test_should_sort_defined_variable test/test_utils.py::TestUtils::test_should_support_auto_value test/test_utils.py::TestUtils::test_should_support_auto_width test/test_utils.py::TestUtils::test_should_support_string_interpolation test/test_utils.py::TestUtils::test_should_support_text_values test/test_utils.py::TestUtils::test_signed_url test/test_utils.py::TestUtils::test_size test/test_utils.py::TestUtils::test_start_offset test/test_utils.py::TestUtils::test_streaming_profile test/test_utils.py::TestUtils::test_support_a_percent_value test/test_utils.py::TestUtils::test_support_cdn_subdomain_with_secure_on_if_using_shared_domain test/test_utils.py::TestUtils::test_support_secure_cdn_subdomain_true_override_with_secure test/test_utils.py::TestUtils::test_support_url_suffix_for_private_cdn test/test_utils.py::TestUtils::test_support_url_suffix_for_raw_uploads test/test_utils.py::TestUtils::test_support_use_root_path_for_private_cdn test/test_utils.py::TestUtils::test_support_use_root_path_for_shared_cdn test/test_utils.py::TestUtils::test_support_use_root_path_together_with_url_suffix_for_private_cdn test/test_utils.py::TestUtils::test_transformation_array test/test_utils.py::TestUtils::test_transformation_simple test/test_utils.py::TestUtils::test_translate_if test/test_utils.py::TestUtils::test_type test/test_utils.py::TestUtils::test_underlay test/test_utils.py::TestUtils::test_user_agent test/test_utils.py::TestUtils::test_various_options test/test_utils.py::TestUtils::test_video_codec test/test_utils.py::TestUtils::test_video_sampling