Untitled
Search…
python
1
import requests
2
3
url = 'https://api.taggun.io/api/receipt/v1/simple/file'
4
5
headers = {'apikey': 'yourapikey'}
6
7
files = {
8
'file': (
9
'1_Dinner.jpg', # set a filename for the file
10
open('1_Dinner.jpg', 'rb'), # the actual file
11
'image/jpg'), # content-type for the file
12
13
# other optional parameters for Taggun API (eg: incognito, refresh, ipAddress, language)
14
'incognito': (
15
None, #set filename to none for optional parameters
16
'false') #value for the parameters
17
}
18
19
response = requests.post(url, files=files, headers=headers)
20
21
print(response.content)
Copied!
Last modified 6mo ago
Copy link