What models does Upstage provide?
The table below lists models currently available as an API. Upstage provides stable aliases that point to specific model versions, allowing you to integrate once and automatically benefit from future updates. We recommend using aliases instead of hardcoding model names, as models can be frequently updated.
| Alias | Currently points to | RPS (Learn more) |
|---|---|---|
| document-parse | document-parse-260930 | 3 (Sync) / 6 (Async) |
| document-parse-nightly | - | 3 (Sync) / 6 (Async) |
| document-parse-experimental | - | 3 (Sync) / 6 (Async) |
Synchronous API
Request

invoice.png
# pip install requests
import requests
api_key = "UPSTAGE_API_KEY" # ex: up_xxxYYYzzzAAAbbbCCC
filename = "YOUR_FILE_NAME" # ex: ./image.png
url = "https://api.upstage.ai/v1/document-digitization"
headers = {"Authorization": f"Bearer {api_key}"}
files = {"document": open(filename, "rb")}
data = {"ocr": "force", "base64_encoding": "['table']", "model": "document-parse"}
response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())Response
{
"api": "2.0",
"content": {
"html": "<h1 id='0' style='font-size:22px'>INVOICE</h1>\n<h1 id='1' style='font-size:20px'>Company<br>Upstage</h1>\n<br><h1 id='2' style='font-size:18px'>Invoice ID</h1>\n<br><h1 id='3' style='font-size:14px'>ν΄ INV-AJ355548</h1>\n<h1 id='4' style='font-size:18px'>Invoice Date</h1>\n<br><h1 id='5' style='font-size:18px'>9/7/1992</h1>\n<h1 id='6' style='font-size:16px'>Mamo<br>Lucy Park</h1>\n<h1 id='7' style='font-size:18px'>Address</h1>\n<br><h1 id='8' style='font-size:16px'>7 Pepper Wood Street, 130 Stone Comer<br>Terrace<br>Wilkes Barre, Pennsylvania, 18768<br>United States</h1>\n<h1 id='9' style='font-size:16px'>Email</h1>\n<br><h1 id='10' style='font-size:16px'>Ikitchenman0@arizona.edu</h1>\n<br><h1 id='11' style='font-size:20px'>Service Details Form</h1>\n<h1 id='12' style='font-size:16px'>Name<br>Sung Kim</h1>\n<h1 id='13' style='font-size:16px'>260 'ess<br>Gwangovolungang:co 338, Gyeongg do.<br>Sanghyeon-dong, Sui-gu<br>Yongin-si, South Korea</h1>\n<h1 id='14' style='font-size:18px'>Additional Request</h1>\n<br><p id='15' data-category='paragraph' style='font-size:14px'>Vivamus vestibulum sagittis sapien. Cum sociis natoque<br>penatibus νλͺ© magnis dfs parturient montes, nascetur ridiculus<br>mus.</p>\n<h1 id='16' style='font-size:14px'>TERMS AND CONDITIONS</h1>\n<p id='17' data-category='list' style='font-size:14px'>L TM Seir that not be lable 1μΈ΅ the Buyer drectly indirectly for any loun or damage sufflered by μ μ‘ Buyer<br>2. The λ³ www. the product for ore κ³Ό κ΄ν from the date μ€ shipment.<br>3. Any ourchase order received by ~ sele - be interpreted μΆκ° accepting the offer Ma the 18% offer writing The buyer may<br>purchase 15 The offer My the Terms and Conditions the Seller included The offer</p>",
"markdown": "",
"text": ""
},
"elements": [
{
"category": "heading1",
"content": {
"html": "<h1 id='0' style='font-size:22px'>INVOICE</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0648,
"y": 0.0517
},
{
"x": 0.2405,
"y": 0.0517
},
{
"x": 0.2405,
"y": 0.0953
},
{
"x": 0.0648,
"y": 0.0953
}
],
"id": 0,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='1' style='font-size:20px'>Company<br>Upstage</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0657,
"y": 0.2651
},
{
"x": 0.1606,
"y": 0.2651
},
{
"x": 0.1606,
"y": 0.3168
},
{
"x": 0.0657,
"y": 0.3168
}
],
"id": 1,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='2' style='font-size:18px'>Invoice ID</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.5712,
"y": 0.0748
},
{
"x": 0.671,
"y": 0.0748
},
{
"x": 0.671,
"y": 0.101
},
{
"x": 0.5712,
"y": 0.101
}
],
"id": 2,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='3' style='font-size:14px'>ν΄ INV-AJ355548</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.788,
"y": 0.076
},
{
"x": 0.9287,
"y": 0.076
},
{
"x": 0.9287,
"y": 0.0972
},
{
"x": 0.788,
"y": 0.0972
}
],
"id": 3,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='4' style='font-size:18px'>Invoice Date</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.572,
"y": 0.1232
},
{
"x": 0.6941,
"y": 0.1232
},
{
"x": 0.6941,
"y": 0.1484
},
{
"x": 0.572,
"y": 0.1484
}
],
"id": 4,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='5' style='font-size:18px'>9/7/1992</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.8525,
"y": 0.1224
},
{
"x": 0.9293,
"y": 0.1224
},
{
"x": 0.9293,
"y": 0.1468
},
{
"x": 0.8525,
"y": 0.1468
}
],
"id": 5,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='6' style='font-size:16px'>Mamo<br>Lucy Park</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0658,
"y": 0.3331
},
{
"x": 0.15,
"y": 0.3331
},
{
"x": 0.15,
"y": 0.3846
},
{
"x": 0.0658,
"y": 0.3846
}
],
"id": 6,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='7' style='font-size:18px'>Address</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0662,
"y": 0.4061
},
{
"x": 0.1482,
"y": 0.4061
},
{
"x": 0.1482,
"y": 0.4286
},
{
"x": 0.0662,
"y": 0.4286
}
],
"id": 7,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='8' style='font-size:16px'>7 Pepper Wood Street, 130 Stone Comer<br>Terrace<br>Wilkes Barre, Pennsylvania, 18768<br>United States</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.067,
"y": 0.4332
},
{
"x": 0.3962,
"y": 0.4332
},
{
"x": 0.3962,
"y": 0.5173
},
{
"x": 0.067,
"y": 0.5173
}
],
"id": 8,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='9' style='font-size:16px'>Email</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0656,
"y": 0.5326
},
{
"x": 0.1235,
"y": 0.5326
},
{
"x": 0.1235,
"y": 0.5579
},
{
"x": 0.0656,
"y": 0.5579
}
],
"id": 9,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='10' style='font-size:16px'>Ikitchenman0@arizona.edu</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0654,
"y": 0.5614
},
{
"x": 0.2874,
"y": 0.5614
},
{
"x": 0.2874,
"y": 0.5834
},
{
"x": 0.0654,
"y": 0.5834
}
],
"id": 10,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<br><h1 id='11' style='font-size:20px'>Service Details Form</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.5727,
"y": 0.2112
},
{
"x": 0.8149,
"y": 0.2112
},
{
"x": 0.8149,
"y": 0.2417
},
{
"x": 0.5727,
"y": 0.2417
}
],
"id": 11,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='12' style='font-size:16px'>Name<br>Sung Kim</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.573,
"y": 0.2657
},
{
"x": 0.6563,
"y": 0.2657
},
{
"x": 0.6563,
"y": 0.3177
},
{
"x": 0.573,
"y": 0.3177
}
],
"id": 12,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='13' style='font-size:16px'>260 'ess<br>Gwangovolungang:co 338, Gyeongg do.<br>Sanghyeon-dong, Sui-gu<br>Yongin-si, South Korea</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.5724,
"y": 0.3401
},
{
"x": 0.891,
"y": 0.3401
},
{
"x": 0.891,
"y": 0.4232
},
{
"x": 0.5724,
"y": 0.4232
}
],
"id": 13,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='14' style='font-size:18px'>Additional Request</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0648,
"y": 0.6681
},
{
"x": 0.2482,
"y": 0.6681
},
{
"x": 0.2482,
"y": 0.6962
},
{
"x": 0.0648,
"y": 0.6962
}
],
"id": 14,
"page": 1
},
{
"category": "paragraph",
"content": {
"html": "<br><p id='15' data-category='paragraph' style='font-size:14px'>Vivamus vestibulum sagittis sapien. Cum sociis natoque<br>penatibus νλͺ© magnis dfs parturient montes, nascetur ridiculus<br>mus.</p>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.4191,
"y": 0.6684
},
{
"x": 0.9132,
"y": 0.6684
},
{
"x": 0.9132,
"y": 0.7332
},
{
"x": 0.4191,
"y": 0.7332
}
],
"id": 15,
"page": 1
},
{
"category": "heading1",
"content": {
"html": "<h1 id='16' style='font-size:14px'>TERMS AND CONDITIONS</h1>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0649,
"y": 0.8303
},
{
"x": 0.2506,
"y": 0.8303
},
{
"x": 0.2506,
"y": 0.8523
},
{
"x": 0.0649,
"y": 0.8523
}
],
"id": 16,
"page": 1
},
{
"category": "list",
"content": {
"html": "<p id='17' data-category='list' style='font-size:14px'>L TM Seir that not be lable 1μΈ΅ the Buyer drectly indirectly for any loun or damage sufflered by μ μ‘ Buyer<br>2. The λ³ www. the product for ore κ³Ό κ΄ν from the date μ€ shipment.<br>3. Any ourchase order received by ~ sele - be interpreted μΆκ° accepting the offer Ma the 18% offer writing The buyer may<br>purchase 15 The offer My the Terms and Conditions the Seller included The offer</p>",
"markdown": "",
"text": ""
},
"coordinates": [
{
"x": 0.0679,
"y": 0.8717
},
{
"x": 0.9261,
"y": 0.8717
},
{
"x": 0.9261,
"y": 0.9558
},
{
"x": 0.0679,
"y": 0.9558
}
],
"id": 17,
"page": 1
}
],
"model": "document-parse-260930",
"usage": {
"pages": 1,
"standard": [1],
"enhanced": []
}
}